Monday, May 2, 2016

Re: Complex content type

Thank you ludovic and sorry for not being able to clearly explain what I want to do :-(. You are right, I want to show a user a simple django form, but I cannot figure out how to save an individual answer alone with its correspondence question's id and user's id

So my table for "Answer" model will look like:

user_id       question_id             answer
     01                    01                 text of an answer
     01                    02                 text of an answer
     02                    01                 text of an answer
     02                    02                 text of an answer
     03                    01                 text of an answer
     03                    02                 text of an answer




On Monday, May 2, 2016 at 3:25:06 PM UTC+6, ludovic coues wrote:
I have some trouble trying to understand what you means by "content type". That terms refer to the content of a file. For exemple, text/plain for plain text file or image/png for an image encoded as png.
What you show look like a standard form. If you need basic pointer on how to use a form, saving it's data along 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 <said...@gmail.com>:
Avraham, I understand that the content type is not any special or complex for you. Probably, I should wrote "complex content type for me". Anyways, can you provide any instructions for how can make this kind of content type?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/fdbc2c01-2059-406d-93fe-762d9fdc4a73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment