Getting templates and URLS to work

This commit is contained in:
Daniel Greenfeld 2013-08-16 16:28:23 +02:00
parent d58da9e5e8
commit f5e754c285
4 changed files with 16 additions and 8 deletions

View File

@ -1,4 +1,9 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.views.generic import TemplateView
# Uncomment the next two lines to enable the admin:
@ -16,6 +21,9 @@ urlpatterns = patterns('',
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
# Uncomment the next line to enable the admin:
url(r'^users/', include("users.urls", namespace="users")),
)
url(r'^users/', include("users.urls", namespace="users")),
#url(r'^avatar/', include('avatar.urls')),
url(r'^accounts/', include('allauth.urls')),
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

View File

@ -1,4 +1,4 @@
{% raw %}{% load staticfiles %}<!DOCTYPE html>
{% raw %}{% load staticfiles i18n %}<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
@ -32,11 +32,11 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="{% url 'about '%}">{{ project_name }}</a>
<a class="brand" href="{% url 'home' %}">{{ project_name }}</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li class="active"><a href="{% url 'about '%}">Home</a></li>
<li><a href="{% url 'about '%}">About</a></li>
<li class="active"><a href="{% url 'home' %}">Home</a></li>
<li><a href="{% url 'about' %}">About</a></li>
{% if request.user.is_authenticated %}
<a href="{% url 'users:detail' request.user.username %}">{% trans "My Profile" %}</a>

View File

@ -1 +1 @@
{% raw %}{% extend "base.html" %}{% endraw %}
{% raw %}{% extends "base.html" %}{% endraw %}

View File

@ -1 +1 @@
{% raw %}{% extend "base.html" %}{% endraw %}
{% raw %}{% extends "base.html" %}{% endraw %}