M
basic question .. anyone know what is use of name argument in urlpattern
path('', views.index, name=''home),
and if i can use this argument as data or variable inside my view.py
Furqan
M
i see .. if there any way i can use the variable name ( value home ) in my view.py ?
Bunty chhatri wala..
Bunty chhatri wala..
Bunty chhatri wala..
If condition:
Do something
return redirect (name) #name= used in path
Else:
Do something
return redirect ( another name)
M
thank you .. i tied using this name in my template but got error ..
i used it in index.hml ( so that page title will display as
{% block title %} {% url 'name' %} {% endblock %}
Reverse for 'name' not found. 'name' is not a valid view function or pattern name.
i am sorry if i am not so clear just learning django .. basically i want to use that passed value in view.py as a python variable
Bunty chhatri wala..
It seems like there's directory issue..
Can you show me your project structure?
How templates are saved?
project>templates>appName>home.html
Or
project>templates>home.html
Bunty chhatri wala..
Bunty chhatri wala..
Bunty chhatri wala..
What?
Jimmies San
hi, please use the offtopic group for posting job offers. thank you :)
s
Harsha, am helping to others, why should you report.
s
Harsha [M]
Anonymous
Good day everyone
Anonymous
I’ve been trying to use a range slider with django filter
Anonymous
Any help will be appreciated
Anonymous
🙏
NOOR UL AIN
Hi everyone
Please drop some FYP suggestions
✙Yaroslav
After authorization through google how generate jwt token?
Sap
In google api python i am taking mail id from userprofile email but in orginization server its giving an error" TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond " CAN ANY ONE HAVE THIS ERROR SOLUTION or ANY IDEAS?
Mirco
Sap
cool
✙Yaroslav
Guys, I have an OAuth2 working out and here everything is OK
BUT
After authorization through a third-party system, I need MY application to issue a JWT token to the user
How do you do that?
CodeCypher
M
djago is good ... ** i should know it first
Sunny
How to choose between APIView and ViewSet?
PRASANA
Debug false..then occur server error 500😕
Bunty chhatri wala..
PRASANA
When iam going true it running
Арам
Hi guys!Do you know a website or youtube video where i can learn about creating websockets api in django project?
PRASANA
Spartan
Hi Guys ,
Is there anyone who can help to learn django-restframework. ?
It will very helpful.
Thanks in Advance
Suraj
Any Django developer having 2-4 years exp looking for fulltime job gandhinagar?
Арам
Bunty chhatri wala..
Bunty chhatri wala..
Same problem it is not working
https://stackoverflow.com/questions/15128135/setting-debug-false-causes-500-error#:~:text=If%20you%20are%20having%20a,in%20any%20web%20error%20logs.&text=I%20think%20it%20could%20also%20be%20the%20http%20server%20settings.
Vitaliy
Hello, Django brothers! I'm looking for part-time job or some one-time tasks to do. I'm experienced in Django and DRF, also have good knowledge of Vue.js in frontend.
Jaime
As a recomendation, try not to expose private information here
Jaime
We are a lot of people here 😅
Anonymous
Hey guys. I wanted to Mail in my sign up Page to a entered Gmail and I have put
from django.core.mail import send_mail send_mail( 'Subject here', 'Here is the message.', 'from@example.com', ['to@example.com'], fail_silently=False, )
in the view.py exactly the same code which is in Django document and also I have set
EMAIL_USE_TLS, EMAIL_HOST=''smtp.gmail.com", etc in setting.py
Anonymous
but it doesn't look that sends any mail
Tejesh
How do I remove the pk field from TabluarInline admin
Tejesh
It's showing me a field named #
Tejesh
But I don't want it
Mohit
Dev
Dev
You need to generate api key through google developers page
Dev
Create your accoute here and you will get api key and password
Mohit
Mohit
Mohit
Set 2 factor authentication and generate an app specific password
Anonymous
thank you very much guys
Zokir
Hello.
Upload image disappear in django admin.
🤔
Zokir
https://prnt.sc/ujmx8v
Zokir
first time I came across. Does anyone know how to fix this problem?
Robert
Show your models.py and admin.py
Mohit
Zokir
Zokir
it's worked! Thank you guys. The problem was my carelessness
(i deleted this field)
Kamlesh
How to upload a file (only . Doc or .txt) mxmm 100kb..
Anonymous
Anyone is here, how use MongoDb For backend in Django project?
Anonymous
How to connect MongoDB with Django?
Padithurai
But you can use djongo package to connect mongodb with django
Anonymous
I use it but I got some error
Anonymous
cj
How to connect MongoDB with Django?
Django is built having in mind to be used with relational databases, there are some packages that can be used to connect NoSQL DBs but don't expect them to work without problems... actually you will find more problems than solutions if you want to use Django with any NoSQL DB
Anonymous
How many months to learn Django?
Just learn
cj