Matheus
Hi, I have a small django project with just one app. How the mostly used app names in this case if i cant use the same name as project and the app contais the whole structure?
Firdaus
LookupError: App 'accounts' doesn't have a 'SubRegion' model.
Have you run migrations? According to the documentation you have to do that after installation. https://django-cities-light.readthedocs.io/en/stable-3.x.x/
Eng. Mohamed
https://stackoverflow.com/questions/61777590/django-ajax-doesnt-save-form-to-database
saran
Heyy.. I have given a variable None, but showing as string in json. What I want it's as null.
saran
Is it possible to assign null??
ishak
Is it possible to assign null??
what is your use case?
ishak
I create a custom user model with inheritance from AbstractBaseUser. I want to write some unit tests for it. Can i inheritance Django's tests like in that link ones (https://github.com/django/django/blob/master/tests/auth_tests/test_auth_backends.py) Or do you have any other suggestions?
Anonymous
Email mail sending issue.👇👇👇👇 I don't want to add host, password, port etc. In settings. Py I want to use emailmessage class and also add host, password etc in this class. Help me plz.. What i do..??
saran
what is your use case?
It's now working. I have written one if condition wrong. Now I'm getting it all null in api. Initial it was showing as "None".
Martin
can we do stock reduction in django
Martin
i am working on a shoping site for a shope .
Maz
can we do stock reduction in django
You're using pure django or a variant?
Anonymous
can anyone help me how to create different pages for different user Example: user1 having different page and user2 having different page
Tobi
Hi I need help, I'm hosting a django app on linode, the app is running on Ubuntu 18.04 LTS with gunicorn, nginx a postgresql database, and I'm using let's encrypt for SSL certificate, the issue is when I fill a form (login or signup) I get a timeout error but I don't have that issue on the admin site, when I try login to the admin it works just fine, and I don't have the timeout error on my local machine on the app, this is like the fourth time I'm setting up the whole thing with a different Ubuntu version each time, and I'm having the exact same issue, I made some research and then update timeout for nginx and gunicorn to 300, but it doesn't work, this is the first time I'm hosting a django app on a Linux server and I'm having the worst time of my life, this is a full traceback of the error https://gist.github.com/Tobi-De/38a3badf79bdf9fb0fe45cb0322d6293 , dont't let that EmailAddress.DoesNotExist exception full you, it does exist, I create the account with the createsuperuser command
Anonymous
can anybody help
Anonymous
?
Anonymous
The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting.
Anonymous
i have this error on server
Anonymous
on localhost everything was all right
Anonymous
but on the server it asked me STATIC_ROOT
Anonymous
i will try again
Anonymous
but maybe someone had this problem
Biswajeet
Biswajeet
likewise static root
cj
but maybe someone had this problem
just read what the error says, don't use the same path folder for those 2 constants
Stv
I am working on a project building web API with Django with vueJs frontend.Some of the routes will be protected so I will have to implement jwt authentication. Can anyone kindly recommend a resource that shows how to implement this?I've googled around but can't find any material that adequately teaches how to. Thanks
Paolo
Hi guys, do you know why the sql section of the Django toolbar says duplicated n times
Amir
Hey bro’s, i wanna use get method to send that txt i got from get method to telegram bot:) Anyone can help me?
Paolo
Muslim
?
Google it
Anonymous
on localhost everething was all right. I had STATIC_URL and STATIC_DIRS and thats all. When i deployed to VPS it started ask me STATIC_ROOT. BUT i have not deployed to server yet for nginx. when i use STATIC_DIRS without root it collects all files 170 for example. BUT when i use only STATIC ROOT and i comment DIRS or remove less than 120. It doesn't see CSS at all. At first case everything wall all right but it doesn't see js
Anonymous
just read what the error says, don't use the same path folder for those 2 constants
_
Hi there, how can i add context in my Base template, categories from db for example?
Максим
Hi All! I have that serializer and that apiview https://gist.github.com/MaxEpt/1d801c5fcb64d9f3736ea257eea7aec3 https://gist.github.com/MaxEpt/e0f0165b8cc38fd69f0a3b14ceb7ed6c
Максим
how can i realize update method (put)
Максим
?
Matheus
hello, someone had worked with webrtc and channels which can help me?
Anonymous
Connecting to MSSQL Server Using Django | CodeWithFlash https://codewithflash.com/connecting-to-mssql-server-using-django/
Anonymous
If are having trouble with Microsoft SQL Server and django, check this out
Sweetie
What's the best way to restrict all views to only show data of current user only. I want all crud functions to restrict to current user. So user create things, see list of only his things, ForeignKey choices also remains limited to items created by him
Kifaru F
Any docs on bitcoin payment with Django ?
Anonymous
how to pass user define argument in setting.py ??
Anonymous
Hi eveyone.. Aws or heroku ... What is fast ?!!
Anonymous
Book 💙
Muslim
Hi eveyone.. Aws or heroku ... What is fast ?!!
It’s just meaningless question
Anonymous
I git it
Doragonsureiyā
Hi eveyone.. Aws or heroku ... What is fast ?!!
Looks like you need a offtopic group, please continue this conversation at @pythonofftopic
Sooraj
Created a postgesql db backup in ubuntu, is it possible to import to Windows?
bikrant
I've just started learning django
bikrant
Can anyone suggest good project to implement to improve learning
nups
Can anyone suggest good project to implement to improve learning
You can check tango with django- rango project. It covers so many features of django. I have created basic setup of this project here- https://www.youtube.com/playlist?list=PLrqwCI95Biv0vwL840nQdqxL0Puqo8GVp
Anonymous
how to pass user define argument in setting.py ??
U can define a variable or constant and access it throughout your project using djang.conf.settings. If ur constant is MY_CONSTANT=2 in settings.py, u can use it in your project like this. from django.conf import settings settings.MY_CONSTANT
Sai
How I find nearest longitude and latitude
Doragonsureiyā
How I find nearest longitude and latitude
That is not a Python specific question, please move to @PythonOfftopic and ask there.
Sweetie
I have a for loop in template {% for label, value in object.get_fields %} <p>{{ label }}: {{ value }}</p> {% endfor %} which works fine but shows ID of foreign keys instead of their str form. How to resolve this?
Artem
Def _ _ str _ _(self): return self.name
Sweetie
Probably add def str into your model?
The str def is there it works fine everywhere but not in template tag. without str template will show model object and not ID. I think it happens because in get_fields I do this: def get_fields(self): return [ (field.verbose_name, field.value_from_object(self)) for field in self._meta.get_fields(include_hidden=False, include_parents=False) ] So it gets the actual db value which results in foreign keys showing ids and choice field showing the db value and not the verbose choice text.
Sweetie
May be I can check if field is instance of ForeignKey and then not get value But there should be a cleaner way to achieve this.
sheikh
How I can create structure for order book (share market) in django