Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
Added django-registration as an AppHook example. It shows how theoret…
Browse files Browse the repository at this point in the history
…ically any Django app can be used in CMS.
  • Loading branch information
zgohr committed Apr 26, 2012
1 parent e6d7b90 commit 8398e7d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,3 +4,4 @@ mycms.db
local.py local.py
app/static/ app/static/
app/base/static/css/style.css app/base/static/css/style.css
build/
9 changes: 9 additions & 0 deletions app/base/cms_app.py
@@ -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
8 changes: 8 additions & 0 deletions app/base/templates/registration/registration_form.html
@@ -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 %}
3 changes: 3 additions & 0 deletions app/settings/base.py
Expand Up @@ -125,6 +125,7 @@
'django.contrib.markup', 'django.contrib.markup',
'django.contrib.humanize', 'django.contrib.humanize',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'registration',
'cms', 'cms',
'menus', 'menus',
'mptt', 'mptt',
Expand All @@ -141,6 +142,8 @@
'app.base', 'app.base',
) )


ACCOUNT_ACTIVATION_DAYS = 7

PASSWORD_HASHERS = ( PASSWORD_HASHERS = (
'django.contrib.auth.hashers.BCryptPasswordHasher', 'django.contrib.auth.hashers.BCryptPasswordHasher',
'django.contrib.auth.hashers.PBKDF2PasswordHasher', 'django.contrib.auth.hashers.PBKDF2PasswordHasher',
Expand Down
1 change: 1 addition & 0 deletions requirements/prod.txt
@@ -1,4 +1,5 @@
Django==1.4 Django==1.4
django-registration==0.8


# The key to this whole project until Django-CMS releases for the Django 1.4 upgrade # 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 git+git://github.com/tback/django-cms.git@django_1.4_compatibility/here_be_dragons#egg=django-cms
Expand Down

0 comments on commit 8398e7d

Please sign in to comment.