Permalink
Browse files

Added django-registration as an AppHook example. It shows how theoret…

…ically any Django app can be used in CMS.
  • Loading branch information...
1 parent e6d7b90 commit 8398e7d87db168d88c74968d164ce6db387ebbc0 @zgohr committed Apr 26, 2012
Showing with 22 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +9 −0 app/base/cms_app.py
  3. +8 −0 app/base/templates/registration/registration_form.html
  4. +3 −0 app/settings/base.py
  5. +1 −0 requirements/prod.txt
View
@@ -4,3 +4,4 @@ mycms.db
local.py
app/static/
app/base/static/css/style.css
+build/
View
@@ -0,0 +1,9 @@
+from cms.app_base import CMSApp
+from cms.apphook_pool import apphook_pool
+from django.utils.translation import ugettext_lazy as _
+
+class RegistrationApp(CMSApp):
+ name = _("Registration") # give your app a name, this is required
+ urls = ["registration.backends.default.urls"] # link your app to url configuration(s)
+
+apphook_pool.register(RegistrationApp) # register your app
@@ -0,0 +1,8 @@
+{% extends "template_1.html" %}
+
+{% block base_content %}
+<form action="">{% csrf_token %}
+{{ form.as_p }}
+<input type="submit" value="Submit">
+</form>
+{% endblock base_content %}
@@ -125,6 +125,7 @@
'django.contrib.markup',
'django.contrib.humanize',
'django.contrib.staticfiles',
+ 'registration',
'cms',
'menus',
'mptt',
@@ -141,6 +142,8 @@
'app.base',
)
+ACCOUNT_ACTIVATION_DAYS = 7
+
PASSWORD_HASHERS = (
'django.contrib.auth.hashers.BCryptPasswordHasher',
'django.contrib.auth.hashers.PBKDF2PasswordHasher',
@@ -1,4 +1,5 @@
Django==1.4
+django-registration==0.8
# The key to this whole project until Django-CMS releases for the Django 1.4 upgrade
git+git://github.com/tback/django-cms.git@django_1.4_compatibility/here_be_dragons#egg=django-cms

0 comments on commit 8398e7d

Please sign in to comment.