B
B
baterson2015-08-11 12:12:26
Django
baterson, 2015-08-11 12:12:26

django-registration-redux. How to bind other models?

Hello, I'm a noob in development, trying to practice on the web, mastering django. While I feel like a blind kitten, each step is difficult and takes quite a long time to solve, so sorry if the question is stupid
Added registration via django-registration-redux. I want to implement a personal account, with the ability to add articles, pictures and user interaction (comments, likes). As I understand it, I need to make models for my personal account and user interaction, link them via a foreign key to models.User . Please kick me in the right direction

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2015-08-11
@baterson

1. If you are just learning. Try to use batteries as little as possible. Registration is very easy to do with naked janga. Plus gives an understanding of many internal mechanisms. I advise you to take down the battery and do it with handles.
2. You misunderstand the principles (logic). Your personal account is no different from any other page on the site. The same functionality. Ask yourself: "what does the user do in the personal account?". And get the answer: "he adds articles, pictures and interacts with users (comments, likes)". That is, he manages the objects "articles", "pictures", "comments", "likes" in the personal account. Are there already models for this? There is! What does the user do in the LC? Adds, edits, deletes these objects, but only those units that he can by privileges (owner, moderator). Why are there other models? Why not! Why is such a question asked? Because you do not know dzhanga, but use ready-made batteries. Why is that? Because you don't want to learn. :-)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question