aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--codemash/settings.py6
-rw-r--r--codemash/urls.py15
-rw-r--r--templates/base.html14
3 files changed, 23 insertions, 12 deletions
diff --git a/codemash/settings.py b/codemash/settings.py
index 0285da9..2d2895b 100644
--- a/codemash/settings.py
+++ b/codemash/settings.py
@@ -122,10 +122,8 @@ INSTALLED_APPS = (
122 'django.contrib.sites', 122 'django.contrib.sites',
123 'django.contrib.messages', 123 'django.contrib.messages',
124 'django.contrib.staticfiles', 124 'django.contrib.staticfiles',
125 # Uncomment the next line to enable the admin: 125 'django.contrib.admin',
126 # 'django.contrib.admin', 126 'django.contrib.admindocs',
127 # Uncomment the next line to enable admin documentation:
128 # 'django.contrib.admindocs',
129 127
130 'contact', 128 'contact',
131 'accounts', 129 'accounts',
diff --git a/codemash/urls.py b/codemash/urls.py
index 567499c..68896ca 100644
--- a/codemash/urls.py
+++ b/codemash/urls.py
@@ -1,19 +1,18 @@
1from django.conf.urls import patterns, include, url 1from django.conf.urls import patterns, include, url
2from django.contrib import admin
3
4
5admin.autodiscover()
2 6
3# Uncomment the next two lines to enable the admin:
4# from django.contrib import admin
5# admin.autodiscover()
6 7
7urlpatterns = patterns('', 8urlpatterns = patterns('',
8 (r'^contact/', include('contact.urls', namespace='contact')), 9 (r'^contact/', include('contact.urls', namespace='contact')),
9 (r'^accounts/', include('django.contrib.auth.urls', namespace='auth')), 10 (r'^accounts/', include('django.contrib.auth.urls', namespace='auth')),
10 (r'^accounts/', include('accounts.urls', namespace='account')), 11 (r'^accounts/', include('accounts.urls', namespace='account')),
11 12
12 url(r'^$', 'pages.views.home', name='home'), 13 url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
14 url(r'^admin/', include(admin.site.urls)),
13 15
14 # Uncomment the admin/doc line below to enable admin documentation: 16 url(r'^$', 'pages.views.home', name='home'),
15 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
16 17
17 # Uncomment the next line to enable the admin:
18 # url(r'^admin/', include(admin.site.urls)),
19) 18)
diff --git a/templates/base.html b/templates/base.html
index 136c66d..a394d69 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -7,6 +7,20 @@
7 <meta name="viewport" content="width=device-width"> 7 <meta name="viewport" content="width=device-width">
8 </head> 8 </head>
9 <body> 9 <body>
10 <ul>
11 <li><a href="{% url 'home' %}">Home</a></li>
12 <li><a href="{% url 'contact:form' %}">Contact Us</a></li>
13 {% if user.is_staff %}
14 <li><a href="{% url 'admin:index' %}">Admin Area</a></li>
15 {% endif %}
16 {% if user.is_authenticated %}
17 <li><a href="{% url 'account:profile' %}">{{ user.username }}'s profile</a></li>
18 <li><a href="{% url 'auth:logout' %}">Logout ({{ user.username }})</a></li>
19 {% else %}
20 <li><a href="{% url 'auth:login' %}">Login</a></li>
21 <li><a href="{% url 'account:create' %}">Register</a></li>
22 {% endif %}
23 </ul>
10 {% block content %} 24 {% block content %}
11 {% endblock %} 25 {% endblock %}
12 </body> 26 </body>