from django.utils.safestring import mark_safe
-class ContactAdminMeta(admin.ModelAdmin.__metaclass__):
+class ContactAdminMeta(admin.ModelAdmin.__class__):
def __getattr__(cls, name):
if name.startswith('admin_list_'):
return lambda self: ""
from django.contrib.sites.models import Site
+from django.core.exceptions import ValidationError
from django.core.files.uploadedfile import UploadedFile
from django.core.mail import send_mail, mail_managers
-from django.core.validators import email_re
+from django.core.validators import validate_email
from django import forms
from django.template.loader import render_to_string
from django.template import RequestContext
contact_forms = {}
admin_list_width = 0
-class ContactFormMeta(forms.Form.__metaclass__):
+class ContactFormMeta(forms.Form.__class__):
def __new__(cls, *args, **kwargs):
global admin_list_width
model = super(ContactFormMeta, cls).__new__(cls, *args, **kwargs)
mail_managers(mail_managers_subject, mail_managers_body,
fail_silently=True)
- if email_re.match(contact.contact):
+ try:
+ validate_email(contact.contact)
+ except ValidationError:
+ pass
+ else:
mail_subject = render_to_string([
'contact/%s/mail_subject.txt' % self.form_tag,
'contact/mail_subject.txt',
-from django.conf.urls.defaults import *
+from django.conf.urls import patterns, url
from . import views
urlpatterns = patterns('contact.views',
'chunks',
'sponsors',
- 'gravatar',
+ 'django_gravatar',
'south',
'django.contrib.comments',
'django_comments_xtd',
'haystack',
'pagination',
'sorl.thumbnail',
- 'piwik.django',
+ 'piwik',
'django_cas',
'django.contrib.auth',
if 'django_cas' in INSTALLED_APPS:
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
- 'django_cas.backends.CASBackend',
+ 'fnpdjango.auth_backends.AttrCASBackend',
)
MIDDLEWARE_CLASSES += (
'django.contrib.messages.middleware.MessageMiddleware',
- 'piwik.django.middleware.PiwikMiddleware',
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
'pagination.middleware.PaginationMiddleware',
GRAVATAR_DEFAULT_IMAGE = 'http://localhost:8000/static/img/avatar.png'
-CAS_SERVER_URL = 'http://logowanie.nowoczesnapolska.org.pl/cas/'
-CAS_VERSION = '1'
+CAS_SERVER_URL = 'https://logowanie.nowoczesnapolska.org.pl/cas/'
+CAS_VERSION = '3'
SPONSORS_THUMB_HEIGHT = None
+
+PIWIK_URL = ''
+PIWIK_SITE_ID = 0
<!DOCTYPE html>
-{% load url from future %}
{% load i18n %}
{% load static from staticfiles %}
{% load fnp_common migdal_tags fnp_share fnp_lang menu_tags %}
{% load sponsor_tags %}
{% load compressed %}
+{% load piwik_tags %}
<html prefix="og: http://ogp.me/ns#">
<head>
<title>{% block "titleextra" %}{% endblock %}CopyCamp</title>
</div>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js" charset="utf-8"></script>
{% compressed_js 'base' %}
- {{ piwik_tag|safe }}
+ {% tracking_code %}
</body>
</html>
-Django>=1.4,<1.5
-#django_cas
--e hg+https://bitbucket.org/cpcc/django-cas@197f156ee943#egg=django_cas
+-i http://pypi.nowoczesnapolska.org.pl/simple
+
+Django>=1.6,<1.7
+fnpdjango
+django_cas>=2.1,<2.2
South>=0.7.4
PIL
sorl-thumbnail>=11.09,<12
django-pagination
+django-migdal>=0.4,<0.5
+pytz
--e git+git://github.com/fnp/fnpdjango.git@9a5b05c52311da4f726fec29d8be7d173f695352#egg=fnpdjango
--e git+git://github.com/fnp/django-migdal.git@734cd58d3f12c5397b42c1ae122c947500386014#egg=django-migdal
-
-#django-jsonfield
--e git+git://github.com/bradjasper/django-jsonfield.git@2f427368ad70bf8d9a0580df58ec0eb0654d62ae#egg=django-jsonfield
-
--e git+git://github.com/fnp/django-migdal.git@734cd58d3f12c5397b42c1ae122c947500386014#egg=django-migdal
+jsonfield>=0.9.20
textile
-django-markupfield<1.1 # 1.1 wants Django-1.5
-django-gravatar
-django_comments_xtd
+django-markupfield>=1.2,<1.3
+django-gravatar2
+django-comments-xtd>=1.2,<1.3
django-pipeline>=1.2,<1.3
#pyScss
#git+git://github.com/Kronuz/pyScss.git@d8f4da23a3c87696a75b3830ed4ab49b75550a93#egg=pyScss
#TODO: pyScss support, for now just install sass
--e git+https://github.com/toastdriven/django-haystack.git@master#egg=django-haystack
+django-haystack>=2.1,<2.2
pysolr
-piwik
+django-piwik
--e git+https://github.com/fnp/django-sponsors.git@master#egg=django-sponsors
+django-sponsors