Permalink
Browse files

* Pre release 1.4.6

 * Added copyright note in almost all files
 * Added GPLv3 in COPYING file
 * cleaned code to compliant PEP-8
 * cleaned code for pylint and pyflakes
 * fix minor bug in access_account.views
 * removed generic_utils.autologin superseded from
   access_account with backends.TokenBackend
 * renamed send_mail.views to send_mail.__init__
 * added adaptive wsgi.py to project_template
 * better setup.py to install also project_template
 * added debian/changelog.git to reintroduce debian/changelog
  • Loading branch information...
1 parent 9c8cf56 commit 923d512c7c8fb8b6122cc736090efafd69b8dda0 Marco Bardelli committed Dec 2, 2012
Showing with 2,806 additions and 1,653 deletions.
  1. +674 −0 COPYING
  2. +60 −0 debian/changelog.git
  3. +24 −0 debian/copyright
  4. +0 −34 debian/patch_for_lucid.diff
  5. +33 −10 debian/rules
  6. +23 −1 django-admin-aderit
  7. +24 −1 django/contrib/aderit/__init__.py
  8. +27 −0 django/contrib/aderit/access_account/__init__.py
  9. +60 −33 django/contrib/aderit/access_account/backends.py
  10. +0 −225 django/contrib/aderit/access_account/forms.py
  11. +45 −5 django/contrib/aderit/access_account/models.py
  12. +39 −6 django/contrib/aderit/access_account/tokens.py
  13. +182 −96 django/contrib/aderit/access_account/views.py
  14. +27 −1 django/contrib/aderit/generic_utils/__init__.py
  15. +45 −17 django/contrib/aderit/generic_utils/actions.py
  16. +0 −1 django/contrib/aderit/generic_utils/autologin/__init__.py
  17. +0 −15 django/contrib/aderit/generic_utils/autologin/admin.py
  18. +0 −32 django/contrib/aderit/generic_utils/autologin/models.py
  19. +0 −67 django/contrib/aderit/generic_utils/autologin/utils.py
  20. +0 −190 django/contrib/aderit/generic_utils/autologin/views.py
  21. +67 −27 django/contrib/aderit/generic_utils/forms/__init__.py
  22. +36 −7 django/contrib/aderit/generic_utils/forms/fields.py
  23. +69 −28 django/contrib/aderit/generic_utils/middleware.py
  24. +24 −1 django/contrib/aderit/generic_utils/models/__init__.py
  25. +26 −4 django/contrib/aderit/generic_utils/models/fields.py
  26. +27 −0 django/contrib/aderit/generic_utils/templatetags/__init__.py
  27. +73 −45 django/contrib/aderit/generic_utils/templatetags/breadcrumb.py
  28. +47 −23 django/contrib/aderit/generic_utils/templatetags/currentsitetags.py
  29. +46 −14 django/contrib/aderit/generic_utils/templatetags/currentusergroupstags.py
  30. +29 −2 django/contrib/aderit/generic_utils/templatetags/nice_name.py
  31. +32 −8 django/contrib/aderit/generic_utils/templatetags/order_by.py
  32. +407 −403 django/contrib/aderit/generic_utils/templatetags/smart_if.py
  33. +12 −8 django/contrib/aderit/generic_utils/templatetags/truncatesmart.py
  34. +24 −20 django/contrib/aderit/generic_utils/templatetags/usertags.py
  35. +103 −29 django/contrib/aderit/generic_utils/views/__init__.py
  36. +7 −9 django/contrib/aderit/news/admin.py
  37. +15 −10 django/contrib/aderit/news/models.py
  38. +16 −7 django/contrib/aderit/news/templatetags/news_tags.py
  39. +17 −7 django/contrib/aderit/news/urls.py
  40. +205 −0 django/contrib/aderit/send_mail/__init__.py
  41. +34 −8 django/contrib/aderit/send_mail/admin.py
  42. +58 −23 django/contrib/aderit/send_mail/models.py
  43. +74 −29 django/contrib/aderit/send_mail/utils.py
  44. +0 −161 django/contrib/aderit/send_mail/views.py
  45. +5 −3 project_template/account/admin.py
  46. +11 −13 project_template/account/models.py
  47. +6 −3 project_template/account/views.py
  48. +32 −22 project_template/settings.py
  49. +2 −2 project_template/urls.py
  50. +23 −0 project_template/wsgi.py
  51. +16 −3 setup.py
