tailbone.views.core
¶
Base View Class
- class tailbone.views.core.View(request, context=None)[source]¶
Base class for all class-based views.
- file_response(path, filename=None, attachment=True)[source]¶
Returns a generic FileResponse from the given path
- late_login_user()[source]¶
Returns the
rattail:rattail.db.model.User
instance corresponding to the “late login” form data (if any), orNone
.
- make_progress(key, **kwargs)[source]¶
Create and return a
tailbone.progress.SessionProgress
instance, with the given key.
- property rattail_config¶
Reference to the effective Rattail config object.
- render_progress(progress, kwargs, template=None)[source]¶
Render the progress page, with given kwargs as context.
- user_is_protected(user)[source]¶
This logic will consult the settings for a list of “protected” usernames, which should require root privileges to edit. If the given
user
object is represented in this list, it is considered to be protected and this method will returnTrue
; otherwise it returnsFalse
.