websauna.tests.crud.tutorial module¶
Tutorial models and admins for CRUD testing.
-
class
websauna.tests.crud.tutorial.
Choice
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
choice_text
¶ What the user sees for this choice
-
id
¶ Database primary key for the row (running counter)
-
question
¶
-
question_id
¶ Which question this choice is part of
-
uuid
¶ Publicly exposed non-guessable id
-
votes
¶ How many times this choice has been voted
-
-
class
websauna.tests.crud.tutorial.
ChoiceAdmin
(request)[source]¶ Bases:
websauna.system.admin.modeladmin.ModelAdmin
-
plural_name
= 'choices'¶
-
singular_name
= 'choice'¶
-
title
= 'Choices'¶
-
-
class
websauna.tests.crud.tutorial.
Question
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
choices
¶ Relationship mapping between question and choice. Each choice can have only question. Deleteing question deletes its choices.
-
id
¶ Database primary key for the row (running counter)
-
published_at
¶ When this question was published
-
question_text
¶ Question text
-
uuid
¶ Publicly exposed non-guessable
-