Merge branch 'master' into funding
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 10 Apr 2013 08:00:34 +0000 (10:00 +0200)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 10 Apr 2013 08:01:17 +0000 (10:01 +0200)
Conflicts:
requirements.txt

1  2 
apps/wolnelektury_core/templates/superbase.html
requirements.txt
wolnelektury/settings/__init__.py
wolnelektury/settings/basic.py
wolnelektury/settings/locale.py
wolnelektury/settings/static.py
wolnelektury/urls.py

@@@ -2,7 -2,7 +2,7 @@@
  <html lang="{{ LANGUAGE_CODE }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
        {% load cache compressed i18n %}
        {% load static from staticfiles %}
 -    {% load catalogue_tags reporting_stats sponsor_tags %}
 +    {% load catalogue_tags funding_tags reporting_stats sponsor_tags %}
      <head>
          <meta charset="utf-8">
          <meta name="application-name" content="Wolne Lektury" />
@@@ -50,8 -50,8 +50,8 @@@
              <div id="tagline">
                  <span>
                  {% cache 60 tagline LANGUAGE_CODE %}
-                     {% url book_list as b %}
-                     {% url infopage 'prawa' as r %}
+                     {% url 'book_list' as b %}
+                     {% url 'infopage' 'prawa' as r %}
                          {% count_books book_count %}
                      {% blocktrans count book_count as c %}
                      <a href='{{b}}'>{{c}}</a> free reading you have <a href='{{r}}'>right to</a>
                  {% if user.is_authenticated %}
                      {% trans "Welcome" %}, 
                        <span class="hidden-box-wrapper">
-                               <a href="{% url user_settings %}" class="hidden-box-trigger">
+                               <a href="{% url 'user_settings' %}" class="hidden-box-trigger">
                                        <strong>{{ user.username }}</strong>
                                </a>
                                <span id="user-menu" class="hidden-box">
-                                       <a href="{% url account_set_password %}">{% trans "Password" %}</a><br/>
-                                       <a href="{% url account_email %}">{% trans "E-mail" %}</a><br/>
-                                       <a href="{% url socialaccount_connections %}">{% trans "Social accounts" %}</a><br/>
+                                       <a href="{% url 'account_set_password' %}">{% trans "Password" %}</a><br/>
+                                       <a href="{% url 'account_email' %}">{% trans "E-mail" %}</a><br/>
+                                       <a href="{% url 'socialaccount_connections' %}">{% trans "Social accounts" %}</a><br/>
                                </span>
                        </span>
-                     | <a href="{% url social_my_shelf %}" id="user-shelves-link">{% trans "My shelf" %}</a>
+                     | <a href="{% url 'social_my_shelf' %}" id="user-shelves-link">{% trans "My shelf" %}</a>
                      {% if user.is_staff %}
                      | <a href="/admin/">{% trans "Administration" %}</a>
                      {% endif %}
-                     | <a href="{% url logout %}?next={% block logout %}{{ request.get_full_path }}{% endblock %}">{% trans "Logout" %}</a>
+                     | <a href="{% url 'logout' %}?next={% block logout %}{{ request.get_full_path }}{% endblock %}">{% trans "Logout" %}</a>
                  {% else %}
-                     <a href="{% url login %}?next={{ request.path }}"
+                     <a href="{% url 'login' %}?next={{ request.path }}"
                          id="login" class="ajaxable">
                              {% trans "Sign in" %}</a>
                      /
-                     <a href="{% url register %}?next={{ request.path }}"
+                     <a href="{% url 'register' %}?next={{ request.path }}"
                          id="register" class="ajaxable">
                              {% trans "Register" %}</a>
                  {% endif %}
  
  
  
