Learn Django | Social Network project in Django (PART 8)

preview_player
Показать описание
🔥 Join the facebook group:

🔥 Follow pyplane on:

🔥 More on python and django:

Social Network project in Django
Part 8 consists of:
➜ creating forms for posts and comments
➜ handling 2 forms in a single view
➜ displaying comments and send post confirmation

Source code:

#django #learndjango #python #djangoproject #djangotutorial #django3 #python3
Рекомендации по теме
Комментарии
Автор

I searching a lot of video, but this one is best combo package.

Thanks a lot for making this series.

samiulhaque
Автор

I think we can add two diffrent view for comment form and post form submission
and we also can use django message framework to show form submission message
Wdyt @Pyplane ?

satyam-seth
Автор

Hi Luke, thank you for your great tutorials !!! I wanted to give a suggestion if one of us had a problem with the resubmitting comment form upon the refresh of the browser ... the solution is this:

in posts/views.py
if 'submit_comment_form' in request.POST:
print(request.POST)
comment_form =
if comment_form.is_valid():
instance =
instance.user = profile
instance.post =
instance.save()
comment_form = CommentModelForm()
return (THIS LINE TO ADD TO AVOID RESUBMITTING FORM OVER AGAIN AND AGAIN)

Cheers have a great weekend!
P.S: I have one question : how could I add the same functionality of the parent to the comments in order to have replie to a specific user reply ?
Thank You in advance!

fabriziobandiera
Автор

On clicking comment button, no comments are displayed on posts page as well as in admin/comments page

shreyashnahar
Автор

how can i change the size of the textbox creating a post and the comment box without using semantic UI

karlhannigan
Автор

Thanks for the amazing tutorial you present,
I have just one issue when I write a new comment and submit it via the button, the whole page got refreshed, is there any way to update the page without refreshing it??? (just like Facebook for example)

mouadriali
Автор

When i refresh a page, then comment/post added again???

alexfox
Автор

Thanks for prioviding good content,
But when i add a comment it does not add to the comment model in the data base
, please give a solution

lakshmikumard
Автор

Not Found: /posts/class="ui
getting this error.

sourabhchavan
Автор

still i have the problem of t'this field is required'

lakshmikumard
join shbcf.ru