mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-25 19:14:03 +03:00
Getting templates and URLS to work
This commit is contained in:
parent
d58da9e5e8
commit
f5e754c285
|
@ -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)
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1 +1 @@
|
|||
{% raw %}{% extend "base.html" %}{% endraw %}
|
||||
{% raw %}{% extends "base.html" %}{% endraw %}
|
|
@ -1 +1 @@
|
|||
{% raw %}{% extend "base.html" %}{% endraw %}
|
||||
{% raw %}{% extends "base.html" %}{% endraw %}
|
Loading…
Reference in New Issue
Block a user