-             <form id="search-area" action="{% url search %}" class="hidelabels">
+             <form id="search-area" action="{% url 'search' %}" class="hidelabels">
                  
                  <div id="search-field" class="grid-line">
                        <label for="search">{{search_form.q.label}}</label>
          </div>
  
  
 -
          <div id="main-content">
 -
 +            {% funding link=1 %}
              <div id="nav-line">
                  {% catalogue_menu %}
  
                      {% trans "Language versions" %}</span>
                  <div id="lang-menu-items">
                  {% for lang in LANGUAGES %}
-                     <form action="{% url django.views.i18n.set_language %}" method="post">
+                     <form action="{% url 'django.views.i18n.set_language' %}" method="post">
                      {% csrf_token %}
                      <input type="hidden" name="language" value="{{ lang.0 }}" />
                      <button type="submit"
          {% compressed_js "base" %}
  
          {{ piwik_tag|safe }}
-         <script type="text/javascript">
-         var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-         document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-         </script>
-         <script type="text/javascript">
-         var pageTracker = _gat._getTracker("UA-2576694-1");
-         pageTracker._trackPageview();
-         </script>
  
                {% block extrabody %}
                {% endblock %}
diff --combined requirements.txt
@@@ -2,21 -2,22 +2,25 @@@
  --find-links=http://www.pythonware.com/products/pil/
  
  # django
- Django>=1.4,<1.5
+ Django>=1.5,<1.6
+ fnpdjango>=0.1.6,<0.2
  South>=0.7 # migrations for django
 -django-pipeline>=1.2,<1.3
 +django-pipeline>=1.2.24,<1.3
  django-pagination>=1.0
  django-maintenancemode>=0.10
- django-piston>=0.2.2,<0.2.3
- #django-jsonfield
- -e git+git://github.com/bradjasper/django-jsonfield.git@2f427368ad70bf8d9a0580df58ec0eb0654d62ae#egg=django-jsonfield
+ django-piston>=0.2.2.1,<0.2.3
+ django-jsonfield>=0.9,<0.10
  django-picklefield
- #django-allauth>=0.4,<0.5
- # version of django-allauth 0.4 with install script fixed
- -e git+git://github.com/pennersr/django-allauth.git@3a03db9b2ecca370af228df367bd8fa52afea5ea#egg=django-allauth
+ #django-allauth<0.10 with migration fix
+ -e git+git://github.com/rczajka/django-allauth.git@4ecda71b81f9311dea4febe1d2d0105f23c642c7#egg=django-allauth
 +pytz
 +pyScss
 +
+ # Some contrib apps still need it
+ simplejson
  django-honeypot
  django-uni-form
  
@@@ -50,4 -51,3 +54,3 @@@ pyoa
  
  egenix-mx-base
  sunburnt
@@@ -2,14 -2,14 +2,14 @@@
  # Django settings for wolnelektury project.
  from os import path
  
- from settings.basic import *
- from settings.auth import *
- from settings.cache import *
- from settings.celery import *
- from settings.contrib import *
- from settings.custom import *
- from settings.locale import *
- from settings.static import *
+ from .basic import *
+ from .auth import *
+ from .cache import *
+ from .celery import *
+ from .contrib import *
+ from .custom import *
+ from .locale import *
+ from .static import *
  
  
  TEMPLATE_CONTEXT_PROCESSORS = (
@@@ -20,8 -20,9 +20,9 @@@
      'django.core.context_processors.request',
      'wolnelektury_core.context_processors.extra_settings',
      'search.context_processors.search_form',
-     "allauth.context_processors.allauth",
      "allauth.account.context_processors.account",
+     "allauth.socialaccount.context_processors.socialaccount",
  )
  
  MIDDLEWARE_CLASSES = [
@@@ -38,7 -39,7 +39,7 @@@
      'django.middleware.common.CommonMiddleware',
      'django.middleware.cache.FetchFromCacheMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
-     'realip_middleware.SetRemoteAddrFromXRealIP',
+     'fnpdjango.middleware.SetRemoteAddrFromXRealIP',
  ]
  
  ROOT_URLCONF = 'wolnelektury.urls'
