On May 12, 10:51 am, Oleg Oltar <oltarase...@gmail.com> wrote: > Hi! > I am running small blog-styled information site. Which contains articles > added via admin application > Now I am trying to add possibility to add comments, so I defined a comment > Model (which contains Foreign Key to article object, and few text fields), > also defined forms. > > Can you please explain how should I create a comment object in view? (After > processing data from form). I don't understand where can I get, the article > name (id, guid or something) to link article and comment > > Thanks in advance, > Oleg
Firstly, have you investigated the built-in comment app? It's quite full-featured, and may do everything you want. Assuming you've decided that your own model is the way to go, the answer to your question will depend on the way you've defined your form and view. Presumably the comment form is displayed at the bottom of an article page, so you'll already have the ID of the article - so I don't really understand what your issue is. Perhaps you could post the code you have so far? -- DR. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---