Changeset 369:f98caac01351


Ignore:
Timestamp:
19/03/11 20:52:49 (2 years ago)
Author:
nicoechaniz <nico@…>
Branch:
default
Message:

updated layout middleware. updated some spanish translation for Contacts.

Location:
cyclope
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • cyclope/apps/contacts/admin.py

    r368 r369  
    4545    list_filter = CollectibleAdmin.list_filter + ('gender', ) 
    4646    list_display = ('given_name', 'surname', 'gender', 'email', 'web', 'mobile_phone_number') 
     47    search_fields = ('given_name', 'surname', 'email', 'web', 'mobile_phone_number') 
    4748 
    4849    fieldsets = ( 
  • cyclope/apps/contacts/forms.py

    r350 r369  
    2323from django import forms 
    2424from django.forms.extras.widgets import SelectDateWidget 
     25from django.utils.translation import ugettext_lazy as _ 
    2526 
    2627from models import Contact 
     
    3031 
    3132class ContactForm(forms.ModelForm): 
    32     birth_date = forms.DateField(widget=SelectDateWidget(years=range(1900, actual_year)), required=False) 
     33    birth_date = forms.DateField(label=_('Birth date'), widget=SelectDateWidget(years=range(1900, actual_year)), required=False) 
    3334 
    3435    class Meta: 
  • cyclope/default_settings.py

    r368 r369  
    3737SITE_ID = 1 
    3838USE_I18N = True 
    39 #USE_L10N = True 
    40  
    41 LANGUAGE_CODE = 'es' 
     39USE_L10N = True 
     40 
     41## LANGUAGE_CODE = 'en' 
    4242LANGUAGES = ( 
    4343    ('es', u'Español'), 
  • cyclope/locale/es/LC_MESSAGES/django.po

    r368 r369  
    55"Project-Id-Version: PACKAGE VERSION\n" 
    66"Report-Msgid-Bugs-To: \n" 
    7 "POT-Creation-Date: 2011-03-19 19:09-0300\n" 
     7"POT-Creation-Date: 2011-03-19 19:50-0300\n" 
    88"PO-Revision-Date: 2010-10-29 22:16\n" 
    99"Last-Translator: <a@a.com>\n" 
     
    638638msgstr "Más" 
    639639 
     640#: apps/contacts/forms.py:33 
     641#: apps/contacts/templates/contacts/contact_detail.html:55 
     642msgid "Birth date" 
     643msgstr "Fecha de nacimiento" 
     644 
    640645#: apps/contacts/frontend_views.py:38 
    641646msgid "detailed view of the selected Contact" 
     
    721726msgid "Surname" 
    722727msgstr "Apellido" 
    723  
    724 #: apps/contacts/templates/contacts/contact_detail.html:55 
    725 msgid "Birth date" 
    726 msgstr "Fecha de nacimiento" 
    727728 
    728729#: apps/contacts/templates/contacts/contact_detail.html:56 
  • cyclope/locale/fr/LC_MESSAGES/django.po

    r368 r369  
    99"Project-Id-Version: PACKAGE VERSION\n" 
    1010"Report-Msgid-Bugs-To: \n" 
    11 "POT-Creation-Date: 2011-03-19 19:09-0300\n" 
     11"POT-Creation-Date: 2011-03-19 19:50-0300\n" 
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 
     
    636636msgstr "" 
    637637 
     638#: apps/contacts/forms.py:33 
     639#: apps/contacts/templates/contacts/contact_detail.html:55 
     640msgid "Birth date" 
     641msgstr "" 
     642 
    638643#: apps/contacts/frontend_views.py:38 
    639644msgid "detailed view of the selected Contact" 
     
    718723#: apps/contacts/templates/contacts/contact_detail.html:54 
    719724msgid "Surname" 
    720 msgstr "" 
    721  
    722 #: apps/contacts/templates/contacts/contact_detail.html:55 
    723 msgid "Birth date" 
    724725msgstr "" 
    725726 
  • cyclope/locale/it/LC_MESSAGES/django.po

    r368 r369  
    99"Project-Id-Version: PACKAGE VERSION\n" 
    1010"Report-Msgid-Bugs-To: \n" 
    11 "POT-Creation-Date: 2011-03-19 19:09-0300\n" 
     11"POT-Creation-Date: 2011-03-19 19:50-0300\n" 
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 
     
    636636msgstr "" 
    637637 
     638#: apps/contacts/forms.py:33 
     639#: apps/contacts/templates/contacts/contact_detail.html:55 
     640msgid "Birth date" 
     641msgstr "" 
     642 
    638643#: apps/contacts/frontend_views.py:38 
    639644msgid "detailed view of the selected Contact" 
     
    718723#: apps/contacts/templates/contacts/contact_detail.html:54 
    719724msgid "Surname" 
    720 msgstr "" 
    721  
    722 #: apps/contacts/templates/contacts/contact_detail.html:55 
    723 msgid "Birth date" 
    724725msgstr "" 
    725726 
  • cyclope/locale/pt/LC_MESSAGES/django.po

    r368 r369  
    99"Project-Id-Version: PACKAGE VERSION\n" 
    1010"Report-Msgid-Bugs-To: \n" 
    11 "POT-Creation-Date: 2011-03-19 19:09-0300\n" 
     11"POT-Creation-Date: 2011-03-19 19:50-0300\n" 
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 
     
    635635msgstr "" 
    636636 
     637#: apps/contacts/forms.py:33 
     638#: apps/contacts/templates/contacts/contact_detail.html:55 
     639msgid "Birth date" 
     640msgstr "" 
     641 
    637642#: apps/contacts/frontend_views.py:38 
    638643msgid "detailed view of the selected Contact" 
     
    717722#: apps/contacts/templates/contacts/contact_detail.html:54 
    718723msgid "Surname" 
    719 msgstr "" 
    720  
    721 #: apps/contacts/templates/contacts/contact_detail.html:55 
    722 msgid "Birth date" 
    723724msgstr "" 
    724725 
  • cyclope/middleware.py

    r358 r369  
    3030    def process_request(self, request): 
    3131        menu_item = cyclope.utils.menu_item_for_request(request) 
     32        default_template = cyclope.settings.CYCLOPE_DEFAULT_TEMPLATE 
    3233        if menu_item: 
    33             default_template = cyclope.settings.CYCLOPE_DEFAULT_TEMPLATE 
    3434            ## we force the layout for items with custom URL (external apps) 
    3535            ## so they can use the correct template to extend from 
     
    3737                layout = menu_item.get_layout() 
    3838                request.session['layout'] = layout 
     39                request.session['layout_template'] = layout.get_template_path() 
     40                 
    3941            else: 
    4042                if request.session.has_key('layout'): 
    4143                    del request.session['layout'] 
     44        else: 
     45            ## if no layout_template has been set we set it to the default so external apps' 
     46            ## templates will work (sort of) even when accessed through a direct URL 
     47            if not 'layout_template' in request.session: 
     48                request.session['layout_template'] = default_template 
    4249 
    4350                 
Note: See TracChangeset for help on using the changeset viewer.