How to retrieve data from deep nested object?

2016-04-26 Thread Said Akhmedbayev
I am trying to figure out how to loop over deep nested object in Django template. Here is my app's code models.py from django.db import models class Unit(models.Model): unit_number = models.PositiveIntegerField(blank=True, null=True, default=1) title = models.CharField(max_length=15

Re: How to retrieve data from deep nested object?

2016-04-26 Thread Said Akhmedbayev
Unfortunately, it does not work for me :-( On Tuesday, April 26, 2016 at 7:49:39 PM UTC+6, Vijay Khemlani wrote: > > I guess it is > > {% for question in subsection.question_set.all %} > > based on your models > > On Tue, Apr 26, 2016 at 9:33 AM, Said Akhmedbayev >

Re: How to retrieve data from deep nested object?

2016-04-26 Thread Said Akhmedbayev
This does not work for me either :-( On Tuesday, April 26, 2016 at 7:49:41 PM UTC+6, Dan Tagg wrote: > > Does {% for question in subsection.subsection_set.all %} work? > > Dan > > On 26 April 2016 at 13:33, Said Akhmedbayev > wrote: > >> I am trying to figure ou

Re: How to retrieve data from deep nested object?

2016-04-26 Thread Said Akhmedbayev
inserted a custom text (typed in), everything showed up. Thanks On Tuesday, April 26, 2016 at 7:49:39 PM UTC+6, Vijay Khemlani wrote: > > I guess it is > > {% for question in subsection.question_set.all %} > > based on your models > > On Tue, Apr 26, 2016 at 9:33 AM, S

Completed form for an authenticated user

2016-04-27 Thread Said Akhmedbayev
Let's say, for example, I have a reusable form. An authenticated user fills out this form and saves it. How then, I can show to the user a page with the complete form? Sorry, for not being able to explain the question clearly, I am new to django and to the web development in general. -- You r

Re: Completed form for an authenticated user

2016-04-27 Thread Said Akhmedbayev
est, > Gergely > > > > Gergely Polonkai > [image: https://]about.me/gergely.polonkai > > <https://about.me/gergely.polonkai?promo=email_sig&utm_source=email_sig&utm_medium=email_sig&utm_campaign=external_links> > > 2016-04-27 19:13 GMT+02:00 Said Ak

Complex content type

2016-04-28 Thread Said Akhmedbayev
Need to build a content type that accepts inputs from users. Those inputs must be stored in database alone with information who entered it (user's information like user name). Here is what I am looking to build:

Re: Complex content type

2016-05-01 Thread Said Akhmedbayev
rour wrote: > > what's so special about your content type? It seems you are just storing > text. > > > On Fri, Apr 29, 2016 at 7:51 AM, Said Akhmedbayev > wrote: > >> Need to build a content type that accepts inputs from users. Those inputs >> must be store

Re: Complex content type

2016-05-02 Thread Said Akhmedbayev
ong with current logged-in user, you > might want to have a look at the django girls tutorial. Specifically, > http://tutorial.djangogirls.org/en/django_forms/ is about django forms. > > 2016-05-02 8:23 GMT+02:00 Said Akhmedbayev >: > >> Avraham, I understand that the con

Re: Complex content type

2016-05-02 Thread Said Akhmedbayev
lled. Complete it with the > user, as shown in the django girls tutorial and save your answer. > > > > 2016-05-02 11:57 GMT+02:00 Said Akhmedbayev >: > > Thank you ludovic and sorry for not being able to clearly explain what I > > want to do :-(. You are right, I

Pre-populate formset with a user saved data on revisit

2016-11-23 Thread Said Akhmedbayev
I need to pre-populate a formset field with a user's saved data Here is my form.py EssayQuestionFormSetBase = modelformset_factory(models.EssayQuestion, extra=0, fields=('prompt',),

Question about admin.StackedInline

2016-04-22 Thread Said Akhmedbayev
Thank you in advance! I am new to Django, trying to build a small app for my friend. The app mock-up is here Basically, the app will include Units/Lessons with Subsection, each Subsection will end with several questions. Here my models.py from django.db import