django-2.2 Questions
4
Solved
So I have an extended User model (extended AbstractUser) called Profile. This was in a seperate app called "profiles". I was plugging in the standard login and realised it was looking for a "profil...
Virulent asked 2/8, 2019 at 9:41
3
Solved
I would like show in the template the size of a file that the user have uploaded. I've see that the file object has the attribute size but, because I'm newbie with Python and the development field,...
Paule asked 21/6, 2019 at 7:31
3
Please see the following code:
user.save(using=self._db)
What is the default value of self._db for Django?
Does this value default to what I've specified under default for database in my settings....
Mekong asked 27/8, 2019 at 3:27
4
Solved
Migrations error in django 2; AttributeError: 'str' object has no attribute 'decode'
I am running migrations on my newly built app called 'core'.
When I run migrations on it, I get an error that tells me this;
query = query.decode(errors='replace')
AttributeError: 'str' object h...
Hearse asked 29/6, 2019 at 21:10
1
Solved
I'm testing the update of an application from Django 2.1.7 to 2.2.12. I got an error when running my unit tests, which boils down to a model object not being hashable :
Station.objects.all().dele...
Handknit asked 14/4, 2020 at 16:23
1
Solved
I'm confused about passing optional parameter via url in Django with path() instead of url(). I found that I should use kwargs, so I added it to path:
path('all/<str:category>/<int:page_n...
Surprisal asked 21/11, 2019 at 15:48
2
Solved
I'm using Django (2, 2, 4, 'final', 0) within a docker, but I'm able to bash inside to open or execute whatever is required. But I can't debug. (How to debug in Django, the good way? states some me...
Diplostemonous asked 21/10, 2019 at 18:3
0
Please take a look at the code and if you can not comprehend what is going on, I am explaining it in the end
I have a model named Good
class Good(models.Model):
user = models.ForeignKey(User, on...
Backbreaking asked 11/9, 2019 at 18:43
1
I am moving my Django code from 2.1.7 directly to the new Django 2.2. The only problem I encountered in my Centos7 development environment was that my local development database (sqlite3) version w...
Rainie asked 3/4, 2019 at 1:45
0
I am currently using Heroku CI to run my django tests:
python3 manage.py test --fail-fast
However upon running these on the heroku CI i get an infinite loop when the django system tries to render ...
Eulau asked 26/5, 2019 at 14:48
2
Solved
I am starting a new project in Django 2.2 using the same commands as I always do:
python3 -m venv django-env
. django-env/bin/activate
pip install django
django-admin startproject mysite
cd mysite...
Tancred asked 4/4, 2019 at 9:21
1
Solved
I have a currently empty Geodjango app set up - I am connected to my Postgis database in which I have a table named aadf that I am attempting to create a model from. I am using inspectdb to do this...
Outshoot asked 5/4, 2019 at 8:25
1
© 2022 - 2024 — McMap. All rights reserved.