Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nuages
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etch
nuages
Commits
5c4f5d5b
Commit
5c4f5d5b
authored
Nov 15, 2012
by
Christophe Siraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate to Django 1.4
parent
137ecc74
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
67 additions
and
38 deletions
+67
-38
account/templates/account/email_change.html
account/templates/account/email_change.html
+1
-1
account/templates/account/login.html
account/templates/account/login.html
+1
-1
account/templates/account/password_change.html
account/templates/account/password_change.html
+1
-1
account/templates/account/password_reset.html
account/templates/account/password_reset.html
+1
-1
account/templates/account/registration.html
account/templates/account/registration.html
+1
-1
settings.py
settings.py
+49
-23
static/css/nuages.css
static/css/nuages.css
+2
-0
templates/base.html
templates/base.html
+3
-3
templates/registration/login.html
templates/registration/login.html
+1
-1
templates/registration/register.html
templates/registration/register.html
+1
-1
templates/sondage/choice_form.html
templates/sondage/choice_form.html
+1
-1
templates/sondage/poll_detail.html
templates/sondage/poll_detail.html
+1
-1
templates/sondage/poll_form.html
templates/sondage/poll_form.html
+1
-1
templates/sondage/vote-form.html
templates/sondage/vote-form.html
+1
-1
urls.py
urls.py
+2
-1
No files found.
account/templates/account/email_change.html
View file @
5c4f5d5b
...
...
@@ -3,7 +3,7 @@
{% block content %}
<h1>
{% trans "Change email" %}
</h1>
<form
method=
"post"
action=
"{% url auth_email_change %}"
>
<form
method=
"post"
action=
"{% url auth_email_change %}"
>
{% csrf_token %}
<div
class=
"wide"
>
{{ form.as_p }}
</div>
<p><input
type=
"submit"
value=
"{% trans "
Save
"
%}"
/></p>
</form>
...
...
account/templates/account/login.html
View file @
5c4f5d5b
...
...
@@ -5,7 +5,7 @@
<h1>
{% trans "Authorization" %}
</h1>
<p>
{% trans "You should login to gain access to all site features. If you have not account" %}
<a
href=
"{% url registration_register %}"
>
{% trans "register" %}
</a>
{% trans "please" %}
</p>
<br
/>
<form
class=
"login-form"
method=
"post"
>
<form
class=
"login-form"
method=
"post"
>
{% csrf_token %}
<div
class=
"wide"
>
{{ form.as_p }}
<br
/>
<p><label
for=
"nothing"
>
</label>
<input
type=
"submit"
value=
" {% trans 'Login' %} "
/></p>
...
...
account/templates/account/password_change.html
View file @
5c4f5d5b
...
...
@@ -3,7 +3,7 @@
{% block content %}
<h1>
{% trans "New password" %}
</h1>
<form
method=
"post"
action=
"{% url auth_password_change %}"
>
<form
method=
"post"
action=
"{% url auth_password_change %}"
>
{% csrf_token %}
<div
class=
"wide"
>
{{ form.as_p }}
</div>
<p><input
type=
"submit"
value=
"{% trans "
Save
"
%}"
/></p>
</form>
...
...
account/templates/account/password_reset.html
View file @
5c4f5d5b
...
...
@@ -3,7 +3,7 @@
{% block content %}
<h1>
{% trans "Password restore" %}
</h1>
<form
method=
"post"
>
<form
method=
"post"
>
{% csrf_token %}
<div
class=
"wide"
>
{{ form.as_p }}
</div>
<p><input
type=
"submit"
value=
"{% trans "
Continue
"
%}"
/></p>
</form>
...
...
account/templates/account/registration.html
View file @
5c4f5d5b
...
...
@@ -3,7 +3,7 @@
{% block content %}
<h1>
{% trans "Registration" %}
</h1>
<form
method=
"post"
>
<form
method=
"post"
>
{% csrf_token %}
<div
class=
"wide"
>
{{ form.as_p }}
</div>
<p><input
type=
"submit"
value=
"{% trans "
Continue
"
%}"
/></p>
</form>
...
...
settings.py
View file @
5c4f5d5b
...
...
@@ -18,12 +18,16 @@ SITE = 'http://nuages.domainepublic.net/'
#if DEBUG:
# SITE = 'http://127.0.0.1:8000/'
DATABASE_ENGINE
=
'sqlite3'
# 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME
=
os
.
path
.
join
(
PROJECT_DIR
,
'nuages.sqlite'
)
# Or path to database file if using sqlite3.
DATABASE_USER
=
''
# Not used with sqlite3.
DATABASE_PASSWORD
=
''
# Not used with sqlite3.
DATABASE_HOST
=
''
# Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT
=
''
# Set to empty string for default. Not used with sqlite3.
DATABASES
=
{
'default'
:
{
'ENGINE'
:
'django.db.backends.sqlite3'
,
# Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME'
:
os
.
path
.
join
(
PROJECT_DIR
,
'nuages.sqlite'
),
# Or path to database file if using sqlite3.
'USER'
:
''
,
# Not used with sqlite3.
'PASSWORD'
:
''
,
# Not used with sqlite3.
'HOST'
:
''
,
# Set to empty string for localhost. Not used with sqlite3.
'PORT'
:
''
,
# Set to empty string for default. Not used with sqlite3.
},
}
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
...
...
@@ -48,39 +52,59 @@ SITE_ID = 1
# to load the internationalization machinery.
USE_I18N
=
True
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
# Change this for production
MEDIA_ROOT
=
'/var/www/nuages/static/'
if
DEBUG
:
MEDIA_ROOT
=
os
.
path
.
join
(
PROJECT_DIR
,
'static'
)
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT
=
''
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL
=
'/static/'
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX
=
'/media/'
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL
=
''
# Absolute path to the directory static files should be collected to.
# 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
=
''
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL
=
'/static/'
# Additional locations of static files
STATICFILES_DIRS
=
(
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os
.
path
.
join
(
PROJECT_DIR
,
'static'
),
)
# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS
=
(
'django.contrib.staticfiles.finders.FileSystemFinder'
,
'django.contrib.staticfiles.finders.AppDirectoriesFinder'
,
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
# Make this unique, and don't share it with anybody.
SECRET_KEY
=
'
yt$kh#^*y6p4&7_+3940u4j(91abrdko7hvtwc*)1w8f29+p&9
'
SECRET_KEY
=
'
secret
'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS
=
(
'django.template.loaders.filesystem.
load_template_source
'
,
'django.template.loaders.app_directories.
load_template_source
'
,
'django.template.loaders.filesystem.
Loader
'
,
'django.template.loaders.app_directories.
Loader
'
,
# 'django.template.loaders.eggs.load_template_source',
)
MIDDLEWARE_CLASSES
=
(
'django.middleware.common.CommonMiddleware'
,
'django.contrib.sessions.middleware.SessionMiddleware'
,
'django.middleware.csrf.CsrfViewMiddleware'
,
'django.middleware.locale.LocaleMiddleware'
,
'django.contrib.auth.middleware.AuthenticationMiddleware'
,
'request.middleware.RequestMiddleware'
,
'django.contrib.messages.middleware.MessageMiddleware'
,
#'request.middleware.RequestMiddleware',
'urlauth.middleware.AuthKeyMiddleware'
)
...
...
@@ -98,6 +122,8 @@ INSTALLED_APPS = (
'django.contrib.contenttypes'
,
'django.contrib.sessions'
,
'django.contrib.sites'
,
'django.contrib.messages'
,
'django.contrib.staticfiles'
,
'django.contrib.admin'
,
'django.contrib.admindocs'
,
'sondage'
,
...
...
static/css/nuages.css
View file @
5c4f5d5b
...
...
@@ -91,10 +91,12 @@ form label {
width
:
150px
;
}
/*
input, textarea {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
*/
input
:focus
,
textarea
:focus
{
background-color
:
#c3d4e3
;
/* #f2f1f0 */
...
...
templates/base.html
View file @
5c4f5d5b
...
...
@@ -8,8 +8,8 @@
{% block head %}{% endblock %}
<!-- Django stylesheet -->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/
media
/css/base.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/
media
/css/forms.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/
static/admin
/css/base.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/
static/admin
/css/forms.css"
/>
<!-- Nuages stylesheet -->
<link
rel=
"stylesheet"
href=
"/static/css/nuages.css"
/>
...
...
@@ -33,7 +33,7 @@
<!--img src="/static/images/info.png" alt="info" "-->
{{ error_message }}
{% endif %}
<form
style=
"display:inline"
name=
"langForm"
action=
"/i18n/setlang/"
method=
"post"
>
<form
style=
"display:inline"
name=
"langForm"
action=
"/i18n/setlang/"
method=
"post"
>
{% csrf_token %}
<input
name=
"next"
type=
"hidden"
value=
""
/>
<select
name=
"language"
onChange=
"langForm.submit()"
/>
<option
value=
"#"
/>
{{ LANGUAGE_CODE }}
</option>
...
...
templates/registration/login.html
View file @
5c4f5d5b
...
...
@@ -15,7 +15,7 @@
<ul>
<li>
Provide username and password:
<form
action=
""
method=
"post"
>
<form
action=
""
method=
"post"
>
{% csrf_token %}
<label
for=
"username"
></label>
<input
type=
"text"
name=
"username"
value=
""
id=
"username"
>
<label
for=
"password"
></label>
...
...
templates/registration/register.html
View file @
5c4f5d5b
...
...
@@ -13,7 +13,7 @@
<div
id=
"subcontent"
>
<form
action=
""
method=
"post"
>
<form
action=
""
method=
"post"
>
{% csrf_token %}
{{ form.as_p }}
<input
type=
"submit"
value=
"Create the account"
>
</form>
...
...
templates/sondage/choice_form.html
View file @
5c4f5d5b
...
...
@@ -112,7 +112,7 @@
<br
/>
<div
class=
"indent"
>
<form
method=
"post"
action=
""
>
<form
method=
"post"
action=
""
>
{% csrf_token %}
<table
id=
"dateChoice"
class=
"form-container"
>
<tbody>
<thead>
...
...
templates/sondage/poll_detail.html
View file @
5c4f5d5b
...
...
@@ -47,7 +47,7 @@
</tr>
<tr>
<form
action=
"/{{ object.id }}/vote/"
method=
"post"
>
<form
action=
"/{{ object.id }}/vote/"
method=
"post"
>
{% csrf_token %}
<td
class=
'names'
title=
" Fill in your name "
>
<div
class=
"blue"
>
{% trans "Your name:" %}
</div>
{{ form.as_p }}
...
...
templates/sondage/poll_form.html
View file @
5c4f5d5b
...
...
@@ -18,7 +18,7 @@
{% block content %}
<br
/>
<form
action=
""
method=
"post"
>
<form
action=
""
method=
"post"
>
{% csrf_token %}
<table>
{{ form.as_table }}
...
...
templates/sondage/vote-form.html
View file @
5c4f5d5b
...
...
@@ -7,7 +7,7 @@
<h3>
Sondage: {{object}}
</h3>
<p
class=
"info"
>
{{object.description}}
</p>
<form
method=
"post"
action=
""
>
<form
method=
"post"
action=
""
>
{% csrf_token %}
<table
id=
"dateChoice"
class=
"form-container"
>
<tbody>
<thead>
...
...
urls.py
View file @
5c4f5d5b
...
...
@@ -46,6 +46,7 @@ urlpatterns = patterns('',
(
r
'^(?P<poll_id>\w{4})/clear/'
,
'sondage.userviews.clear_cookie'
),
)
'''
from django.conf import settings
if settings.DEBUG:
...
...
@@ -54,4 +55,4 @@ if settings.DEBUG:
'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT, 'show_indexes': False}),
)
'''
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment