Instead of class attributes, make a generic reusable the
FormOption class and update the DetailForm to use a Meta
class for options.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add the get_related_field function to resolve a
model's related field reference by a path separate
by Django's default field separator '__'.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Use a dynamic subclass instead that always deconstructs to a fake
subclass with a __eq__ method that always returns True. This should
trick makemigrations into never creating a new migrations for
changes to the storage class or the arguments.
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>
Update the arguments of the function to be full length and more explicit.
Use exceptions to find the correct way of using the attribute of the
object passed instead of trying to use introspection.
Add support for passing key word arguments to the attribute being
resolved even if it is a class method.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add support to the SourceColumn class to resolve related fields
using the double underscore as separator. Columns that use related
no longer have to use throw away lambdas.
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>
responsiveness. Render a document page place holder while the real
document page loads. This change avoids "jumping" effect when
loading many thumbnails. Increase lazy load thresholds. More
thumbnails and document pages will be loaded and visible by
default when a view loads.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Replace all __unicode__ methods to __str__ and the
@python_2_unicode_compatible decorator.
Replace all instance of smart_str, smart_unicode, force_uncode
with force_text.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
document page navigation views. Fixes issue with Mayan installed
as a sub URL app. Fixes GitLab issue #383. Thanks to @gsteixei
for the issue and investigation.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>