savannah-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-cvs] [SCM] Savane-cleanup framework branch, master, updated. 1


From: Sylvain Beucler
Subject: [Savannah-cvs] [SCM] Savane-cleanup framework branch, master, updated. 14ef142385b0799046186f27b5554d4a9ae3a8ad
Date: Thu, 22 Jul 2010 18:13:28 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Savane-cleanup framework".

The branch, master has been updated
       via  14ef142385b0799046186f27b5554d4a9ae3a8ad (commit)
      from  ca722b14f6186b8fe48e800a22083d421dfc3e2e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/savane-cleanup/framework.git/commit/?id=14ef142385b0799046186f27b5554d4a9ae3a8ad

commit 14ef142385b0799046186f27b5554d4a9ae3a8ad
Author: Sylvain Beucler <address@hidden>
Date:   Thu Jul 22 20:13:23 2010 +0200

    Integrate django-registration in the project (TODO: auto-create an 
ExtendedUser)

diff --git a/.gitignore b/.gitignore
index 774021e..9ed4ae9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ settings.py
 
 # Bundled dependencies, cf. INSTALL
 django-annoying
+django-registration
diff --git a/INSTALL b/INSTALL
index a4f355f..6f16c9f 100644
--- a/INSTALL
+++ b/INSTALL
@@ -26,6 +26,7 @@
 apt-get install python-django python-mysqldb mysql-server
 
 hg clone http://bitbucket.org/offline/django-annoying/
+hg clone http://bitbucket.org/ubernostrum/django-registration/
 
 
 * Install process
diff --git a/TODO b/TODO
index 87e5124..93c9bbc 100644
--- a/TODO
+++ b/TODO
@@ -11,7 +11,9 @@ This roadmap is not immutable, feel free to discuss it with 
others and
 improve it.
 
 
-[/] Implement web screens (higher priority)
+[/] Implement high priority web screens
+
+    [/] User account registration
 
     [/] User page
 
@@ -32,8 +34,6 @@ improve it.
 
         [X] GPG key
 
-       [ ] Resume and skills
-
     [/] My Groups
 
     [ ] Group membership (manage members, manage permissions, request
@@ -44,21 +44,21 @@ improve it.
 
 [ ] Project registration
 
-[ ] Implement web screens (lower priority)
+[ ] Implement lower priority web screens
 
-    [ ] Account conf 2 ([ ] profile/resume, [ ] skills, [ ] timezone)
+    [ ] Account conf part 2 ([ ] profile/resume, [ ] skills, [ ] timezone)
 
     [ ] Bookmarks? Was considered for deletion at a point in Savane:
         http://gna.org/task/?1412 - note that yeupou is a bit partial
         towards trackers in that discussion
 
-[X] Admin interface (implemented via Django admin)
+[/] Admin interface (implemented via Django admin)
 
 [ ] News management (+ comments)
 
 [/] Work on the web design
 
-    [X] Do something different
+    [/] Do something different
 
     [ ] Maybe we can change the colors.
 
@@ -77,7 +77,7 @@ improve it.
     [/] homedirs and .ssh replication (done in savane-cleanup, and in
         Python - just adapt the DB schema)
 
-    [ ] GPG keyrings
+    [/] GPG keyrings
 
     [ ] Group resources (Download, CVS, SVN, Arch, Git, Mercurial,
         Bazaar)
diff --git a/doc/DJANGO b/doc/DJANGO
index e64ca87..1b57252 100644
--- a/doc/DJANGO
+++ b/doc/DJANGO
@@ -24,3 +24,8 @@ Stuff of interest:
   and voluntarily released that way without so much of a release note.
   Don't rely on it.
   http://code.djangoproject.com/ticket/11293
+
+- With Django 1.2 and above, you can add to you settings.py:
+  EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
+  This will direct all mails to the console, which means you won't
+  risk sending real e-mails to real people by mistake when testing.
diff --git a/registration b/registration
new file mode 120000
index 0000000..b901592
--- /dev/null
+++ b/registration
@@ -0,0 +1 @@
+django-registration/registration
\ No newline at end of file
diff --git a/settings_default.py b/settings_default.py
index b9a0fec..d480013 100644
--- a/settings_default.py
+++ b/settings_default.py
@@ -87,6 +87,8 @@ INSTALLED_APPS = (
     'django.contrib.admin',
     'django.contrib.admindocs',
 
+    'registration',
+
     'savane.svmain',
     'savane.my',
     'savane.register',
@@ -117,3 +119,9 @@ MEDIA_URL = '/upload/'
 #REQUIRE_LOGIN_PATH = LOGIN_URL
 #STATIC_MEDIA_URL   = subdir + '/static_media/'
 #MEDIA_URL          = subdir + '/upload/'
+
+
+# 3rd-party configuration
+
+# django-registration
+ACCOUNT_ACTIVATION_DAYS = 7 # One-week activation window
diff --git a/templates/base.html b/templates/base.html
index aa178ea..d2f5c7c 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -20,12 +20,15 @@
           <li class="menuitem"><a href="{% url savane.my.views.index %}">My 
account</a></li>
           <li class="menuitem"><a href="{% url 
django.contrib.auth.views.logout %}">Logout</a></li>
         {% else %}
+          <li class="menutitle">Login status</li>
+          <li class="menuitem"><span class="error">Not connected</span></li>
           <li class="menuitem"><a href="{% url django.contrib.auth.views.login 
%}">Login</a></li>
+          <li class="menuitem"><a href="{% url registration_register %}">New 
user</a></li>
         {% endif %}
         <!-- /sitemenu -->
 
