Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C crudlfap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 16
    • Issues 16
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • oss
  • crudlfap
  • Issues
  • #14

Closed
Open
Created Dec 15, 2021 by bob-r@bob-r

Not clear how to override context in template view

All get_context return, except for TemplateMixin:

  • TemplateMixin: https://yourlabs.io/oss/crudlfap/-/blob/7304f5b0f7e5a5a8534f4e092cbe804a3c9132dd/src/crudlfap/mixins/template.py#L47-49
  • FormMixin: https://yourlabs.io/oss/crudlfap/-/blob/096c96f4f866c65e981ab2ffb1566adffd8149e6/src/crudlfap/mixins/form.py#L14-16
  • ObjectMixin: https://yourlabs.io/oss/crudlfap/-/blob/4aea1cb1231a114d0a4cb7790b33542062d1e074/src/crudlfap/mixins/object.py#L33-35

Would it be correct for a very involved template view to inherit from TemplateView and override get_context? If so, get_context should return the context.

Edited Dec 15, 2021 by bob-r
Assignee
Assign to
Time tracking