DB design(models), #tags, or labels, folders

2022-02-16 Thread Madhusudhan Reddy
Hi Django users, I have a requirement to design and develop labels for mailing and ticketing software. you can call whatever you want to labels or tags or folders or hashtags but how to design database for reusable case of designing database in django tags For example, 1. Mails 2. Ticketing. 3..

post_save signal vs model's save()

2022-02-16 Thread Alan Evangelista
Hi! I have a Django model for a dynamic application whose questions depend on data previously provided by the user. I also have a Django model for each question/answer in this application. There is a front-end that calls the back-end to "auto-save" whenever a question is answered. When the use

Blank space instead of input

2022-02-16 Thread Анатолий Мельников
Hello, now i have problem with django admin and dont understand the reason of it. I have a field, that described like this: html = models.TextField(verbose_name='HTML', blank=True, default='') In the admin file this field also doesn't stand out. But it looks like this: [image: Снимок экрана от 202

Re: How to get user instance in forms.py?

2022-02-16 Thread run_the_race
If you using python3, I recommend changing: `super(TransfersForm, self).__init__(*args, **kwargs)` to `super().__init__(*args, **kwargs)` Maybe self.user is being lost when the form is initialised, so store it tempory in a variable, try: def __init__(self, *args, **kwargs): user = = kwargs.

Re: collectstatic files chown'ed by root

2022-02-16 Thread 'Tim' via Django users
Thanks a lot for your input, it helped me figure it out! Antonis, you're right, it's basically not possible that those files are owned by root when manage.py is run as "user". This gave me the clue that those directories (and many of the staticfiles) were created at a time before I switched to

Re: migrations: "no changes detected"

2022-02-16 Thread Dev femibadmus
I have and solve this allot, after adding to ur model myapp run the following: >> python manage.py makemigrations myapp >> python manage.py migrate myapp num where num is the new migrations made u can see this when u open myapp/migrations the new file 000(n) is the num If this doesn't work try