cj
Can not connect to ('0.0.0.0:8000)
to deploy on a server use 127.0.0.1 and bind gunicorn to it
Doragonsureiyā
How to call Dishes Name from Dishes model to Recommendation model?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Anonymous
Thanks for support hope you guys are doing well...😊😊😊
Ali
I want to run a python script when a button is clicked, how do I do that
Shubham
Write the script inside a def of your views.py
Shubham
And call that def
Shubham
On btn click
Anonymous
sagir
First of all you have to import UserCreationForm
sagir
Then that email field you are taking
sagir
You no need to take it before Meta class
sagir
Please help me😞
Hope so now you got solution
Anonymous
You no need to take it before Meta class
Also without this filed , doesn't work
sagir
Come to the new line after that fields variable
sagir
Then give backspace
sagir
Then take the both fields username and email as you was taking before the meta class
Anonymous
How to count number of download for each music in django
Ali
make a counter inside the function
Ali
oh for each song
Ali
u need a database that get the url for each song that's getting downloaded
Ali
if the id is unique then id.counter =+ 1 for that id
Ali
else insert new id to database
Future
help please
Future
RelatedField.to_representation() must be implemented for field .
Anonymous
else insert new id to database
Matthew Amstutz Music=music .objects.get(id=id) Song=music.object.all() Download ={} For song in song: If not download.has_key(music.item.id) Download ['music.item.id']= { 'item':item.id 'Count':1 } Else: Download[music.item.id]['count'] =+1
Anonymous
Will it work
Anonymous
José
Has anyone worked a middleware with decorators in Django?
Doragonsureiyā
Has anyone worked a middleware with decorators in Django?
Please don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello I need help on $z" Just ask about your problem directly! With 56k+ people the probability that someone will help is pretty high. Also please read: http://catb.org/~esr/faqs/smart-questions.html
Kushal
I created an API. How to call API in android app witj display the data?
Anonymous
This project, I clone it from a repository, it is already working in production, the problem is that when I clone it and make configurations from my local, the static do not load me, do you know what the problem is?
Amit
django registraion fields in default is : username, passowrd, passowrdconfirm when i change this fields to : emaiol, passowrd, passwrodconfirm, doesn't work, what i should doing?
I have the same problem . I added one attribute to table but after that it's not working for that table it's saying typeerror but without customized table it's working
Amit
Anonymous
Working on it
I have not getting any error Just it doesn't work If you find solution please also tell me
Amit
Okay
Anonymous
I m facing Merge conflicts because of requirement.txt file
Anonymous
Any help available
Dhruva
When I verify the user I get the token but I want to display the user details how to get
sagir
?
I am getting warning for this question. M sry
Mahdi
any one know this (cannot import name 'RemovedInDjango30Warning)
Mahdi
i finde many answer for this but no one of that solved my problem..
Mahdi
this is complatis of error : django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'django.contrib.admin.templatetags.admin_static': cannot import name 'RemovedInDjango30Warning'
Shubham
Hello guys I have a basic query
Shubham
https://dpaste.org/2kSr
Shubham
How do I check when a particualr method of viewset is being called?
Shubham
lets just say def create_user_api(self, validated_data): when it will get called
Shubham
router.register('create-user', CreateEmailUserViewSet, base_name='create-user')
Shubham
this is just an endpoint
Ali
this is just an endpoint
Make a counter inside it, If counter =1, Then it's called and rest the counter back to 0
Ali
How to display database record differently from what it's originally saved? Let's say 'name' for id=1, is John676, And I want to display it as "jj676".
Ç
Venv could be a better way to build env
Shaun
Is there a good way to run scheduled jobs on a django site. I have to pull some orders in from a REST API. How do i run something like that every 5 minutes?
Shaun
Use django-q or celery
Ok - since this is a new django site I can just use django-cookiecutter and use the celery setup from there.
Mirco
Ok - since this is a new django site I can just use django-cookiecutter and use the celery setup from there.
Don't use cookiecutter if you don't have strong Django basics and knowledge
Shaun
Don't use cookiecutter if you don't have strong Django basics and knowledge
I have used it before on a couple sites and can add apps and figured out celery and all that already. I'm nbot a django expert by any means
Shaun
i just like that it has docker and all that setup already
Mirco
Anyway my suggestion is go for django-q if you still have to choose what to use for scheduling tasks
Shaun
ok! thank you @pyflare
Dhruva
ObtainAuthToken is not defined
Антон
Django and MS SQL Server. How connect. And yes, I know this is a bad couple, but...
Mirco
ObtainAuthToken is not defined
you really think we will help you with this well explanatory message ?
Ali
I've a table as follows : college — departments coeng — arch coeng — elec coeng — civil
Ali
I want to display arch as architecture
Ali
in the admin panel
Dhruva
you really think we will help you with this well explanatory message ?
I have defined in views ObtainAuthToken and imported it still shows CustomAuthToken not defined
Dhruva
Imported in urls*
Mirco
share the code using code sharing tool
Doragonsureiyā
Django and MS SQL Server. How connect. And yes, I know this is a bad couple, but...
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box write down the same words you asked here Step 4: Read the firsts results
Tejas
Does anyone have idea about django-friendship package? Means how can I use it. I couldn't find any content on internet related to it..