Rajesh
My views.py have the following views:
Rajesh
def xyz(request): text = "you are in view_articles" return HttpResponse(text) def abc(request): text = "you are in view_article" return redirect(xyz)
Rajesh
and urls.py have the urlpatterns as below:
Rajesh
url(r'^xyz/', xyz, name='xyz'), url(r'^abc/', abc, name='abc'),
Rajesh
when I call "http://127.0.0.1:8000/myapp/abc/"
Rajesh
I expect it to be redirecting it to xyz as defined in def abc with redirect method
Rajesh
but I am getting the below NoReverseMatch error
Rajesh
NoReverseMatch at /myapp/abc/ Reverse for 'myapp.views.xyz' not found. 'myapp.views.xyz' is not a valid view function or pattern name. Request Method: GET Request URL: http://127.0.0.1:8000/myapp/abc/ Django Version: 1.11.21 Exception Type: NoReverseMatch Exception Value: Reverse for 'myapp.views.xyz' not found. 'myapp.views.xyz' is not a valid view function or pattern name. Exception Location: /Users/rboyalla/djangoprojects/myproject/lib/python2.7/site-packages/django/urls/resolvers.py in _reverse_with_prefix, line 497
Rajesh
--
Rajesh
Can someone tell me what is the mistake i am doing
Rajesh
ok.. thnks raven.. so, object name is not supported in redirect method now
highnes
How can i get something from an html form using post method and save it in my db?
Mounikesh
guys how to separate django with base html navbar css with anyother web page css
Mounikesh
guys why cant i send any pictures in here ?
Mounikesh
got an error saying a technical error
Mirco
guys why cant i send any pictures in here ?
Because you don't read rules 😊
Mirco
!rules
Doragonsureiyā
Read the rules before any activity: @PythonRules
Mounikesh
sorry, than what if we want to show a picture
Mounikesh
of that particular UI
Mounikesh
https://ibb.co/PY9KV6x
Mounikesh
here the ui looks exactly as i designed
Mounikesh
but
Mirco
write in one message pls 😊
Mounikesh
ok
Mounikesh
https://ibb.co/nRQrjty but when you see here the navbar css(of bootstrap) is overlapping with that of login page css
Mounikesh
is there anyway where i can sort this issue ?
Mirco
you are offtopic man , here we talk about django related issues you have some css issues so forward your messages to some frontend groups
Mounikesh
hahah the issue isnt about css its about django
Mounikesh
i need to figure out a way where i can restrict particular css on aprticular html template to avoid overlap
Mirco
Mounikesh
yeah ,thanks for your suggestion but if any one know how to do that please share
Mounikesh
*knows
Mirco
yeah ,thanks for your suggestion but if any one know how to do that please share
have a better look at django template docs and you will do by yourself 😃
Paolo
You're welcome
Ritika Tiwari
Has anyone made a ecommerce website with django
Ritika Tiwari
??
Anonymous
in my django project e.g in polls app what is test.py and hoe to use it
Mirco
in my django project e.g in polls app what is test.py and hoe to use it
it's the file for testing, but it's an example one, you can edit it or use another location for test files
krishna
hello i am trying to get all row values based on one column value but i am getting error like 'QuerySet' object has no attribute 'created'
krishna
can anyone knows how to solve this?
Mirco
share your code
Mirco
👍 Thanks
if u run manage.py test , django will run code you write into those files
Mirco
Share code with pastebin or similar pls, read the rules
Anonymous
in django how python manage.py migrate works and use
Mirco
in django how python manage.py migrate works and use
u have to use it when you wanna apply changes made to models, so you need to makemigrations and migrate to apply them
Anonymous
and also related to database
Anonymous
?
Mirco
and also related to database
migrations are related to database because you are applying changes to models ( database layer )
Anonymous
OK
Mirco
OK
😊
Anonymous
in django what is CASCADE
Anonymous
?
Mirco
in django what is CASCADE
Why don't you wanna read docs ?
Anonymous
yes but i did't get that
Mirco
yes but i did't get that
CASCADE is not related to Django, you need to study how databases work models.CASCADE is related to SQL CASCADE
Anonymous
thanks
apple
in django what is CASCADE
Delete the entire model when parent class is deleted or something
Shiva
@paulox shall i DM you ? I have some doubts in GIS
Anonymous
Hi
Anonymous
Does django has future
Anonymous
I new to django and python
mark
Does django has future
does indu has a future
Anonymous
does indu has a future
I'm thinking to learn it
Mirco
Does django has future
brilliant one 😊
Anonymous
Paolo
@paulox shall i DM you ? I have some doubts in GIS
Please add a comment in my blog for question about GIS, so when I'll a few times I'll try to reply https://www.paulox.net/2019/04/12/djangocon-europe-2019/
Shiva
Ok
Mirco
Can u answer me
I answered ya
Anonymous
I answered ya
What did u answered