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. 5


From: Sylvain Beucler
Subject: [Savannah-cvs] [SCM] Savane-cleanup framework branch, master, updated. 5a8e0277009dfc0977c31cde7d6820191ce8cfbc
Date: Thu, 22 Jul 2010 19:27:19 +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  5a8e0277009dfc0977c31cde7d6820191ce8cfbc (commit)
       via  af33d2b0e73aab9b400c1303c005530af62aab47 (commit)
      from  14ef142385b0799046186f27b5554d4a9ae3a8ad (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=5a8e0277009dfc0977c31cde7d6820191ce8cfbc

commit 5a8e0277009dfc0977c31cde7d6820191ce8cfbc
Author: Sylvain Beucler <address@hidden>
Date:   Thu Jul 22 21:27:11 2010 +0200

    Allow title overriding from the template (typically when url.py is 
3rd-party)

diff --git a/templates/base.html b/templates/base.html
index d2f5c7c..8745260 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -4,8 +4,8 @@
   <head>
     {% load i18n %}
     <title>
-      {% block title %}{% if title %}{{ title }}{% else %}{% trans 'Welcome' 
%}{% endif %}
-        [Savannah]{% endblock %}
+      {% include "title.html" %}
+      [Savannah]
     </title>
     <link rel="stylesheet" type="text/css" 
href="{{STATIC_MEDIA_URL}}savane/css/Savannah.css" />
     <link rel="icon" type="image/png" 
href="{{STATIC_MEDIA_URL}}savane/images/icon.png" />
@@ -39,14 +39,11 @@
         <ul class="messagelist">{% for message in messages %}<li>{{ message 
}}</li>{% endfor %}</ul>
         {% endif %}
 
-         <h1>{{ title }}</h1>
+         <h1>{% include "title.html" %}</h1>
 
           {% block content %}
           {% endblock %}
         </div>
-      </div>
-    </div>
-
       </div><!-- end main -->
       <br class="clear" />
     </div><!-- end realbody -->
diff --git a/templates/registration/activate.html 
b/templates/registration/activate.html
index 181fa60..14eb250 100644
--- a/templates/registration/activate.html
+++ b/templates/registration/activate.html
@@ -1,6 +1,8 @@
 {% extends "base.html" %}
 {% load i18n %}
 
+{% block title %}Registration{% endblock %}
+
 {% block content %}
 
 {% trans "Your account activation failed." %}
diff --git a/templates/registration/activation_complete.html 
b/templates/registration/activation_complete.html
index 7d132ba..e766c85 100644
--- a/templates/registration/activation_complete.html
+++ b/templates/registration/activation_complete.html
@@ -1,6 +1,8 @@
 {% extends "base.html" %}
 {% load i18n %}
 
+{% block title %}Registration{% endblock %}
+
 {% block content %}
 
 {% trans "Your account is now active." %}
diff --git a/templates/registration/login.html 
b/templates/registration/login.html
index 9d49c96..a19e992 100644
--- a/templates/registration/login.html
+++ b/templates/registration/login.html
@@ -1,8 +1,8 @@
 {% extends "base.html" %}
 
-{% block content %}
-Login:
+{% block title %}Login{% endblock %}
 
+{% block content %}
 <form action="{% url django.contrib.auth.views.login %}" method="post">{% 
csrf_token %}
 {{form.as_p}}
 <input type="submit" name="login" value="Login" />
diff --git a/templates/registration/registration_complete.html 
b/templates/registration/registration_complete.html
index 5b32c4a..ba341c1 100644
--- a/templates/registration/registration_complete.html
+++ b/templates/registration/registration_complete.html
@@ -1,6 +1,8 @@
 {% extends "base.html" %}
 {% load i18n %}
 
+{% block title %}Registration{% endblock %}
+
 {% block content %}
 
 {% trans "An email containing account-activation information has been sent." %}
diff --git a/templates/registration/registration_form.html 
b/templates/registration/registration_form.html
index a700432..31eee19 100644
--- a/templates/registration/registration_form.html
+++ b/templates/registration/registration_form.html
@@ -1,5 +1,7 @@
 {% extends "base.html" %}
 
+{% block title %}Registration{% endblock %}
+
 {% block content %}
 
 <form action="" method="POST">{% csrf_token %}
diff --git a/templates/title.html b/templates/title.html
new file mode 100644
index 0000000..9093d57
--- /dev/null
+++ b/templates/title.html
@@ -0,0 +1,3 @@
+{% load i18n %}
+
+{% block title %}{% if title %}{{ title }}{% else %}{% trans 'Welcome' %}{% 
endif %}{% endblock %}

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

commit af33d2b0e73aab9b400c1303c005530af62aab47
Author: Sylvain Beucler <address@hidden>
Date:   Thu Jul 22 21:26:25 2010 +0200

    Remove draft for custom registration

diff --git a/savane/register/__init__.py b/savane/register/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/savane/register/urls.py b/savane/register/urls.py
deleted file mode 100644
index bca2e1c..0000000
--- a/savane/register/urls.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# URL dispatching
-# Copyright (C) 2009 Jonathan Gonzalez V.
-#
-# This file is part of Savane.
-#
-# Savane is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# Savane is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-from django.conf.urls.defaults import *
-import views
-
-urlpatterns = patterns ('',
-  (r'^$', views.register)
-)
diff --git a/savane/register/views.py b/savane/register/views.py
deleted file mode 100644
index bcf53b2..0000000
--- a/savane/register/views.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright (C) 2009 Jonathan Gonzalez V.
-#
-# This file is part of Savane.
-#
-# Savane is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# Savane is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-from django.template import RequestContext
-from django.shortcuts import render_to_response
-from django import forms
-
-from savane.svmain.models import ExtendedUser, SshKey
-
-
-def register( request ):
-    error_msg = ''
-    success_msg = ''
-
-    form = RegisterForm()
-
-    return render_to_response('register/register.html',
-                              { 'error_msg' : error_msg,
-                                'form' : form,
-                                'success_msg' : success_msg,
-                                },
-                              context_instance=RequestContext(request))
-
-
-
-class RegisterForm( forms.Form ):
-    username = forms.CharField( required=True )
-    password = forms.CharField( widget=forms.PasswordInput,required=True )
-    repeat_password = forms.CharField( 
widget=forms.PasswordInput,required=True )
-    first_name = forms.CharField()
-    last_name = forms.CharField()
-    email = forms.EmailField( required=True )
-
-    action = forms.CharField( widget=forms.HiddenInput, required=True, 
initial='register' )
-
-    def clean_login( self ):
-        username = lsef.cleaned_data['username']
-
-        try:
-            user = ExtendedUser.objects.get( username=username)
-        except:
-            return username
-
-        raise forms.ValidationError( 'The username already exists.' )
-
-    def clean( self ):
-        password = self.cleaned_data.get( 'password' )
-        repeat_password = self.cleaned_data.get( 'repeat_password' )
-
-        if password != repeat_password:
-            raise forms.ValidationError( 'Password do not match.' )
-
-        return self.cleaned_data
diff --git a/templates/register/register.html b/templates/register/register.html
deleted file mode 100644
index 59e9033..0000000
--- a/templates/register/register.html
+++ /dev/null
@@ -1,25 +0,0 @@
-{% extends "base.html" %}
-
-{% block content %}
-<form action="{% url savane.register.views.register %}" method="post">{% 
csrf_token %}
-<dl>
-  {% for field in form %}
-  {% if field.is_hidden %}
-  {{field}}
-  {% else %}
-  <dt>{{ field.label_tag }} {{ field.errors }}</dt>
-  <dd>{{ field }}</dd>
-  {% endif %}
-  {% endfor %}
-<input type="submit" name="Register" value="Register" />
-</table>
-</form>
-{% endblock %}
-
-{% comment %}
-Local Variables: **
-mode: django-html **
-tab-width: 4 **
-indent-tabs-mode: nil **
-End: **
-{% endcomment %}
diff --git a/urls.py b/urls.py
index 5689ee8..cb0e70c 100644
--- a/urls.py
+++ b/urls.py
@@ -38,11 +38,6 @@ urlpatterns += patterns('',
   (r'^accounts/', include('django.contrib.auth.urls')),
 )
 
-# Registration
-urlpatterns += patterns('',
-  (r'^register/', include('savane.register.urls')),
-)
-
 # Enable the auto-admin:
 from django.contrib import admin
 import django

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

Summary of changes:
 savane/register/urls.py                           |   24 -------
 savane/register/views.py                          |   67 ---------------------
 templates/base.html                               |    9 +--
 templates/register/register.html                  |   25 --------
 templates/registration/activate.html              |    2 +
 templates/registration/activation_complete.html   |    2 +
 templates/registration/login.html                 |    4 +-
 templates/registration/registration_complete.html |    2 +
 templates/registration/registration_form.html     |    2 +
 templates/title.html                              |    3 +
 urls.py                                           |    5 --
 11 files changed, 16 insertions(+), 129 deletions(-)
 delete mode 100644 savane/register/__init__.py
 delete mode 100644 savane/register/urls.py
 delete mode 100644 savane/register/views.py
 delete mode 100644 templates/register/register.html
 create mode 100644 templates/title.html


hooks/post-receive
-- 
Savane-cleanup framework



reply via email to

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