-       <li class="menutitle">Site Help</li>
-        <li class="menuitem"><a href="{% url contact %}">Contact Us</a></li>
+       <li class="menutitle">Site help</li>
+        <li class="menuitem"><a href="{% url contact %}">Contact us</a></li>
       </ul>
 
       <div class="main"><a name="top"></a>
diff --git a/templates/registration/README b/templates/registration/README
index f6757e6..dcfad17 100644
--- a/templates/registration/README
+++ b/templates/registration/README
@@ -1,3 +1,5 @@
 'registration/login.html' is the place where Django (more precisely
 'django.contrib.auth.views.login') looks for the login template by
 default.
+
+Other templates are required by the 'django-registration' application.
diff --git a/templates/registration/activate.html 
b/templates/registration/activate.html
new file mode 100644
index 0000000..181fa60
--- /dev/null
+++ b/templates/registration/activate.html
@@ -0,0 +1,8 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+
+{% trans "Your account activation failed." %}
+
+{% endblock content %}
diff --git a/templates/registration/activation_complete.html 
b/templates/registration/activation_complete.html
new file mode 100644
index 0000000..7d132ba
--- /dev/null
+++ b/templates/registration/activation_complete.html
@@ -0,0 +1,8 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+
+{% trans "Your account is now active." %}
+
+{% endblock content %}
diff --git a/templates/registration/activation_email.txt 
b/templates/registration/activation_email.txt
new file mode 100644
index 0000000..d25f47e
--- /dev/null
+++ b/templates/registration/activation_email.txt
@@ -0,0 +1,17 @@
+{% load i18n %}
+
+{% trans "Here's your activation key" %}
+{{activation_key}}
+
+{% trans "Please click on this link to activate your account" %}
+http://{{site}}{% url registration_activate activation_key %}
+
+{% trans "This link will expire in:" %} {{expiration_days}} {% trans "days." %}
+
+{% comment %}
+http://docs.djangoproject.com/en/dev/ref/contrib/sites/
+{{site}}
+{{site.name}}
+{{site.domain}}
+(by default name == domain)
+{% endcomment %}
diff --git a/templates/registration/activation_email_subject.txt 
b/templates/registration/activation_email_subject.txt
new file mode 100644
index 0000000..2c7fde2
--- /dev/null
+++ b/templates/registration/activation_email_subject.txt
@@ -0,0 +1 @@
+Savane account registration
diff --git a/templates/registration/registration_complete.html 
b/templates/registration/registration_complete.html
new file mode 100644
index 0000000..5b32c4a
--- /dev/null
+++ b/templates/registration/registration_complete.html
@@ -0,0 +1,8 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+
+{% trans "An email containing account-activation information has been sent." %}
+
+{% endblock content %}
diff --git a/templates/registration/registration_form.html 
b/templates/registration/registration_form.html
new file mode 100644
index 0000000..a700432
--- /dev/null
+++ b/templates/registration/registration_form.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block content %}
+
+<form action="" method="POST">{% csrf_token %}
+  <table>
+  {{ form.as_table }}
+  </table>
+  <input type="submit" />
+</form>
+
+{% endblock content %}
diff --git a/urls.py b/urls.py
index 5536d12..5689ee8 100644
--- a/urls.py
+++ b/urls.py
@@ -33,6 +33,8 @@ urlpatterns += patterns('',
   # Generic login/logout/change_pass/etc.
   (r'^accounts/logout/$', 'django.contrib.auth.views.logout',
     {'next_page' : '/'}),  # redirect to '/' instead of login page
+  # django-registration
+  (r'^accounts/', include('registration.backends.default.urls')),
   (r'^accounts/', include('django.contrib.auth.urls')),
 )
 

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                                         |    1 +
 INSTALL                                            |    1 +
 TODO                                               |   16 ++++++++--------
 doc/DJANGO                                         |    5 +++++
 registration                                       |    1 +
 settings_default.py                                |    8 ++++++++
 templates/base.html                                |    7 +++++--
 templates/registration/README                      |    2 ++
 .../{error.html => registration/activate.html}     |    5 ++++-
 .../activation_complete.html}                      |    5 ++++-
 templates/registration/activation_email.txt        |   17 +++++++++++++++++
 .../registration/activation_email_subject.txt      |    1 +
 templates/registration/registration_complete.html  |    8 ++++++++
 templates/registration/registration_form.html      |   12 ++++++++++++
 urls.py                                            |    2 ++
 15 files changed, 79 insertions(+), 12 deletions(-)
 create mode 120000 registration
 copy templates/{error.html => registration/activate.html} (52%)
 copy templates/{error.html => registration/activation_complete.html} (53%)
 create mode 100644 templates/registration/activation_email.txt
 create mode 100644 templates/registration/activation_email_subject.txt
 create mode 100644 templates/registration/registration_complete.html
 create mode 100644 templates/registration/registration_form.html


hooks/post-receive
-- 
Savane-cleanup framework



reply via email to

[Prev in Thread] Current Thread [Next in Thread]