When there is no HTTP referer fallback to
common.settings_home_view instead of LOGIN_REDIRECT_URL.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add keyword arguments.
Sort arguments.
Unify the ObjectListPermissionFilterMixin and
ObjectPermissionCheckMixin into the RestrictedQuerysetMixin.
Add MultipleObjectDownloadView.
Update SingleObjectDownloadView to do queryset filtering.
The method that returns the base queryset for views is
now named get_source_queryset().
The views now use .get_object_list as a multi object
homologous of get_object. The queryset returned by
.get_object_list is restricted by access.
Make MultipleObjectMixin a subclass of Django's
SingleObjectMixin to reduce repeated code.
All generic views are now imported from common.generics and not
from common.views.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Remove explict support for raising 404 error when the
object access fails.
The new method to use is to restrict the queryset using
the .restrict_queryset manager method and then .get() the
desired object. If the object access control failed then
the desired object will not be found in the queryset
and an error 404 will be raised. The end result is the same:
error 404, the method to raise the error is what differs now.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add support to override settings of the FilteredSelectionForm
via subclass attributes. Add keyword arguments to calls.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Move the current user detail and edit views from the common app
to the user_management app. Add the user created and edited events.
Add an user detail view.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Allow passing a widget class to SourceColumn. This makes
using lambdas to render model column unnecesary and are
mostly removed too.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
The HOME_VIEW setting is not a Django setting but a setting from the
common app. Move the HOME_VIEW to the COMMON namespace and rename it
to COMMON_HOME_VIEW.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Instead of inserting the path of the apps into the Python app,
the apps are now referenced by their full import path.
This app name claves with external or native Python libraries.
Example: Mayan statistics app vs. Python new statistics library.
Every app reference is now prepended with 'mayan.apps'.
Existing config.yml files need to be updated manually.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
- Add URI.js, Ajax form.
- Split base.js into mayan_app.js, mayan_image.js, partial_navigation.js.
- Add a HOME_VIEW setting. Use it for the default view to be loaded.
- New template loading order root.html -> base.html -> any template. root.html is only loaded once. Other templates are loaded and merged with base.html via ajax load.
- Fix bug in document page view. Was storing the URL and the querystring as a single url variable.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
Add COMMON_PRODUCTION_ERROR_LOG_PATH to control path of log file.
Defaults to mayan/error.log.
Add support logging request exceptions.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>