proso_flashcards package¶
Submodules¶
proso_flashcards.admin module¶
-
class
proso_flashcards.admin.
AnswerAdmin
(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin
-
list_display
= ('user', 'item_asked', 'item_answered', 'context', 'is_correct', 'options_count', 'type', 'time', 'asked_ago')¶
-
media
¶
-
raw_id_fields
= ('options',)¶
-
search_fields
= ('user__username',)¶
-
-
class
proso_flashcards.admin.
CategoryAdmin
(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin
-
list_display
= ('id', 'identifier', 'lang', 'name')¶
-
list_filter
= ('lang',)¶
-
media
¶
-
search_fields
= ('name',)¶
-
-
class
proso_flashcards.admin.
ContextAdmin
(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin
-
list_display
= ('id', 'identifier', 'lang', 'name')¶
-
list_filter
= ('lang',)¶
-
media
¶
-
search_fields
= ('name',)¶
-
proso_flashcards.flashcard_construction module¶
proso_flashcards.json_enrich module¶
proso_flashcards.models module¶
-
class
proso_flashcards.models.
Category
(id, identifier, item, lang, name, type)[source]¶ Bases:
django.db.models.base.Model
,proso.django.models.ModelDiffMixin
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Category.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Category.
item
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
Category.
objects
= <django.db.models.manager.Manager object>¶
-
exception
-
class
proso_flashcards.models.
Context
(id, identifier, item, lang, name, content, active)[source]¶ Bases:
django.db.models.base.Model
,proso.django.models.ModelDiffMixin
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Context.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Context.
extendedcontext
¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
place.restaurant
is aReverseOneToOneDescriptor
instance.
-
Context.
flashcards
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Context.
item
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
Context.
objects
= <proso_flashcards.models.ContextManager object>¶
-
exception
-
class
proso_flashcards.models.
Flashcard
(id, identifier, item, lang, term, term_secondary, context, description, active, additional_info)[source]¶ Bases:
django.db.models.base.Model
,proso.django.models.ModelDiffMixin
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Flashcard.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Flashcard.
answers_with_this_as_option
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Flashcard.
context
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
Flashcard.
item
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
Flashcard.
objects
= <proso_flashcards.models.FlashcardManager object>¶
-
Flashcard.
term
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
Flashcard.
term_secondary
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
exception
-
class
proso_flashcards.models.
FlashcardAnswer
(id, user, session, item, item_asked, item_answered, time, response_time, guess, config, context, metainfo, type, lang, practice_set, answer_ptr)[source]¶ Bases:
proso_models.models.Answer
-
exception
DoesNotExist
¶ Bases:
proso_models.models.DoesNotExist
-
FlashcardAnswer.
FROM_DESCRIPTION
= 'd2t'¶
-
FlashcardAnswer.
FROM_TERM
= 't2d'¶
-
FlashcardAnswer.
FROM_TERM_SECONDARY_TO_TERM
= 'ts2t'¶
-
FlashcardAnswer.
FROM_TERM_TO_TERM_SECONDARY
= 't2ts'¶
-
exception
FlashcardAnswer.
MultipleObjectsReturned
¶ Bases:
proso_models.models.MultipleObjectsReturned
-
FlashcardAnswer.
answer_ptr
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
FlashcardAnswer.
objects
= <proso_flashcards.models.FlashcardAnswerManager object>¶
-
FlashcardAnswer.
options
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
proso_flashcards.models.
FlashcardAnswerManager
[source]¶ Bases:
django.db.models.manager.Manager
-
class
proso_flashcards.models.
Term
(id, identifier, item, lang, name)[source]¶ Bases:
django.db.models.base.Model
,proso.django.models.ModelDiffMixin
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Term.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Term.
extendedterm
¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
place.restaurant
is aReverseOneToOneDescriptor
instance.
-
Term.
flashcards
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Term.
flashcards_as_secondary
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Term.
item
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
Term.
objects
= <proso_flashcards.models.TermManager object>¶
-
exception
-
proso_flashcards.models.
add_parent
(sender, instance, **kwargs)[source]¶ When a flashcard is created, create also an item relation.
-
proso_flashcards.models.
change_parent
(sender, instance, **kwargs)[source]¶ When the given flashcard has changed. Look at term and context and change the corresponding item relation.