Package: django-frontendadmin
WarningThis package is not in active development. It’s likely not functional
with the latest Python and/or Django version. If you like to take over
the project please contact me.django-frontendadmindjango-frontendadmin is a set of templatetags to allow an easy and unobstrusive
way to edit model-data in the frontend of your page.Example projectThis package provides an easy example project, a weblog with comments. Here is
a quick step-by-step guide how to get this running quickly:Open your terminal and cd to thedjango-frontendadmin/example_project/directory.$ ./manage.py syncdband create a superuser.$ ./manage.py runserverand point your browser tohttp://127.0.0.1:8000/admin/.Authenticate yourself with the username/password you provided in step 2.Go to the frontpagehttp://127.0.0.1:8000/and start playing.Put some beer in your fridge and call me. :-)Quick installation instructionPutfrontendadminin yourINSTALLED_APPSin the settings.py of your
django project.Adddjango.core.context_processors.requestto yourTEMPLATE_CONTEXT_PROCESSORSin the settings.py of your django project. If this is not available (default since
some days) put this snippet into your settings:TEMPLATE_CONTEXT_PROCESSORS = (
    'django.core.context_processors.request',
    'django.core.context_processors.auth',
    'django.core.context_processors.debug',
    'django.core.context_processors.i18n',
    'django.core.context_processors.media',
)Include frontendadmin urls in your urlsconf:(r'^frontendadmin/', include('frontendadmin.urls')),Load thefrontendadmin_tagslibrary in every template you want to use
the frontendamin links. (see below):{% load frontendadmin_tags %}There are three templatetags to either create, change or delete objects:{% frontendadmin_add queryset_of_objects label_for_link %}
{% frontendadmin_change object_to_change label_for_link %}
{% frontendadmin_delete object_to_delete label_for_link %}Assumed that you have a weblog application and using generic-views, your
template might look so:{% for entry in object_list %}
<div>
  <h2>{{ entry.title }}</h2>
  {{ entry.body }}
<div>
{% endfor %}A proper implementation of frontendadmin would be:{% frontendadmin_add object_list %}
{% for entry in object_list %}
<div>
  <h2>{{ entry.title }}</h2>
  {{ entry.body }}
  {% frontendadmin_change entry %}
  {% frontendadmin_delete entry %}
<div>
{% endfor %}Custom labels can be used as the last argument to any tag:{% frontendadmin_add object_list 'Post an entry' %}
{% for entry in object_list %}
<div>
  <h2>{{ entry.title }}</h2>
  {{ entry.body }}
  {% frontendadmin_change entry 'Edit this entry' %}
  {% frontendadmin_delete entry 'Remove it permanently' %}
<div>
{% endfor %}Thats all. Frontendadmin will automatically check whether the current user has
add/change/delete permissions for the given model.Frontendadmin has build-in ajax support using the jquery library. See the
template-sources for details.Custom ConfigurationAdmin forms will be used if registered with the model you are trying to use. If you have
a model admin calledEntryAdminregistered withdjango.contrib.admin.sitethen
frontendadmin will use any form associated with, specified inEntryAdmin.Meta.form.You can also set which forms will be used for a specific model. The forms may
be in your codebase, or anywhere on your python path. This is handy for custom widgets
like split datetime fields and WYSIWYG editors. Set the following settings
directives to see custom forms in action:FRONTEND_FORMS = {
    'blog.entry': 'blog.forms.EntryForm',
}In this example, theentrymodel in theblogapp will be rendered with
theEntryFormwithin theblog.formsmodule. The key for the
dictionary isapp_label.model_nameand must be all lower case.
The value of the dictionary ismodule_name.form_classand must match
the capitalization of the actual module.You may define which fields to include or exclude on a per model basis
from inside your settings. Here is a snippet that blocks a user from being
able to change theuserfield on their profile and limits them to only
information that they should be able to edit:FRONTEND_EXCLUDES = {
    'profiles.userprofile': ('user',)
}
FRONTEND_INCLUDES = {
    'profiles.userprofile': ('address1','address2','avatar')
}This will include theaddress1,address2, andavatarfields
and exclude theuserfield from the form. Notice the key for both
dictionaries isapp_label.model_nameand must be all lower case.Custom form templates will be used by default if they exist. For a model
namedentryin the appblogthe frontendadmin will try to usefrontendadmin/blog_entry_form.htmlfor the full form andfrontendadmin/blog_entry_form_ajax.htmlfor the ajax form. If they do not exist, the defaults will be used.LicenseThe application is licensed under theNew BSD License. See the LICENSE File
for details.