Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/m/a/manabi-HEAD/apps/flashcards/views/crud.py   manabi(Download)
def facts_editor(request):
    #assume Japanese for now (model 1, the only model object)
    #get the fieldtypes for Japanese
 
    fact_type = FactType.objects.get(id=1)
        fact = Fact.objects.get_for_owner_or_subscriber(fact_id, request.user)
        fact.edit_string_for_tags = usertagging.utils.edit_string_for_tags(fact.tags)
        fact_type = FactType.objects.get(id=1) #assume japanese for now
        decks = Deck.objects.filter(owner=request.user, active=True)
        card_templates = []

src/m/a/manabi-HEAD/apps/flashcards/models/decks.py   manabi(Download)
 
        from flashcards.models import FactType, Fact, FieldType
        fact_type = FactType.objects.get(id=1)
        field_types = FieldType.objects.filter(fact_type=fact_type).order_by('id')
        facts = Fact.objects.with_upstream(self.owner, deck=self)

src/m/a/manabi-HEAD/apps/flashcards/contextprocessors.py   manabi(Download)
def subfact_form_context(request, subfact=None,
                         field_content_offset=0, fact_form_ordinal=1):
    ''' `form_ordinal` is the offset to use for e.g. fact-1-id '''
    context = {}
    sentence_fact_type = FactType.objects.get(id=2)

src/m/a/manabi-HEAD/views.py   manabi(Download)
        #get flashcard context, for fact add form
        #assume Japanese fact type
        fact_type = FactType.objects.get(id=1)
        card_templates = fact_type.cardtemplate_set.all()
        field_types = fact_type.fieldtype_set.exclude(disabled_in_form=True).order_by('ordinal')