View
674 COPYING

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,60 @@
+django-contrib-aderit (1.4.6~pre) veryunstable; urgency=low
+
+ * NMU: Pre release 1.4.6
+ * debian/rules: temporary symlink some moved pymodules
+ * debian/rules: do not override_dh_install, setup.py do all
+ * added debian/copyright
+ * git rev: 716aa89afdfecf0d6690ba13fb1757ed8ee2be9d
+ * temporary added debian/changelog.git to git branch copyright-added
+ to reintroduce debian/changelog in git, maybe using autoconf
+
+ -- Marco Bardelli <marco.bardelli@aderit.it> Mon, 03 Dec 2012 01:58:53 +0100
+
+django-contrib-aderit (1.4.5) unstable; urgency=low
+
+ * NMU: New release
+ * fix senf_mail in bulk
+ * generic_utils middlware reorganized
+
+ -- Marco Bardelli <marco.bardelli@aderit.it> Fri, 30 Nov 2012 10:33:30 +0100
+
+django-contrib-aderit (1.4.4.1) unstable; urgency=low
+
+ * NMU: New minor release bugfix in SignupView
+
+ -- Marco Bardelli <marco.bardelli@aderit.it> Mon, 19 Nov 2012 13:49:52 +0100
+
+django-contrib-aderit (1.4.4) unstable; urgency=low
+
+ * NMU: bump version
+ * added lintian-overrides
+ * several improvement in access_account
+ * fix send_mail
+ * some fix breadcrumb
+
+ -- Marco Bardelli <marco.bardelli@aderit.it> Thu, 08 Nov 2012 11:06:15 +0100
+
+django-contrib-aderit (1.4.3.3) unstable; urgency=low
+ * New minor release
+ * [FIX] generic_formclass_factory
+
+ -- Marco Bardelli <marco.bardelli@aderit.it> Wed, 07 Nov 2012 13:23:49 +0100
+
+django-contrib-aderit (1.4.3.2) veryunstable; urgency=low
+
+ * New minor release
+
+ -- Marco Bardelli <marco.bardelli@aderit.it> Wed, 07 Nov 2012 13:06:39 +0100
+
+django-contrib-aderit (1.4.3.1) veryunstable; urgency=low
+
+ * Fix syntax error in access_account/backends.py
+
+ -- Marco Bardelli <marco.bardelli@aderit.it> Wed, 07 Nov 2012 12:05:46 +0100
+
+django-contrib-aderit (1.4.3) veryunstable; urgency=low
+
+ * Fix send_mail error
+ * Improve access_account SignupView
+
+ -- Marco Bardelli <marco.bardelli@aderit.it> Wed, 07 Nov 2012 11:50:22 +0100
View
@@ -0,0 +1,24 @@
+DjangoContribAderit -- Extensions to Django by Aderit
+
+Copyright (C) 2012 Aderit srl
+
+Authors: Marco Bardelli <marco.bardelli@aderit.it>, <bardelli.marco@gmail.com>
+ Matteo Atti <matteo.atti@aderit.it>, <attuch@gmail.com>
+
+This file is part of DjangoContribAderit.
+
+DjangoContribAderit is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+DjangoContribAderit 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 General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with DjangoContribAderit. If not, see <http://www.gnu.org/licenses/>.
+
+Please see `/usr/share/common-licenses/GPL' for the full text of
+the license.
@@ -1,34 +0,0 @@
-Questa patch va applicata per buildare con debhelper < 9 che non supporta dh_python2 addon (es: su lucid o squeeze)
-Per buildare su lucid o squeeze, eseguire dalla cartella radice del progetto:
-$ patch -p1 <debian/patch_for_lucid.diff && dch -v X.Y.Z "unreleased" && debuild -us -uc
-Nel repo apt non dovrebbero essere uploadati pacchetti buildati con debhelper < 9.
-Usando "dh --with python2" il codice viene installato in una posizione standard compatibile con qualsiasi distro.
-Su lucid e squeeze viene installato nelle gerarchie 'pymodules' incompatibili con versioni + nuove.
-
-diff --git a/debian/rules b/debian/rules
-index b116cd2..c5ca8e5 100755
---- a/debian/rules
-+++ b/debian/rules
-@@ -5,8 +5,13 @@ export DH_VERBOSE = 1
- ov=$(shell dpkg-parsechangelog | grep ^Version | cut -d' ' -f2 | cut -d'-' -f1)
- pn=$(shell dpkg-parsechangelog | grep ^Source | cut -d' ' -f2)
-
--override_dh_python2:
-- dh_python2 --skip-private
-+#override_dh_auto_install:
-+# NO_CHECK_MODULES=1 python setup.py install --root=$(CURDIR)/debian/tmp/ --install-layout=deb --no-compile
-+
-+override_dh_pysupport:
-+ dh_pysupport -X project_template
-+# #cp -rf django/contrib/aderit/generic_utils/templates django/contrib/aderit/generic_utils/templatetags debian/python-django-contrib-aderit/usr/share/pyshared/django/contrib/aderit/generic_utils/
-+# #cp -rf django/contrib/aderit/access_account/templates debian/python-django-contrib-aderit/usr/share/pyshared/django/contrib/aderit/access_account/
-
- override_dh_install:
- dh_testdir
-@@ -18,5 +23,5 @@ override_dh_install:
- chmod +x debian/python-django-contrib-aderit/usr/bin/django-admin-aderit
-
- %:
-- dh $@ --with python2
-+ dh $@
-
View
@@ -8,16 +8,39 @@ pn=$(shell dpkg-parsechangelog | grep ^Source | cut -d' ' -f2)
override_dh_python2:
dh_python2 --skip-private
-override_dh_install:
- dh_testdir
- dh_testroot
- dh_install
- -mkdir -p debian/python-django-contrib-aderit/usr/share/python-django-contrib-aderit debian/python-django-contrib-aderit/usr/bin
- cp -rf project_template debian/python-django-contrib-aderit/usr/share/python-django-contrib-aderit/
- cp -f django-admin-aderit debian/python-django-contrib-aderit/usr/bin
- chmod +x debian/python-django-contrib-aderit/usr/bin/django-admin-aderit
-
-
+## temporary fix incompatible changes introduced in 1.4.6
+## (needed for ULISSE and UDA)
+py26_libdir = usr/lib/python2.6/$(call py_sitename, 2.6)
+py27_libdir = usr/lib/python2.7/$(call py_sitename, 2.7)
+pyshared_dir = usr/share/pyshared
+g_utils = django/contrib/aderit/generic_utils
+send_mail_path = django/contrib/aderit/send_mail
+override_dh_link:
+ dh_link -v \
+ $(pyshared_dir)/$(g_utils)/middleware.py \
+ $(pyshared_dir)/$(g_utils)/currentUserMiddleware.py \
+ $(pyshared_dir)/$(g_utils)/middleware.py \
+ $(pyshared_dir)/$(g_utils)/langMiddleware.py \
+ $(pyshared_dir)/$(g_utils)/middleware.py \
+ $(pyshared_dir)/$(g_utils)/mobileMiddleware.py \
+ $(pyshared_dir)/$(send_mail_path)/__init__.py \
+ $(pyshared_dir)/$(send_mail_path)/views.py \
+ $(py26_libdir)/$(g_utils)/middleware.py \
+ $(py26_libdir)/$(g_utils)/currentUserMiddleware.py \
+ $(py26_libdir)/$(g_utils)/middleware.py \
+ $(py26_libdir)/$(g_utils)/langMiddleware.py \
+ $(py26_libdir)/$(g_utils)/middleware.py \
+ $(py26_libdir)/$(g_utils)/mobileMiddleware.py \
+ $(py26_libdir)/$(send_mail_path)/__init__.py \
+ $(py26_libdir)/$(send_mail_path)/views.py \
+ $(py27_libdir)/$(g_utils)/middleware.py \
+ $(py27_libdir)/$(g_utils)/currentUserMiddleware.py \
+ $(py27_libdir)/$(g_utils)/middleware.py \
+ $(py27_libdir)/$(g_utils)/langMiddleware.py \
+ $(py27_libdir)/$(g_utils)/middleware.py \
+ $(py27_libdir)/$(g_utils)/mobileMiddleware.py \
+ $(py27_libdir)/$(send_mail_path)/__init__.py \
+ $(py27_libdir)/$(send_mail_path)/views.py
git-orig-source:
-rm -rf $(pn)-$(ov)
View
@@ -1,9 +1,31 @@
#!/bin/sh
+# django-admin-aderit -- bootstrap a django project
+#
+# Copyright (C) 2012 Aderit srl
+#
+# Author: Marco Bardelli <marco.bardelli@aderit.it>, <bardelli.marco@gmail.com>
+#
+# This file is part of DjangoContribAderit.
+#
+# DjangoContribAderit is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# DjangoContribAderit 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with DjangoContribAderit. If not, see <http://www.gnu.org/licenses/>.
+
set -e
oldpwd="$OLDPWD"
with_git=no
group_for_share=${SHARE_FOR_GROUP:-tecnici}
+prj_template_root=${DJANGO_PROJECT_TEMPLATE_ROOT:-/usr/share/python-django-contrib-aderit}
usage ()
{
@@ -105,7 +127,7 @@ NAME="$2"
case "$CMD" in
startproject)
test -n "$NAME" || usage 1
- cp -rf /usr/share/python-django-contrib-aderit/project_template "$NAME"
+ cp -rf $prj_template_root/project_template "$NAME"
SECRET=`pwgen -s -y 54 1 | sed -e "s_[\"']_+_g"`
sed -i -e "s,@PROJECT@,$NAME,g" -e "s'@SECRET@'$SECRET'g" "$NAME"/settings.py
touch "$NAME"/__init__.py
@@ -1 +1,24 @@
-__doc__ = '''Django Contrib Aderit, several utilities to reuse in aderit web development.'''
+# django.contrib.aderit -- python module
+#
+# Copyright (C) 2012 Aderit srl
+#
+# Author: Marco Bardelli <marco.bardelli@aderit.it>, <bardelli.marco@gmail.com>
+#
+# This file is part of DjangoContribAderit.
+#
+# DjangoContribAderit is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# DjangoContribAderit 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with DjangoContribAderit. If not, see <http://www.gnu.org/licenses/>.
+'''
+Django Contrib Aderit, several utilities to reuse in aderit web development.
+'''
+__copyright__ = '''Copyright (C) 2012 Aderit srl'''
@@ -1,8 +1,35 @@
+# pylint: disable-msg=C0301,C0103
+# -*- coding: utf-8 -*-
+# vim: set fileencoding=utf-8 :
+# django.contrib.aderit.access_account -- python module for auth management
+#
+# Copyright (C) 2012 Aderit srl
+#
+# Author: Marco Bardelli <marco.bardelli@aderit.it>, <bardelli.marco@gmail.com>
+#
+# This file is part of DjangoContribAderit.
+#
+# DjangoContribAderit is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# DjangoContribAderit 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with DjangoContribAderit. If not, see <http://www.gnu.org/licenses/>.
+'''User profile management'''
+__copyright__ = '''Copyright (C) 2012 Aderit srl'''
+
from django.conf import settings
from django.contrib.auth.models import SiteProfileNotAvailable
from django.utils.translation import ugettext as _
from django.db.models.loading import get_model
+
def _get_model_from_auth_profile_module():
"""
Get model for UserProfile.
Oops, something went wrong.

0 comments on commit 923d512

Please sign in to comment.