@@@ -66,7 -67,6 +67,7 @@@ INSTALLED_APPS_OUR = 
      'waiter',
      'search',
      'oai',
 +    'funding',
      ]
  
  INSTALLED_APPS_CONTRIB = [
      #'django_nose',
  
      #allauth stuff
-     'emailconfirmation',
      'uni_form',
      'allauth',
      'allauth.account',
      'allauth.socialaccount',
-     'allauth.openid',
-     #'allauth.facebook',
-     #'allauth.twitter',
+     'allauth.socialaccount.providers.openid',
+     'allauth.socialaccount.providers.facebook',
+     #'allauth.socialaccount.providers.twitter',
  
      # included
      'modeltranslation',
@@@ -108,7 -107,6 +108,6 @@@ INSTALLED_APPS = INSTALLED_APPS_OUR + I
  
  # Load localsettings, if they exist
  try:
-     from localsettings import *
+     from wolnelektury.localsettings import *
  except ImportError:
      pass
@@@ -1,5 -1,5 +1,5 @@@
  from os import path
- from settings.paths import PROJECT_DIR
+ from .paths import PROJECT_DIR
  
  DEBUG = False
  TEMPLATE_DEBUG = DEBUG
@@@ -30,7 -30,6 +30,7 @@@ SOLR_TEST = "http://localhost:8983/solr
  # If running in a Windows environment this must be set to the same as your
  # system time zone.
  TIME_ZONE = 'Europe/Warsaw'
 +USE_TZ = True
  
  SITE_ID = 1
  
@@@ -1,11 -1,10 +1,11 @@@
  # -*- coding: utf-8 -*-
  from os import path
- from settings.paths import PROJECT_DIR
+ from .paths import PROJECT_DIR
  
  # If you set this to False, Django will make some optimizations so as not
  # to load the internationalization machinery.
  USE_I18N = True
 +USE_L10N = True
  
  LOCALE_PATHS = [
      path.join(PROJECT_DIR, 'locale-contrib')
@@@ -1,5 -1,5 +1,5 @@@
  from os import path
- from settings.paths import PROJECT_DIR
+ from .paths import PROJECT_DIR
  
  # Absolute path to the directory that holds media.
  # Example: "/home/media/media.lawrence.com/"
@@@ -30,8 -30,6 +30,8 @@@ PIPELINE_CSS = 
              'css/catalogue.css',
              'sponsors/css/sponsors.css',
              'css/auth.css',
 +            'funding/funding.scss',
 +            'css/form.scss',
  
              'css/social/shelf_tags.css',
              'css/ui-lightness/jquery-ui-1.8.16.custom.css',
@@@ -122,9 -120,3 +122,9 @@@ PIPELINE_JS = 
  STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
  PIPELINE_CSS_COMPRESSOR = None
  PIPELINE_JS_COMPRESSOR = None
 +
 +PIPELINE_COMPILERS = (
 +    'pyscss_compiler.PySCSSCompiler',
 +)
 +PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
 +PIPELINE_PYSCSS_ARGUMENTS = ''
diff --combined wolnelektury/urls.py
@@@ -26,7 -26,6 +26,6 @@@ urlpatterns = patterns('wolnelektury_co
  
  urlpatterns += patterns('',
      url(r'^katalog/', include('catalogue.urls')),
-     #url(r'^materialy/', include('lessons.urls')),
      url(r'^opds/', include('opds.urls')),
      url(r'^sugestia/', include('suggest.urls')),
      url(r'^lesmianator/', include('lesmianator.urls')),
@@@ -36,7 -35,6 +35,7 @@@
      url(r'^ludzie/', include('social.urls')),
      url(r'^uzytkownik/', include('allauth.urls')),
      url(r'^czekaj/', include('waiter.urls')),
 +    url(r'^fund/', include('funding.urls')),
  
      # Admin panel
      url(r'^admin/catalogue/book/import$', 'catalogue.views.import_book', name='import_book'),