Changeset 2070

Show
Ignore:
Timestamp:
06/25/09 14:55:31 (8 months ago)
Author:
JensDiemer
Message:

starting to add a pylucid admin menu...

Location:
branches/0.9/pylucid_project
Files:
10 added
4 modified

Legend:

Unmodified
Added
Removed
  • branches/0.9/pylucid_project/apps/pylucid/templates/admin/base_site.html

    r2058 r2070  
    6767<ul class="sf-menu"> 
    6868    <li class="current"> 
    69         <a href="/">&lt;&lt; back to "/" root page</a> 
     69        <a href="/" title="<< goto {{ current_site.name }} root page">&lt;&lt; {{ current_site.domain }}</a> 
    7070    </li> 
    7171    {% if not sites|length_is:"1" %} 
     
    8888    {% endif %} 
    8989    <li> 
    90         <a href="#TODO">{% trans 'admin menu' %}</a> 
     90        <a href="{% url admin_index %}">{% trans 'Django admin site' %}</a> 
    9191    </li> 
    9292    {% if user.is_superuser %} 
    9393    <li> 
    94         <a href="{% url PyLucidUpdate-menu %}">{% trans 'update section' %}</a> 
     94        <a href="{% url PyLucidAdmin-menu %}">{% trans 'PyLucid admin menu' %}</a> 
     95        <ul> 
     96                    <li> 
     97                        <a href="{% url PyLucidUpdate-menu %}">{% trans 'update section' %}</a> 
     98                    </li> 
     99            </ul> 
    95100    </li> 
    96101    {% endif %} 
  • branches/0.9/pylucid_project/pylucid_plugins/__init__.py

    r1890 r2070  
    1111    """ 
    1212    _CACHE = None 
    13      
     13 
    1414    def __init__(self, fs_path, pkg_prefix): 
    1515        installed_apps = () 
     
    2121            if not os.path.isdir(item_path): 
    2222                continue 
    23              
     23 
    2424            pkg_string = ".".join([pkg_prefix, dir_item]) 
    2525            installed_apps += (pkg_string,) 
    26              
     26 
    2727            template_path = os.path.join(item_path, "templates") 
    2828            if os.path.isdir(template_path): 
    2929                template_dirs += (template_path,) 
    30              
     30 
     31#            admin_url_file = os.path.join(item_path, "admin_url.py") 
     32#            if os.path.isfile(admin_url_file): 
     33#                admin_urls.append(pkg_string + ".admin_url") 
     34 
    3135        self._CACHE = { 
    3236            "installed_apps": installed_apps, 
    3337            "template_dirs": template_dirs, 
    3438        } 
    35                  
     39 
    3640    def get_installed_apps(self): 
    3741        return self._CACHE["installed_apps"] 
    3842    def get_template_dirs(self): 
    39         return self._CACHE["template_dirs"]     
     43        return self._CACHE["template_dirs"] 
  • branches/0.9/pylucid_project/settings.py

    r2043 r2070  
    7070    SITE_ID = 1 
    7171 
    72 print "Used port is %s -> set SITE_ID: %s" % (_used_port, SITE_ID)     
     72print "Used port is %s -> set SITE_ID: %s" % (_used_port, SITE_ID) 
    7373 
    7474 
     
    7979    # From http://code.google.com/p/django-tools/ 
    8080    'django_tools.middlewares.ThreadLocal.ThreadLocalMiddleware', 
    81      
     81 
    8282    'django.contrib.sessions.middleware.SessionMiddleware', 
    8383    'django.middleware.locale.LocaleMiddleware', 
    8484    'django.middleware.common.CommonMiddleware', 
    8585    'django.contrib.auth.middleware.AuthenticationMiddleware', 
    86      
     86 
    8787    'pylucid_project.middlewares.PageMessages.PageMessagesMiddleware', 
    88      
     88 
    8989    # slow down the django developer server 
    9090    # From http://code.google.com/p/django-tools/ 
     
    9696 
    9797_plugins = pylucid_plugins.PluginList( 
    98     fs_path = os.path.join(_BASE_PATH, "pylucid_plugins"), 
    99     pkg_prefix = "pylucid_project.pylucid_plugins" 
     98    fs_path=os.path.join(_BASE_PATH, "pylucid_plugins"), 
     99    pkg_prefix="pylucid_project.pylucid_plugins" 
    100100) 
    101101 
    102102TEMPLATE_DIRS = ( 
    103103    os.path.join(_BASE_PATH, "apps/pylucid/templates/"), 
     104    os.path.join(_BASE_PATH, "apps/pylucid_admin/templates/"), 
    104105    os.path.join(_BASE_PATH, "apps/pylucid_update/templates/"), 
    105      
     106 
    106107    os.path.join(_BASE_PATH, "apps/dbpreferences/templates/"), 
    107108 
     
    140141#    from django_tools.template import warn_invalid_template_vars 
    141142#    warn_invalid_template_vars.add_warning() 
    142      
     143 
    143144 
    144145 
     
    165166#http://docs.djangoproject.com/en/dev/ref/settings/#setting-TEST_RUNNER 
    166167#Default: 'django.test.simple.run_tests' 
    167 TEST_RUNNER='pylucid_project.tests.test_tools.test_runner.run_tests' 
     168TEST_RUNNER = 'pylucid_project.tests.test_tools.test_runner.run_tests' 
    168169 
    169170#_____________________________________________________________________________ 
     
    220221# TODO: must be used ;) 
    221222SLUG_BLACKLIST = ( 
    222     MEDIA_URL.strip("/").split("/",1)[0], 
     223    MEDIA_URL.strip("/").split("/", 1)[0], 
    223224    ADMIN_URL_PREFIX, PYLUCID.HEAD_FILES_URL_PREFIX, 
    224225) 
  • branches/0.9/pylucid_project/urls.py

    r2020 r2070  
    2828    #_____________________________________ 
    2929    # PYLUCID UPDATE SECTION 
    30     ('^%s/update/'% settings.ADMIN_URL_PREFIX, include('pylucid_update.urls')), 
    31      
     30    ('^%s/update/' % settings.ADMIN_URL_PREFIX, include('pylucid_update.urls')), 
     31 
     32    #_____________________________________ 
     33    # PYLUCID ADMIN 
     34    (r'^%s/' % settings.ADMIN_URL_PREFIX, include('pylucid_admin.urls')), 
     35 
    3236    #_____________________________________ 
    3337    # DJANGO ADMIN PANEL