Initial web app commit
Contains app-specific URL handling, and initial static resources (bootstrap, jquery 1.9, jquery-ui 1.10 included)master
parent
f601f0834a
commit
bcfbd7bc60
|
@ -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',
|
||||
|
|
|
@ -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)),
|
||||
)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,3 @@
|
|||
from django.db import models
|
||||
|
||||
# Create your models here.
|
File diff suppressed because it is too large
Load Diff
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
|
@ -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>
|
|
@ -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>
|
|
@ -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)
|
|
@ -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'),
|
||||
)
|
|
@ -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))
|
|
@ -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))
|
Loading…
Reference in New Issue