1
0
mirror of https://github.com/bspeice/Melodia synced 2026-06-11 07:41:45 -04:00

Initial web app commit

Contains app-specific URL handling, and initial static resources
	(bootstrap, jquery 1.9, jquery-ui 1.10 included)
This commit is contained in:
Bradlee Speice
2013-01-18 23:17:55 -05:00
parent f601f0834a
commit bcfbd7bc60
16 changed files with 9584 additions and 1 deletions
+3 -1
View File
@@ -60,7 +60,7 @@ MEDIA_URL = ''
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = ''
STATIC_ROOT = '/tmp/MELODIA_STATIC/'
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
@@ -130,6 +130,7 @@ TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(PROJECT_FOLDER, 'web', 'templates')
)
INSTALLED_APPS = (
@@ -146,6 +147,7 @@ INSTALLED_APPS = (
# Melodia apps
'archiver',
'web',
#Django management
'django_extensions',
+6
View File
@@ -4,6 +4,9 @@ from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
# Melodia web client
from web.urls import web_urls
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'Melodia.views.home', name='home'),
@@ -14,4 +17,7 @@ urlpatterns = patterns('',
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
# Defer handling urls to the web_urls controller
url('', include(web_urls)),
)
+4742
View File
File diff suppressed because it is too large Load Diff
View File
+3
View File
@@ -0,0 +1,3 @@
from django.db import models
# Create your models here.
+4742
View File
File diff suppressed because it is too large Load Diff
+1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+20
View File
@@ -0,0 +1,20 @@
<html>
<head>
<meta charset="utf-8" />
<title>Login to Melodia</title>
<link href="{{ STATIC_URL }}bootstrap.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a data-toggle="collapse" data-target=".nav-collapse" class="btn btn-navbar"></a>
</div>
</div>
</div>
<!-- Apparently putting javascript at the bottom makes it load faster... -->
<!-- Also, this is the login page... -->
</body>
</html>
+19
View File
@@ -0,0 +1,19 @@
<html>
<head>
<meta charset="utf-8" />
<title>Login to Melodia</title>
<link href="{{ STATIC_URL }}bootstrap.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a data-toggle="collapse" data-target=".nav-collapse" class="btn btn-navbar"></a>
</div>
</div>
</div>
<!-- Apparently putting javascript at the bottom makes it load faster... -->
</body>
</html>
+16
View File
@@ -0,0 +1,16 @@
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.assertEqual(1 + 1, 2)
+10
View File
@@ -0,0 +1,10 @@
from django.conf.urls import patterns, include, url
web_urls = patterns('web.views',
# Examples:
# url(r'^$', 'Melodia.views.home', name='home'),
# url(r'^Melodia/', include('Melodia.foo.urls')),
url(r'^$|main/', 'main.main'),
url(r'^login/', 'login_page.login_page'),
)
View File
+6
View File
@@ -0,0 +1,6 @@
from django.http import HttpResponse
from django.template import RequestContext
from django.shortcuts import render_to_response
def login_page(request):
return render_to_response("login.html", context_instance = RequestContext(request))
+6
View File
@@ -0,0 +1,6 @@
from django.http import HttpResponse
from django.template import RequestContext
from django.shortcuts import render_to_response
def main(request):
return render_to_response("main.html", context_instance = RequestContext(request))