Package: django-reusableapps
ContentsInstallationPutting it togetherUsing templates from egg-based Django appsAdding support fordjango-reusableappsto your own Django appCreating egg files of reuasable Django appsSupportThis is yet another approach on enabling Django to load reusable, pluggable,
egg-based applications without changing the Django sourcecode. Think of
plugins or components, e.g. django-registration, django-threadedcomments or
django-tagging.It uses setuptools for finding, handling and loading egg-based Python modules
with a specificentry point, e.g.'django.apps'.Egg-based Python modules(a.k.a. eggs) are compressed packaged Python modules
like Django apps. Every Django app can be converted to an egg distribution by
using a special setup.py file.InstallationGet the source from the application site at:http://code.google.com/p/django-reusableapps/To installreusableapps, follow these steps:Follow the instructions in theINSTALL file.Addimport reusableappsto the top of yoursettings file.Add a new setting to yoursettings file, a list of locations of
reusable apps, in search order. Note that these paths should use
Unix-style forward slashes, even on Windows.For example:REUSABLE_APPS_DIRS = (
    '/home/jannis/.local',
    '/Users/Jannis/Code/eggs',
    '/usr/share/django/apps',
    'C:/www/django/apps',
)Add to the last line of your settings file (after theINSTALLED_APPSand REUSABLE_APPS_DIRS setting):INSTALLED_APPS = reusableapps.search(REUSABLE_APPS_DIRS, INSTALLED_APPS)Putting it togetherOnce you finished with above installation instructions, yoursettings fileshould look something like this:import reusableapps

# ...

REUSABLE_APPS_DIRS = (
    '/home/jannis/.local',
    '/Users/Jannis/Code/eggs',
    '/usr/share/django/apps',
    'C:/www/django/apps',
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'myproject.myapp',
)

INSTALLED_APPS = reusableapps.search(REUSABLE_APPS_DIRS, INSTALLED_APPS)You can then put reusable, pluggable, egg-based Django apps in one of the
directories inREUSABLE_APPS_DIRS.Using templates from egg-based Django appsIf you want to use templates from a egg-based Django app please add'django.template.loaders.eggs.load_template_source'to theTEMPLATE_LOADERSsetting.Adding support fordjango-reusableappsto your own Django appIf you want to support django-reusableapps in your own Django app, you need
to modify your existing setup.py to import the setup function from the
setuptools instead the from the distutils:from setuptools import setupFurthermore you need to add an ‘entry point’ to the setup keywords:entry_points={'django.apps': 'myapp = myapp'},where mymyappis the name of your Django app, e.g.registration.
A full example can be found atsetup-example.pyand should be copied to
the parent directory of your app assetup.py. You are then able to create
an egg file with of this app.Creating egg files of reuasable Django appsOnce you have a proper setup.py in the parent directory of your Django app,
you can run:python setup.py bdist_eggto build a egg file of it. It will be created in thedistdirectory and
have a filename likedummyapp-0.1-py2.5.egg. You can then distribute it
and use it by placing it in one of theREUSABLE_APPS_DIRSof your Django
project.SupportPlease leave yourquestions and problemson thedesignated Google Code site.