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


From: Sylvain Beucler
Subject: [Savannah-cvs] [SCM] Savane-cleanup framework branch, master, updated. f93c1b30d1caf97e40a13eba478e3aea6f0bd2af
Date: Mon, 27 Jul 2009 17:22:17 +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  f93c1b30d1caf97e40a13eba478e3aea6f0bd2af (commit)
      from  cfa8cc6180dd57f3bdde28e18d43a0f59a2d9bf6 (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=f93c1b30d1caf97e40a13eba478e3aea6f0bd2af

commit f93c1b30d1caf97e40a13eba478e3aea6f0bd2af
Author: Sylvain Beucler <address@hidden>
Date:   Mon Jul 27 19:22:07 2009 +0200

    Rename 'main' to 'svmain'; move user/group models to svmain; start 
implementing admin area

diff --git a/MIGRATION.txt b/MIGRATION.txt
new file mode 100644
index 0000000..8d9506f
--- /dev/null
+++ b/MIGRATION.txt
@@ -0,0 +1,9 @@
+- users:
+  - cf. migrate_old_savane.sql
+  - fill-in is_staff and is_superuser
+- groups:
+  - SQL
+  - licenses: content/hashes.txt -> svmain_license
+  - develompent_status: content/hashes.txt -> svmain_develomentstatus
+- group configurations (group_type):
+  - 
diff --git a/migrate_old_savane.sql b/migrate_old_savane.sql
index bde5457..0701a7a 100644
--- a/migrate_old_savane.sql
+++ b/migrate_old_savane.sql
@@ -12,7 +12,7 @@ INSERT INTO auth_user
     WHERE user_id != 100;
 
 -- Import all extended information except for the 'None' user (#100)
-INSERT INTO my_extendeduser
+INSERT INTO svmain_extendeduser
     (user_ptr_id, status, spamscore, authorized_keys,
      authorized_keys_count, people_view_skills, people_resume,
      timezone, theme, email_hide, gpg_key, gpg_key_count)
diff --git a/src/savane/my/admin.py b/src/savane/my/admin.py
deleted file mode 100644
index 97dad87..0000000
--- a/src/savane/my/admin.py
+++ /dev/null
@@ -1,4 +0,0 @@
-from django.contrib import admin
-from models import User
-
-admin.site.register(User)
diff --git a/src/savane/my/urls.py b/src/savane/my/urls.py
index d489385..72e07f4 100644
--- a/src/savane/my/urls.py
+++ b/src/savane/my/urls.py
@@ -22,7 +22,7 @@ from django.contrib.auth.decorators import login_required
 from django.views.generic.simple import direct_to_template
 from django.views.generic.list_detail import object_list
 import views
-import models as my_models
+import savane.svmain.models as svmain_models
 from decorator import decorator
 
 @decorator
@@ -52,6 +52,6 @@ urlpatterns = patterns ('',
   url('^conf/ssh_gpg$', views.sv_ssh_gpg),
   url('^conf/ssh_gpg$', views.sv_ssh_gpg),
   url(r'^groups/$', object_list__only_mine,
-      { 'queryset' : my_models.ExtendedGroup.objects.all() },
+      { 'queryset' : svmain_models.ExtendedGroup.objects.all() },
       name='savane.my.generic.group_list'),
 )
diff --git a/src/savane/my/views.py b/src/savane/my/views.py
index fee33d7..b7a4dcc 100644
--- a/src/savane/my/views.py
+++ b/src/savane/my/views.py
@@ -23,7 +23,7 @@ from django.http import HttpResponseRedirect
 from django.contrib.auth import authenticate, login, logout
 from django.contrib.auth.decorators import login_required
 from django import forms
-from models import ExtendedUser
+from savane.svmain.models import ExtendedUser
 
 @login_required()
 def sv_conf( request ):
diff --git a/src/savane/main/__init__.py b/src/savane/svmain/__init__.py
similarity index 100%
rename from src/savane/main/__init__.py
rename to src/savane/svmain/__init__.py
diff --git a/src/savane/svmain/admin.py b/src/savane/svmain/admin.py
new file mode 100644
index 0000000..16366ad
--- /dev/null
+++ b/src/savane/svmain/admin.py
@@ -0,0 +1,91 @@
+from django.contrib import admin
+from django.contrib.auth import admin as auth_admin
+from django.utils.translation import ugettext, ugettext_lazy as _
+import models as svmain_models
+
+class LicenseAdmin(admin.ModelAdmin):
+    list_display  = ['slug', 'pk', 'name', 'url']
+    search_fields = ['name']
+
+class DevelopmentStatusAdmin(admin.ModelAdmin):
+    list_display  = ['name', 'pk']
+    search_fields = ['name']
+
+class ExtendedUserAdmin(admin.ModelAdmin):
+    # Copy/pasted from django.contrib.auth.admin; inheritance fails
+    # when you attempt to display extended fields..
+    fieldsets = (
+        (None, {'fields': ('username', 'password')}),
+        (_('Personal info'), {'fields': ('first_name', 'last_name', 'email')}),
+        (_('Permissions'), {'fields': ('is_staff', 'is_active', 
'is_superuser', 'user_permissions')}),
+        (_('Important dates'), {'fields': ('last_login', 'date_joined')}),
+        (_('Groups'), {'fields': ('groups',)}),
+        (_('Savane'),
+         {'fields': ('status', 'spamscore',
+                     'authorized_keys', 'authorized_keys_count',
+                     'gpg_key', 'gpg_key_count',
+                     'people_view_skills', 'email_hide', 'timezone', 
'theme',)}),
+        )
+    list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff')
+    list_filter = ('is_staff', 'is_superuser')
+    search_fields = ('username', 'first_name', 'last_name', 'email')
+    ordering = ('username',)
+    filter_horizontal = ('user_permissions',)
+
+class ExtendedGroupAdmin(admin.ModelAdmin):
+    # Copy/pasted from django.contrib.auth.admin; inheritance fails
+    # when you attempt to display extended fields..
+    search_fields = ('name',)
+    ordering = ('name',)
+    filter_horizontal = ('permissions',)
+
+class GroupConfigurationAdmin(admin.ModelAdmin):
+    fieldsets = (
+        (_('General Settings'), {'fields': ('name', 'base_host', 
'description')}),
+        (_('Project WWW Homepage'),
+         {'fields': ('can_use_homepage', 'homepage_scm', 'dir_type_homepage',
+                     'dir_homepage', 'url_homepage', 
'url_cvs_viewcvs_homepage')}),
+        (_('Source Code Manager: CVS'),
+         {'fields': ('can_use_cvs', 'dir_type_cvs',
+                     'dir_cvs', 'url_cvs_viewcvs')}),
+        (_('Source Code Manager: GNU Arch'),
+         {'fields': ('can_use_arch', 'dir_type_arch',
+                     'dir_arch', 'url_arch_viewcvs')}),
+        (_('Source Code Manager: Subversion'),
+         {'fields': ('can_use_svn', 'dir_type_svn',
+                     'dir_svn', 'url_svn_viewcvs')}),
+        (_('Source Code Manager: Git'),
+         {'fields': ('can_use_git', 'dir_type_git',
+                     'dir_git', 'url_git_viewcvs')}),
+        (_('Source Code Manager: Mercurial'),
+         {'fields': ('can_use_hg', 'dir_type_hg',
+                     'dir_hg', 'url_hg_viewcvs')}),
+        (_('Source Code Manager: Bazaar'),
+         {'fields': ('can_use_bzr', 'dir_type_bzr',
+                     'dir_bzr', 'url_bzr_viewcvs')}),
+        (_('Download area'),
+         {'fields': ('can_use_download', 'dir_type_download',
+                     'dir_download', 'url_download')}),
+        (_('Licenses'), {'fields': ('can_use_license',)}),
+        (_('Development Status'), {'fields': ('can_use_devel_status',)}),
+        (_('Mailing List'),
+         {'fields': ('can_use_mailing_list', 'mailing_list_address',
+                     'mailing_list_virtual_host', 'mailing_list_format')}),
+        # TODO: finish
+        (_('News Manager'), {'fields': ('can_use_news',)}),
+        (_('Project Menu Settings'),
+         {'fields': ('is_menu_configurable_homepage',
+                     'is_menu_configurable_extralink_documentation',
+                     'is_menu_configurable_download',
+                     'is_configurable_download_dir',
+                     'is_menu_configurable_support',
+                     # ...
+                     )}),
+        
+        )
+
+admin.site.register(svmain_models.ExtendedUser, ExtendedUserAdmin)
+admin.site.register(svmain_models.ExtendedGroup, ExtendedGroupAdmin)
+admin.site.register(svmain_models.GroupConfiguration, GroupConfigurationAdmin)
+admin.site.register(svmain_models.License, LicenseAdmin)
+admin.site.register(svmain_models.DevelopmentStatus, DevelopmentStatusAdmin)
diff --git a/src/savane/my/fixtures/README b/src/savane/svmain/fixtures/README
similarity index 100%
rename from src/savane/my/fixtures/README
rename to src/savane/svmain/fixtures/README
diff --git a/src/savane/my/fixtures/developmentstatus.yaml 
b/src/savane/svmain/fixtures/developmentstatus.yaml
similarity index 56%
rename from src/savane/my/fixtures/developmentstatus.yaml
rename to src/savane/svmain/fixtures/developmentstatus.yaml
index 4400190..b4fb1ea 100644
--- a/src/savane/my/fixtures/developmentstatus.yaml
+++ b/src/savane/svmain/fixtures/developmentstatus.yaml
@@ -1,36 +1,36 @@
 - fields:
     name: '0 - Undefined'
-  model: my.developmentstatus
+  model: svmain.developmentstatus
   pk: 1
 - fields:
     name: '1 - Planning'
-  model: my.developmentstatus
+  model: svmain.developmentstatus
   pk: 2
 - fields:
     name: '2 - Pre-Alpha'
-  model: my.developmentstatus
+  model: svmain.developmentstatus
   pk: 3
 - fields:
     name: '3 - Alpha'
-  model: my.developmentstatus
+  model: svmain.developmentstatus
   pk: 4
 - fields:
     name: '4 - Beta'
-  model: my.developmentstatus
+  model: svmain.developmentstatus
   pk: 5
 - fields:
     name: '5 - Production/Stable'
-  model: my.developmentstatus
+  model: svmain.developmentstatus
   pk: 6
 - fields:
     name: '6 - Mature'
-  model: my.developmentstatus
+  model: svmain.developmentstatus
   pk: 7
 - fields:
     name: 'N/A'
-  model: my.developmentstatus
+  model: svmain.developmentstatus
   pk: 8
 - fields:
     name: '? - Orphaned/Unmaintained'
-  model: my.developmentstatus
+  model: svmain.developmentstatus
   pk: 9
diff --git a/src/savane/my/fixtures/license.yaml 
b/src/savane/svmain/fixtures/license.yaml
similarity index 84%
rename from src/savane/my/fixtures/license.yaml
rename to src/savane/svmain/fixtures/license.yaml
index 4ca3222..e964e69 100644
--- a/src/savane/my/fixtures/license.yaml
+++ b/src/savane/svmain/fixtures/license.yaml
@@ -2,87 +2,87 @@
     slug: 'gpl'
     name: 'GNU General Public License V2 or later'
     url: 'http://www.gnu.org/copyleft/gpl.html'
-  model: my.license
+  model: svmain.license
   pk: 1
 - fields:
     slug: 'lgpl'
     name: 'GNU Lesser General Public License'
     url: 'http://www.gnu.org/copyleft/lesser.html'
-  model: my.license
+  model: svmain.license
   pk: 2
 - fields:
     slug: 'fdl'
     name: 'GNU Free Documentation License'
     url: 'http://www.gnu.org/copyleft/fdl.html'
-  model: my.license
+  model: svmain.license
   pk: 3
 - fields:
     slug: 'mbsd'
     name: 'Modified BSD License'
     url: 'http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5'
-  model: my.license
+  model: svmain.license
   pk: 4
 - fields:
     slug: 'x11'
     name: 'X11 license'
     url: 'http://www.x.org/terms.htm'
-  model: my.license
+  model: svmain.license
   pk: 5
 - fields:
     slug: 'cryptix'
     name: 'Cryptix General License'
     url: 'http://www.cryptix.org/docs/license.html'
-  model: my.license
+  model: svmain.license
   pk: 6
 - fields:
     slug: 'zlib'
     name: 'The license of ZLib'
     url: 'ftp://ftp.freesoftware.com/pub/infozip/zlib/zlib_license.html'
-  model: my.license
+  model: svmain.license
   pk: 7
 - fields:
     slug: 'imatrix'
     name: 'The license of the iMatix Standard Function Library'
-  model: my.license
+  model: svmain.license
   pk: 8
 - fields:
     slug: 'w3c'
     name: 'The W3C Software Notice and License'
     url: 'http://www.w3.org/Consortium/Legal/copyright-software.html'
-  model: my.license
+  model: svmain.license
   pk: 9
 - fields:
     slug: 'berkeley'
     name: 'The Berkeley Database License'
     url: 'http://www.sleepycat.com/license.net'
-  model: my.license
+  model: svmain.license
   pk: 10
 - fields:
     slug: 'python16'
     name: 'The License of Python 1.6a2 and earlier versions'
     url: 'http://www.python.org/doc/Copyright.html'
-  model: my.license
+  model: svmain.license
   pk: 11
 - fields:
     slug: 'cartistic'
     name: 'The Clarified Artistic License'
     url: 
'http://www.statistica.unimib.it/utenti/dellavedova/software/artistic2.html'
-  model: my.license
+  model: svmain.license
   pk: 12
 - fields:
     slug: 'expat'
     name: 'Expat License (sometime refered to as MIT License)'
     url: 'http://www.gnu.org/licenses/license-list.html#Expat'
-  model: my.license
+  model: svmain.license
   pk: 13
 - fields:
     slug: 'affero'
     name: 'Affero General Public License V1 or later'
     url: 'http://www.affero.org/oagpl.html'
-  model: my.license
+  model: svmain.license
   pk: 14
 - fields:
     slug: 'website'
     name: 'WebSite Only'
-  model: my.license
+  model: svmain.license
   pk: 15
diff --git a/src/savane/my/models.py b/src/savane/svmain/models.py
similarity index 85%
rename from src/savane/my/models.py
rename to src/savane/svmain/models.py
index 74ad444..bea990f 100644
--- a/src/savane/my/models.py
+++ b/src/savane/svmain/models.py
@@ -36,7 +36,7 @@ class ExtendedUser(auth_models.User):
         ('S', 'Suspended'),
         #('SQD', 'Squad'), # TODO: implement squads more cleanly
         )
-    status = models.CharField(max_length=3)
+    status = models.CharField(max_length=3, choices=status_CHOICES)
 
     # Used by trackers only but it could be used more widely
     spamscore = models.IntegerField(null=True, blank=True)
@@ -54,10 +54,10 @@ class ExtendedUser(auth_models.User):
     people_resume = models.TextField()
 
     # Preferences - /!\ some are also in the user_preferences table
-    people_view_skills = models.IntegerField(null=True)
+    people_view_skills = models.BooleanField(default=False)
+    email_hide = models.BooleanField(default=False)
     timezone = models.CharField(max_length=192, blank=True, null=True)
     theme = models.CharField(max_length=45, blank=True, null=True)
-    email_hide = models.CharField(max_length=9, blank=True, null=True)
 
 
     # Inherit specialized models.Manager with convenience functions
@@ -74,34 +74,68 @@ class License(models.Model):
     name = models.CharField(max_length=255)
     url = models.CharField(max_length=255)
 
+    def __unicode__(self):
+        return self.slug + ": " + self.name
+
+    class Meta:
+        ordering = ['slug']
+
 class DevelopmentStatus(models.Model):
     """Describe the development status of a project"""
     name = models.CharField(max_length=255)
 
+    def __unicode__(self):
+        return self.name
+
+    class Meta:
+        ordering = ['name']
+        verbose_name_plural='Development statuses'
+
 class GroupConfiguration(models.Model):
     """Group configuration and main category (previously group_type)"""
     name = models.CharField(max_length=255)
-    # Text added to each project page
-    description = models.TextField(blank=True)
+    description = models.TextField(blank=True,
+      help_text='Will be added on each project main page')
 
     #admin_email_adress = models.CharField(max_length=128, null=True) # unused
 
     # Redirect to this host when visiting project page
     base_host = models.CharField(max_length=128, null=True)
-    # Mailing lists are hosted there
-    mailing_list_host = models.CharField(max_length=255, null=True)
+
+    # Mailing lists
+    mailing_list_address = models.CharField(max_length=255, default='@',
+      help_text='would be address@hidden for GNU projects at sv.gnu.org')
+    mailing_list_virtual_host = models.CharField(max_length=255, default='',
+      help_text='would be lists.gnu.org or lists.nongnu.org at sv.gnu.org 
[BACKEND SPECIFIC]')
+    mailing_list_format = models.CharField(max_length=255, default='%NAME',
+      help_text='With this, you can force projects to follow a specific policy'
+        + ' for the name of the %LIST. Here you should use the special 
wildcard'
+        + ' %NAME, which is the part the of the mailing list name that the'
+        + ' project admin can define (would be %PROJECT-%NAME for non-GNU'
+        + ' projects at sv.gnu.org). Do no add any @hostname here!')
+    #mailing_list_host = models.CharField(max_length=255, null=True, 
help_text='DEPRECATED')
 
     # Permissions
     can_use_homepage     = models.BooleanField(default=True)
-    can_use_download     = models.BooleanField(default=True)
+    can_use_download     = models.BooleanField(default=True,
+      help_text='This is useful if you provide directly download areas 
(created'
+        + ' by the backend) or if you want to allow projects to configure the'
+        + ' related menu entry (see below).')
     can_use_cvs          = models.BooleanField(default=True)
     can_use_arch         = models.BooleanField(default=False)
     can_use_svn          = models.BooleanField(default=False)
     can_use_git          = models.BooleanField(default=False)
     can_use_hg           = models.BooleanField(default=False)
     can_use_bzr          = models.BooleanField(default=False)
-    can_use_license      = models.BooleanField(default=True)
-    can_use_devel_status = models.BooleanField(default=True)
+    can_use_license      = models.BooleanField(default=True,
+      help_text='This is useful if you want project to select a license'
+        + ' on submission.')
+    can_use_devel_status = models.BooleanField(default=True,
+      help_text='This is useful if you want project to be able to defines 
their'
+        + ' development status that will be shown on their main page. This is'
+        + ' purely a matter of cosmetics. This option is mainly here just to'
+        + ' remove this content in case it is useless (it does not makes sense'
+        + ' for organizational projects).')
     can_use_forum        = models.BooleanField(default=False)
     can_use_mailing_list = models.BooleanField(default=True)
     can_use_patch        = models.BooleanField(default=False)
@@ -109,7 +143,8 @@ class GroupConfiguration(models.Model):
     can_use_news         = models.BooleanField(default=True)
     can_use_support      = models.BooleanField(default=True)
     can_use_bug          = models.BooleanField(default=True)
-    is_menu_configurable_homepage                = 
models.BooleanField(default=False)
+    is_menu_configurable_homepage                = 
models.BooleanField(default=False,
+                                                                       
help_text='the homepage link can be modified')
     is_menu_configurable_download                = 
models.BooleanField(default=False)
     is_menu_configurable_forum                   = 
models.BooleanField(default=False)
     is_menu_configurable_support                 = 
models.BooleanField(default=False)
@@ -131,7 +166,11 @@ class GroupConfiguration(models.Model):
     is_menu_configurable_task                    = 
models.BooleanField(default=False)
     is_menu_configurable_patch                   = 
models.BooleanField(default=False)
     is_menu_configurable_extralink_documentation = 
models.BooleanField(default=False)
-    is_configurable_download_dir                 = 
models.BooleanField(default=False)
+    is_configurable_download_dir = models.BooleanField(default=False,
+      help_text="the download _directory_ can be modified -- beware, if the"
+        + " backend is running and creating download dir, it can be used"
+        + " maliciously. don't activate this feature unless you truly know"
+        + "what you're doing")
 
     # Directory creation config
     SCM_CHOICES = (
@@ -164,7 +203,7 @@ class GroupConfiguration(models.Model):
     dir_type_bzr      = models.CharField(max_length=15, 
choices=DIR_TYPE_CHOICES, default='basicbzr')
     dir_type_homepage = models.CharField(max_length=15, 
choices=DIR_TYPE_CHOICES, default='basicdirectory')
     dir_type_download = models.CharField(max_length=15, 
choices=DIR_TYPE_CHOICES, default='basicdirectory')
-    dir_homepage = models.CharField(max_length=255, default='/'),
+    dir_homepage = models.CharField(max_length=255, default='/')
     dir_cvs      = models.CharField(max_length=255, default='/')
     dir_arch     = models.CharField(max_length=255, default='/')
     dir_svn      = models.CharField(max_length=255, default='/')
@@ -174,16 +213,16 @@ class GroupConfiguration(models.Model):
     dir_download = models.CharField(max_length=255, default='/')
 
     # Default URLs
-    url_homepage             = models.CharField(max_length=255, 
default='http://'),
-    url_download             = models.CharField(max_length=255, 
default='http://')
+    url_homepage             = models.CharField(max_length=255, 
default='http://')
+    url_cvs_viewcvs_homepage = models.CharField(max_length=255, 
default='http://')
     url_cvs_viewcvs          = models.CharField(max_length=255, 
default='http://')
     url_arch_viewcvs         = models.CharField(max_length=255, 
default='http://') 
     url_svn_viewcvs          = models.CharField(max_length=255, 
default='http://')
     url_git_viewcvs          = models.CharField(max_length=255, 
default='http://')
     url_hg_viewcvs           = models.CharField(max_length=255, 
default='http://')
     url_bzr_viewcvs          = models.CharField(max_length=255, 
default='http://')
-    url_cvs_viewcvs_homepage = models.CharField(max_length=255, 
default='http://')
-    url_mailing_list_listinfo         = models.CharField(max_length=255, 
default='http://'),
+    url_download             = models.CharField(max_length=255, 
default='http://')
+    url_mailing_list_listinfo         = models.CharField(max_length=255, 
default='http://')
     url_mailing_list_subscribe        = models.CharField(max_length=255, 
default='http://')
     url_mailing_list_unsubscribe      = models.CharField(max_length=255, 
default='http://')
     url_mailing_list_archives         = models.CharField(max_length=255, 
default='http://')
@@ -193,12 +232,7 @@ class GroupConfiguration(models.Model):
 
     # Unused
     #license_array = models.TextField()
-
-    devel_status_array = models.ForeignKey(DevelopmentStatus),
-
-    mailing_list_address = models.CharField(max_length=255, default='@'),
-    mailing_list_virtual_host = models.CharField(max_length=255, default=''),
-    mailing_list_format = models.CharField(max_length=255, default='%NAME'),
+    #devel_status_array = models.TextField()
 
     # TODO: split forum and news config
     #forum_flags     = IntegerField(default='2')
@@ -232,7 +266,7 @@ class ExtendedGroup(auth_models.Group):
         ('M', 'Maintenance (accessible only to superuser)'),
         ('I', 'Incomplete (failure during registration)'),
         )
-    status = models.CharField(max_length=1, default='A')
+    status = models.CharField(max_length=1, choices=status_CHOICES, 
default='A')
     short_description = models.CharField(max_length=255, blank=True)
     long_description = models.TextField()
     license = models.ForeignKey(License, null=True)
diff --git a/src/savane/main/urls.py b/src/savane/svmain/urls.py
similarity index 100%
rename from src/savane/main/urls.py
rename to src/savane/svmain/urls.py
diff --git a/src/settings.py b/src/settings.py
index b059ecd..fddee0f 100644
--- a/src/settings.py
+++ b/src/settings.py
@@ -90,7 +90,7 @@ INSTALLED_APPS = (
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.sites',
-#    'django.contrib.admin',
+    'django.contrib.admin',
+    'savane.svmain',
     'savane.my',
-    'savane.main',
 )
diff --git a/src/urls.py b/src/urls.py
index e396a42..fffd580 100644
--- a/src/urls.py
+++ b/src/urls.py
@@ -22,7 +22,7 @@ from django.conf import settings
 
 # Home/presentation pages
 urlpatterns = patterns('',
-  (r'', include('savane.main.urls')),
+  (r'', include('savane.svmain.urls')),
 )
 
 # User account
@@ -34,16 +34,16 @@ urlpatterns += patterns('',
   (r'^accounts/', include('django.contrib.auth.urls')),
 )
 
+# Enable the auto-admin:
+from django.contrib import admin
+admin.autodiscover()
+urlpatterns += patterns('',
+  (r'^admin/(.*)', admin.site.root),
+)
+
 # Static content
 if settings.DEBUG:
     urlpatterns += patterns('django.views.static',
         (r'^' + settings.STATIC_MEDIA_URL[1:] + '(?P<path>.*)$', 'serve',
          {'document_root' : settings.STATIC_MEDIA_ROOT, 'show_indexes' : 
True}),
     )
-
-# Uncomment the next lines to enable the admin:
-# from django.contrib import admin
-# admin.autodiscover()
-# urlpatterns += patterns(
-#   (r'^admin/(.*)', admin.site.root),
-# )

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

Summary of changes:
 MIGRATION.txt                                      |    9 ++
 migrate_old_savane.sql                             |    2 +-
 src/savane/my/admin.py                             |    4 -
 src/savane/my/urls.py                              |    4 +-
 src/savane/my/views.py                             |    2 +-
 src/savane/{main => svmain}/__init__.py            |    0
 src/savane/svmain/admin.py                         |   91 ++++++++++++++++++++
 src/savane/{my => svmain}/fixtures/README          |    0
 .../{my => svmain}/fixtures/developmentstatus.yaml |   18 ++--
 src/savane/{my => svmain}/fixtures/license.yaml    |   30 +++---
 src/savane/{my => svmain}/models.py                |   82 +++++++++++++-----
 src/savane/{main => svmain}/urls.py                |    0
 src/settings.py                                    |    4 +-
 src/urls.py                                        |   16 ++--
 14 files changed, 196 insertions(+), 66 deletions(-)
 create mode 100644 MIGRATION.txt
 delete mode 100644 src/savane/my/admin.py
 rename src/savane/{main => svmain}/__init__.py (100%)
 create mode 100644 src/savane/svmain/admin.py
 rename src/savane/{my => svmain}/fixtures/README (100%)
 rename src/savane/{my => svmain}/fixtures/developmentstatus.yaml (56%)
 rename src/savane/{my => svmain}/fixtures/license.yaml (84%)
 rename src/savane/{my => svmain}/models.py (85%)
 rename src/savane/{main => svmain}/urls.py (100%)


hooks/post-receive
-- 
Savane-cleanup framework




reply via email to

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