Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade econsensus to use django 1 7 #237

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 15 additions & 21 deletions deploy/pip_packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,40 @@ virtualenv
-e git+git://github.com/aptivate/dye.git@0ebe0738bbfda715caeeb95e7e18f7463adf714c#egg=dye

# core django
Django==1.4.19
Django==1.7.4
django-markup-deprecated==0.0.3
mysql-python==1.2.3
South==0.7.5

django-tinymce==1.5.1a2
-e git+https://github.com/aljosa/django-tinymce.git@f80966cef06851a6b351293e8a92ca0c623ef3f5#egg=django-tinymce
mechanize==0.2.5
django-floppyforms==0.4.5
django-floppyforms==1.3.0
lxml==2.2.4
BeautifulSoup==3.2.0
git+git://github.com/jdunck/python-unicodecsv.git
django-tagging==0.3.1
hg+https://bitbucket.org/bkroeze/django-livesettings
django-keyedcache==1.4-6
django-registration==1.0
django-tagging==0.3.6
-e hg+https://bitbucket.org/aptivate/django-livesettings#egg=django-livesettings
django-keyedcache==1.5.1
django-registration-redux==1.1
-e ../django/django-organizations
git+git://github.com/aptivate/django-notification.git@emails-with-headers
git+git://github.com/birdsarah/django-actionitems.git
django-guardian==1.1.1
git+git://github.com/daniell/django-actionitems.git
django-guardian==1.3
django-remember_me==0.2d0
django-parsley==0.0.2a0
django-waffle==0.9.1
django-waffle==0.10.1
django-contrib-comments
Markdown==2.3.1
-e git+git://github.com/aptivate/aptivate-monkeypatch.git@ed4f821d8d57ba181c418b8d78dfd8bca70d6817#egg=aptivate_monkeypatch

# for search
django-haystack==2.1.0
django-haystack==2.3.1
requests==1.2.3
simplejson==3.3.0
pyelasticsearch==0.6
Whoosh==2.5.4

# for testing
factory-boy==2.1.1
factory-boy==2.3.1
MiniMock==1.2.8
mock==1.0.1
selenium==2.34.0
Expand All @@ -46,11 +47,4 @@ django-selenium==0.9.6
pytz==2013d

# only required for developer machines
django-debug-toolbar==0.9.4

# TODO: remove when bug fix release is available
# working around bug
# https://bitbucket.org/logilab/astroid/issue/3/error-after-upgrade-to-pylint-10
astroid==1.2.1
# pylint 1.4 does not support python 2.6, so until we upgrade to 2.7 we need
pylint<1.3
django-debug-toolbar==1.3.0
2 changes: 1 addition & 1 deletion django/econsensus/custom_comments/forms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.contrib.comments.forms import CommentForm, COMMENT_MAX_LENGTH
from django_comments.forms import CommentForm, COMMENT_MAX_LENGTH
from django.utils.translation import ungettext, ugettext_lazy as _
from django import forms
from parsley.decorators import parsleyfy
Expand Down
2 changes: 1 addition & 1 deletion django/econsensus/custom_organizations/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.conf.urls.defaults import patterns, include, url
from django.conf.urls import patterns, url, include
from django.contrib.auth.decorators import login_required
from views import (OrganizationAdminView,
CustomOrganizationCreate,
Expand Down
36 changes: 19 additions & 17 deletions django/econsensus/econsensus/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
'NAME': '', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}

Expand All @@ -45,7 +45,7 @@
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-GB'

#Need to figure out what this means...
# Need to figure out what this means...
SITE_ID = 1

# If you set this to False, Django will make some optimizations so as not
Expand Down Expand Up @@ -86,7 +86,7 @@
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
#'django.contrib.staticfiles.finders.DefaultStorageFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

# Make this unique, and don't share it with anybody.
Expand All @@ -96,7 +96,7 @@
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
#'django.template.loaders.eggs.Loader',
# 'django.template.loaders.eggs.Loader',
)

MIDDLEWARE_CLASSES = (
Expand Down Expand Up @@ -139,10 +139,9 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.comments',
'django_comments',
'django.contrib.flatpages',
'django.contrib.markup',
'south',
'markup_deprecated',
'registration',
'waffle',
'notification',
Expand Down Expand Up @@ -279,17 +278,20 @@ def skip_suspicious_operations(record):

EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'

#Emails from organizations will be built around this address
# Emails from organizations will be built around this address
DEFAULT_FROM_EMAIL = '[email protected]'

#Required for djangoregistration:
# Required for djangoregistration:
ACCOUNT_ACTIVATION_DAYS = 7

#using custom comments app
# using custom comments app
COMMENTS_APP = 'custom_comments'

#Requirements for django-keyedcache, which is a requirement of django-livesettings.
CACHE_PREFIX = str(SITE_ID)
# Requirements for django-keyedcache, which is a requirement of django-livesettings.
CACHES = {'default': {
'KEY_PREFIX': str(SITE_ID),
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
}}
CACHE_TIMEOUT = 0
import logging
logging.getLogger('keyedcache').setLevel(logging.INFO)
Expand All @@ -309,7 +311,7 @@ def skip_suspicious_operations(record):

#--------------------------------
# local settings import
#from http://djangosnippets.org/snippets/1873/
# from http://djangosnippets.org/snippets/1873/
#--------------------------------
try:
import local_settings
Expand Down
4 changes: 2 additions & 2 deletions django/econsensus/econsensus/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.conf.urls.defaults import patterns, include, url
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.core.urlresolvers import reverse_lazy
Expand All @@ -17,7 +17,7 @@
url(r'^admin/', include(admin.site.urls), name='admin'),
url(r'^settings/', include('livesettings.urls')),
url(r'^notification/', include('notification.urls')),
url(r'^comments/', include('django.contrib.comments.urls')),
url(r'^comments/', include('django_comments.urls')),
url(r'^organizations/', include('custom_organizations.urls')),
url(r'^invitations/', include(invitation_backend().get_urls())),
# the pages adds a / at the start, so don't put the / after pages
Expand Down
12 changes: 9 additions & 3 deletions django/econsensus/publicweb/forms.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Create your forms here.

from django import forms
from models import Decision, Feedback
from django.contrib.auth.models import User


Expand All @@ -15,9 +14,12 @@
additional_message_required, send_decision_notifications

from parsley.decorators import parsleyfy

from actionitems.forms import ActionItemCreateForm, ActionItemUpdateForm
from notification.models import ObservedItem
from publicweb.extra_models import MAIN_ITEMS_NOTIFICATIONS_ONLY
from actionitems.models import ActionItem

from models import Decision, Feedback


class YourDetailsForm(forms.ModelForm):
Expand All @@ -41,6 +43,10 @@ def clean_email(self):


class NotificationsForm(forms.ModelForm):
class Meta:
model = ObservedItem
fields = ()

watch = forms.BooleanField(
required=False,
label=_("Watch this conversation"),
Expand Down Expand Up @@ -151,4 +157,4 @@ class Meta:
exclude = ('user', 'organization')
widgets = {
'notification_level': RadioSelect
}
}
Loading