Changeset 8788 for mauRepo/dj_security


Ignore:
Timestamp:
19/08/13 14:01:13 (6 years ago)
Author:
mnagni
Message:

Removes the mezzanine dependance so can use the last cedatheme_mf54

Location:
mauRepo/dj_security/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/dj_security/trunk/dj_security/__init__.py

    r8723 r8788  
    1 __version__ = '0.0.2' 
     1__version__ = '0.0.3' 
  • mauRepo/dj_security/trunk/dj_security/settings.py

    r8778 r8788  
    1 ###################### 
    2 # MEZZANINE SETTINGS # 
    3 ###################### 
    4  
    5 # The following settings are already defined with default values in 
    6 # the ``defaults.py`` module within each of Mezzanine's apps, but are 
    7 # common enough to be put here, commented out, for convenient 
    8 # overriding. Please consult the settings documentation for a full list 
    9 # of settings Mezzanine implements: 
    10 # http://mezzanine.jupo.org/docs/configuration.html#default-settings 
    11  
    12 # Controls the ordering and grouping of the admin menu. 
    13 # 
    14 # ADMIN_MENU_ORDER = ( 
    15 #     ("Content", ("pages.Page", "blog.BlogPost", 
    16 #        "generic.ThreadedComment", ("Media Library", "fb_browse"),)), 
    17 #     ("Site", ("sites.Site", "redirects.Redirect", "conf.Setting")), 
    18 #     ("Users", ("auth.User", "auth.Group",)), 
    19 # ) 
    20  
    21 # A three item sequence, each containing a sequence of template tags 
    22 # used to render the admin dashboard. 
    23 # 
    24 # DASHBOARD_TAGS = ( 
    25 #     ("blog_tags.quick_blog", "mezzanine_tags.app_list"), 
    26 #     ("comment_tags.recent_comments",), 
    27 #     ("mezzanine_tags.recent_actions",), 
    28 # ) 
    29  
    30 # A sequence of templates used by the ``page_menu`` template tag. Each 
    31 # item in the sequence is a three item sequence, containing a unique ID 
    32 # for the template, a label for the template, and the template path. 
    33 # These templates are then available for selection when editing which 
    34 # menus a page should appear in. Note that if a menu template is used 
    35 # that doesn't appear in this setting, all pages will appear in it. 
    36  
    37 # PAGE_MENU_TEMPLATES = ( 
    38 #     (1, "Top navigation bar", "pages/menus/dropdown.html"), 
    39 #     (2, "Left-hand tree", "pages/menus/tree.html"), 
    40 #     (3, "Footer", "pages/menus/footer.html"), 
    41 # ) 
    42  
    43 # A sequence of fields that will be injected into Mezzanine's (or any 
    44 # library's) models. Each item in the sequence is a four item sequence. 
    45 # The first two items are the dotted path to the model and its field 
    46 # name to be added, and the dotted path to the field class to use for 
    47 # the field. The third and fourth items are a sequence of positional 
    48 # args and a dictionary of keyword args, to use when creating the 
    49 # field instance. When specifying the field class, the path 
    50 # ``django.models.db.`` can be omitted for regular Django model fields. 
    51 # 
    52 # EXTRA_MODEL_FIELDS = ( 
    53 #     ( 
    54 #         # Dotted path to field. 
    55 #         "mezzanine.blog.models.BlogPost.image", 
    56 #         # Dotted path to field class. 
    57 #         "somelib.fields.ImageField", 
    58 #         # Positional args for field class. 
    59 #         ("Image",), 
    60 #         # Keyword args for field class. 
    61 #         {"blank": True, "upload_to": "blog"}, 
    62 #     ), 
    63 #     # Example of adding a field to *all* of Mezzanine's content types: 
    64 #     ( 
    65 #         "mezzanine.pages.models.Page.another_field", 
    66 #         "IntegerField", # 'django.db.models.' is implied if path is omitted. 
    67 #         ("Another name",), 
    68 #         {"blank": True, "default": 1}, 
    69 #     ), 
    70 # ) 
    71  
    72 # Setting to turn on featured images for blog posts. Defaults to False. 
    73 # 
    74 # BLOG_USE_FEATURED_IMAGE = True 
    75  
    76 # If True, the south application will be automatically added to the 
    77 # INSTALLED_APPS setting. 
    78 USE_SOUTH = True 
    79  
    80  
    811######################## 
    822# MAIN DJANGO SETTINGS # 
     
    13757) 
    13858 
    139 AUTHENTICATION_BACKENDS = ("mezzanine.core.auth_backends.MezzanineBackend",) 
     59#AUTHENTICATION_BACKENDS = ("mezzanine.core.auth_backends.MezzanineBackend",) 
    14060 
    14161# List of finder classes that know how to find static files in 
     
    230150    'django.contrib.humanize', 
    231151    'registration',     
    232     'django_authopenid',         
    233     "mezzanine.boot", 
    234     "mezzanine.conf", 
    235     "mezzanine.core", 
    236     "mezzanine.generic", 
    237     "mezzanine.blog", 
    238     "mezzanine.forms", 
    239     "mezzanine.pages", 
    240     "mezzanine.galleries",     
    241     "mezzanine.twitter", 
    242     "django_authopenid", 
     152    'django_authopenid', 
    243153    "dj_security", 
    244     #"mezzanine.accounts", 
    245     #"mezzanine.mobile", 
    246154    "cookielaw", 
    247155) 
     
    259167    "django.core.context_processors.request", 
    260168    "django.core.context_processors.tz", 
    261     'django_authopenid.context_processors.authopenid',     
    262     "mezzanine.conf.context_processors.settings",     
     169    'django_authopenid.context_processors.authopenid',         
    263170) 
    264171 
     
    267174# response phase the middleware will be applied in reverse order. 
    268175MIDDLEWARE_CLASSES = ( 
    269     "mezzanine.core.middleware.UpdateCacheMiddleware", 
    270176    "django.contrib.sessions.middleware.SessionMiddleware", 
    271177    "django.contrib.auth.middleware.AuthenticationMiddleware", 
     178    "django.middleware.doc.XViewMiddleware", 
    272179    "django.contrib.redirects.middleware.RedirectFallbackMiddleware", 
    273180    "django.middleware.common.CommonMiddleware", 
    274181    "django.middleware.csrf.CsrfViewMiddleware", 
    275182    "django.contrib.messages.middleware.MessageMiddleware", 
    276     "mezzanine.core.request.CurrentRequestMiddleware", 
    277     "mezzanine.core.middleware.TemplateForDeviceMiddleware", 
    278     "mezzanine.core.middleware.TemplateForHostMiddleware", 
    279     "mezzanine.core.middleware.AdminLoginInterfaceSelectorMiddleware", 
    280     "mezzanine.core.middleware.SitePermissionMiddleware", 
    281     # Uncomment the following if using any of the SSL settings: 
    282     # "mezzanine.core.middleware.SSLRedirectMiddleware", 
    283     "mezzanine.pages.middleware.PageMiddleware", 
    284     "mezzanine.core.middleware.FetchFromCacheMiddleware", 
    285183    'django_authopenid.middleware.OpenIDMiddleware', 
    286184    'dj_security.middleware.DJS_Middleware', 
     
    290188# at the moment we are using custom forks of them. 
    291189PACKAGE_NAME_FILEBROWSER = "filebrowser_safe" 
    292 PACKAGE_NAME_GRAPPELLI = "grappelli_safe" 
     190#PACKAGE_NAME_GRAPPELLI = "grappelli_safe" 
    293191 
    294192######################### 
     
    301199    "django_extensions", 
    302200    "compressor", 
    303     PACKAGE_NAME_FILEBROWSER, 
    304     PACKAGE_NAME_GRAPPELLI, 
     201#    PACKAGE_NAME_FILEBROWSER, 
     202#    PACKAGE_NAME_GRAPPELLI, 
    305203) 
    306204 
     
    391289except ImportError: 
    392290    pass 
    393  
    394  
    395 #################### 
    396 # DYNAMIC SETTINGS # 
    397 #################### 
    398  
    399 # set_dynamic_settings() will rewrite globals based on what has been 
    400 # defined so far, in order to provide some better defaults where 
    401 # applicable. We also allow this settings module to be imported 
    402 # without Mezzanine installed, as the case may be when using the 
    403 # fabfile, where setting the dynamic settings below isn't strictly 
    404 # required. 
    405 try: 
    406     from mezzanine.utils.conf import set_dynamic_settings 
    407 except ImportError: 
    408     pass 
    409 else: 
    410     set_dynamic_settings(globals()) 
  • mauRepo/dj_security/trunk/dj_security/templates/security_base.html

    r8779 r8788  
    1 {% extends "base_no_sidebar_basic.html" %} 
     1{% extends "base_no_sidebar.html" %} 
    22 
    33{% block userstatus %} 
     
    1515        </style> 
    1616 
    17  
    1817                <ul class="cedauser">                    
    1918                        <!--  Link to MyCEDA  --> 
  • mauRepo/dj_security/trunk/dj_security/urls.py

    r8741 r8788  
    22from django.contrib import admin 
    33 
    4 from mezzanine.core.views import direct_to_template 
    54from django.conf import settings 
    65from dj_security.views.dj_security_login import signin, CEDAAuthenticationForm,\ 
     
    4140    # one out. 
    4241 
    43     url("^$", direct_to_template, {"template": "index.html"}, name="home"), 
    4442 
    4543    # HOMEPAGE AS AN EDITABLE PAGE IN THE PAGE TREE 
     
    9896    # need to use the ``SITE_PREFIX`` setting as well. 
    9997 
    100     ("^%s/" % settings.SITE_PREFIX, include("mezzanine.urls")), 
    10198    url(r'^account/signin/$', signin, name='user_signin',  
    10299        kwargs={'auth_form':CEDAAuthenticationForm,  
     
    107104    #(r'^locally_logged_in/$', 'locally_logged_in'), 
    108105    url(r'^account/', include('django_authopenid.urls')),     
    109  
    110106) 
    111107 
    112 # Adds ``STATIC_URL`` to the context of error pages, so that error 
    113 # pages can use JS, CSS and images. 
    114 handler404 = "mezzanine.core.views.page_not_found" 
    115 handler500 = "mezzanine.core.views.server_error" 
    116 #urlpatterns += patterns('dj_security.views.dj_security_login', 
    117 #    (r'^login$', 'login'), 
    118 #) 
    119  
    120 #url(r'^register/$', oid_views.register, name='user_register'), 
    121  
    122 #urlpatterns += patterns('dj_security.views.my_profile', 
    123 #    (r'^account/signin/$', 'frontpage'), 
    124 #) 
  • mauRepo/dj_security/trunk/dj_security/views/dj_security_login.py

    r8776 r8788  
    208208            messages.add_message(request, messages.WARNING, msg) 
    209209            LOGGER.warn(msg) 
    210             return HttpResponseRedirect(request.environ['HTTP_REFERER'])                         
     210            return response                         
    211211    elif SESSION_KEY in request.session: 
    212212        response = HttpResponseRedirect(redirect_url) 
  • mauRepo/dj_security/trunk/setup.py

    r8784 r8788  
    4545    # ------------------------------------------------ 
    4646    install_requires = ['psycopg2', 
    47                         'Django==1.4.5',                         
    48                         'mezzanine', 
     47                        'Django==1.4.5', 
    4948                        'Paste==1.7.5.1', 
    5049                        'cedatheme_mf54', 
Note: See TracChangeset for help on using the changeset viewer.