This view acts as an extension to the object_detail generic view in django.views.generic.object_list. The standard generic view can only filter the queryset by object_id or slug; this view allows you to filter by any parameter you like, as well as multiple parameters.
The usage is the same as the standard object_detail view except that you must also give the parameter 'filters', which should be an array of what you would like to filter the url values as, and instead of 'slug' or 'object_id' as the regex parameter in the URL, use 'value1', 'value2', etc.
Example: If you have a list of companies, each with multiple branches, you may want a branch details page. A URL for this may look as follows: http://www.mysite.com/company/company-slug/branch-slug/. To implement this simply use the urlpattern example give,
- filter
- urls
- generic-views
- generic-view
- filterable
Simple piece of middleware that redirects all requests to **settings.FIRSTRUN_APP_PATH**, until a lockfile is created.
Tested on 1.3 only, but I do not believe it requires any special functionality beyond that provided in 1.1
This is useful if you need to force a user to run an installer, or do some configuration before your project can function fully.
At first glance, such a thing would generate a lot of hits on the disk. However, once the lockfile has been created, the middleware unloads itself, so when a project is in a production environment, the lockfile is only checked once per process invocation (with passenger or mod_wsgi, that's not very often at all).
Once your user has completed your FirstRun app, simply create the lockfile and the project will function as normal.
For it to function, the following settings must be configured:
* **settings.PROJECT_PATH** - absolute path to project on disk (e.g. */var/www/project/*)
* **settings.FIRSTRUN_LOCKFILE** - relative path of the lockfile (e.g. */.lockfile*)
* **settings.FIRSTRUN_APP_ROOT** - relative URL of the App you want to FirstRun (eg.*/firstrun/*)
- middleware
- django
- redirect