Commit 3b874f66 authored by Christophe Siraut's avatar Christophe Siraut

Switch to named urls.

parent b3d567ba
......@@ -3,3 +3,5 @@
*~
fix
settings.py
staticroot
......@@ -65,7 +65,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 = STATIC_ROOT = os.path.join(PROJECT_DIR, 'staticroot')
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
......
......@@ -9,10 +9,10 @@
{% block head %}{% endblock %}
<!-- Django stylesheet -->
<link rel="stylesheet" type="text/css" href="/static/admin/css/base.css"/>
<link rel="stylesheet" type="text/css" href="/static/admin/css/forms.css"/>
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}admin/css/base.css"/>
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}admin/css/forms.css"/>
<!-- Nuages stylesheet -->
<link rel="stylesheet" href="/static/css/nuages.css" />
<link rel="stylesheet" href="{{ STATIC_URL }}css/nuages.css" />
</head>
......@@ -21,7 +21,7 @@
<div class="menu">
<a href="/" title="Homepage">Nuages</a>&nbsp;
<a href="{% url 'home' %}" title="Homepage">Nuages</a>&nbsp;
{% block menu %}{% endblock %}
{% if user.is_authenticated %}
<a href="{% url 'auth_logout' %}">Logout</a>
......
......@@ -11,7 +11,7 @@
{% block chapeau %}
<h1><img src="/static/images/nuage_guillaume_boitel.png">Nuages</h1>
<h1><img src="{{ STATIC_URL }}images/nuage_guillaume_boitel.png">Nuages</h1>
<p class="info">
{% trans "Create polls easily, and publish them for your mates, in order to plan meetings or else." %}
......@@ -20,9 +20,9 @@
{% block content %}
<p class="icone"><a href='/new/' title='{% trans "Make an event" %}' alt='{% trans "Make an event" %}'><img width="20px" src="/static/images/view-calendar-day-2.png"> &nbsp; {% trans "Shedule an event" %}</a></p>
<p class="icone"><a href="{% url 'new' %}" title='{% trans "Make an event" %}' alt='{% trans "Make an event" %}'><img width="20px" src="/static/images/view-calendar-day-2.png"> &nbsp; {% trans "Shedule an event" %}</a></p>
<p class="icone"><a href='/nuages' title='{% trans "About nuages" %}' alt='{% trans "Learn more" %}'><img width="20px" src="/static/images/document-send.png"> &nbsp; {% trans "About nuages" %}</a></p>
<p class="icone"><a href="{% url 'documentation' %}" title='{% trans "About nuages" %}' alt='{% trans "Learn more" %}'><img width="20px" src="/static/images/document-send.png"> &nbsp; {% trans "About nuages" %}</a></p>
<br /><div style="display:block;clear:both"></div> <br /><br />
......@@ -50,7 +50,7 @@
<h2>{% trans "My account" %}</h2>
<ul>
<li>{% trans "Username" %}: {{user}}</li>
<li><a href="/user/password/change/">{% trans 'Change password' %}</a></li>
<li><a href="{% url 'auth_password_change' %}">{% trans 'Change password' %}</a></li>
<!--<li><a href="/user/email/change/">{% trans 'Change email address' %}</a></li>-->
<li><a href="{% url 'auth_logout' %}">{% trans 'Logout' %}</a></li>
</ul>
......
......@@ -5,7 +5,7 @@
{% block content %}
<h2>Success</h2>
<p class=info>{% trans 'Your account has been created. You may now login' %}</p>
<p class=info>{% trans 'Your account has been created. You may now login.' %}</p>
<ul>
<li><a href="{% url 'auth_login' %}">Log in</a></li>
......
{% extends "base.html" %}
{% block content %}
<h2>Success</h2>
<p class=info>Your account has been created. You may now <a href='/user/login'>login</a></p>
<ul>
<li><a href="/user/login">Authenticate</a></li>
<li><a href="/">Stay anonymous</a></li>
</ul>
{% endblock %}
{% extends "base.html" %}
{% load url from future %}
{% load i18n %}
{% block title %}Create an meeting{% endblock %}
......@@ -8,7 +9,7 @@
<h3>{% trans "Step 1 : About your poll" %}</h3>
{% if not user.is_authenticated %}
<p class="info">{% trans 'Enter basic information on your poll. (You are not logged so you will not be able to modify your poll after creation. You may <a href="/user/login/">login</a> or <a href="/user/registration/">register</a> first)' %}</p>
<p class="info">{% trans 'Enter basic information on your poll. (You are not logged so you will not be able to modify your poll after creation. You may want to login or register first.' %} <a href="{% url 'auth_login' %}">login</a>/<a href="{% url 'registration_register' %}">register</a>)'</p>
{% else %}
<p class="info">{% trans 'Enter basic information on your poll.' %}</p>
{% endif %}
......
......@@ -22,30 +22,22 @@ urlpatterns = patterns('',
# Example:
# (r'^nuage/', include('nuage.foo.urls')),
(r'^admin/', include(admin.site.urls)),
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^$', 'django.views.generic.list_detail.object_list', dict(info_dict, template_name='index.html')),
(r'^nuages$', 'django.views.generic.simple.direct_to_template', {'template': 'nuages.html'}),
(r'^(?P<lang_id>\w{2})/nuages$', 'sondage.views.translation'),
(r'^(?P<poll_id>\w{4})/$', 'sondage.views.vote'),
(r'^new/$', 'sondage.views.new'),
(r'^(?P<object_id>\w+)/edit/$', 'sondage.views.secure_update_object', dict(poll_dict, post_save_redirect='choices/')),
(r'^(?P<poll_id>\w+)/delete/$', 'sondage.views.delete'),
(r'^(?P<poll_id>\w+)/edit/choices/$', 'sondage.views.editchoices'),
(r'^(?P<poll_id>\w{4})/vote/$', 'sondage.views.vote'),
(r'^(?P<poll_id>\w+)/csv/$', 'sondage.views.exp_csv'),
#(r'^user/', include('account.urls')),
(r'^accounts/', include('registration.backends.default.urls')),
#(r'^user/', include('registration.backends.default.urls')),
#(r'^user/login/$', login),
#(r'^user/logout/$', logout, {'template_name': 'index.html'}),
#(r'^user/register', 'sondage.userviews.register'),
#(r'^user/success$', 'django.views.generic.simple.direct_to_template', {'template': 'registration/success.html'}),
(r'^i18n/', include('django.conf.urls.i18n')),
(r'^(?P<poll_id>\w{4})/clear/', 'sondage.userviews.clear_cookie'),
url(r'^admin/', include(admin.site.urls)),
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^$', 'django.views.generic.list_detail.object_list', dict(info_dict, template_name='index.html'), name='home'),
url(r'^nuages$', 'django.views.generic.simple.direct_to_template', {'template': 'nuages.html'}, name='documentation'),
url(r'^(?P<lang_id>\w{2})/nuages$', 'sondage.views.translation'),
url(r'^(?P<poll_id>\w{4})/$', 'sondage.views.vote'),
url(r'^new/$', 'sondage.views.new', name='new'),
url(r'^(?P<object_id>\w+)/edit/$', 'sondage.views.secure_update_object', dict(poll_dict, post_save_redirect='choices/')),
url(r'^(?P<poll_id>\w+)/delete/$', 'sondage.views.delete'),
url(r'^(?P<poll_id>\w+)/edit/choices/$', 'sondage.views.editchoices'),
url(r'^(?P<poll_id>\w{4})/vote/$', 'sondage.views.vote'),
url(r'^(?P<poll_id>\w+)/csv/$', 'sondage.views.exp_csv'),
url(r'^accounts/', include('registration.backends.default.urls')),
url(r'^i18n/', include('django.conf.urls.i18n')),
url(r'^(?P<poll_id>\w{4})/clear/', 'sondage.userviews.clear_cookie'),
)
'''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment