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
raven
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?
Mirco
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
Anonymous
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
Shiva
Paolo
You're welcome
Ritika Tiwari
Has anyone made a ecommerce website with django
Ritika Tiwari
??
sho (he / him)
apple
raven
Anonymous
in my django project e.g in polls app what is test.py and hoe to use it
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
Anonymous
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
Anonymous
and also related to database
Anonymous
?
Anonymous
OK
Mirco
apple
Anonymous
in django what is CASCADE
Anonymous
?
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
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
Anonymous
Anonymous
Shiva
Ok
Mirco