Ali
is there a django way to do chained dropdowns ?
Muflone
is there a django way to do chained dropdowns ?
google for your question: wsvincent blog
Mykel
sometimes when you ask question and people refer you to google it doesnt go well at all
Ali
am trying to get the id of a many2many before saving(creating) the record
Ali
ownerId.values_list('pk', flat=True) tried this but it's giving me this error
Ali
"<ClassesENG: testname>" needs to have a value for field "id" before this many-to-many relationship can be used.
Vishal
Hello guys I am vishal from india Can anyone help me about urls in django Actually i have two apps in my project so how to configure urls for both apps??
sagir
If you have two apps in your project then, you have to create urls.py file for each. And then you have to set the urlpatterns for the same view
Vishal
Explain
I have two apps in my project Both apps have its own views Like project/app1/views.py Project/app2/views.py Now how to configure urls for views of both different apps in project/urls.py
Shihasz
In project.urls
sagir
If you have two apps in your project then, you have to create urls.py file for each. And then you have to set the urlpatterns for the same view
Eg. If you have 2 apps app1 and app2 and app1 has fun1 function and app2 has fun2 function. Then you have to create urls. py file in the both app and in urls.py file of app1 you have to set urlpatterns for fun1 and in the urls.py file of app2 you have to set urlpatterns for fun2. Hope so that's enough for u
Anonymous
can I use a foreignKey which from view of mysql?
blank_
How to solve value error ,login didn't return an httpresponse object. Please help
S Sidharth
<div class="carousel-item active" style="background-image: url("{% static 'affiliate/images/2.jpg' %}")> This command is not loading the image in the background. Any help?
L
Hi.does anyone have a django tutorial videos
L
or any websites
S Sidharth
How to solve value error ,login didn't return an httpresponse object. Please help
did u try from django.http import HttpResponse in your app/views.py?
S Sidharth
Hi.does anyone have a django tutorial videos
django girls django official docs
Shihasz
yes
Did other static files render?
S Sidharth
Did other static files render?
yes. Only the image is missing
S Sidharth
rest of the site is ok
Shihasz
Is this image showing in img tag
Govind
I think you have to specify path in settings as well.
Shihasz
Just give a try
S Sidharth
I think you have to specify path in settings as well.
yes. Its already provided like STATIC_URL = '/static/' MEDIA_URL = 'affiliate/images/' STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'static'), ]
Shihasz
<div style="background-image: url({% static 'affiliate/images/2.jpg' %});"> This way?
Shihasz
is ; needed?
Not needed
S Sidharth
S Sidharth
Not needed
didnt work either
S Sidharth
Not needed
how u actually add images?
S Sidharth
same way?
Shihasz
<img src="{{MEDIA_URL}}a.jpg"> This is the best way
Amit
Str="abcdef aggshhdh" Print (str.isalpha()) Output is :False In input there will alphabet and space. How cn I check that it contains only Alphabet
Владислав
Help pls
look at the name variable, there is a difference isalpha() - returned TRUE if in string all symbols alphabets!
Amit
look at the name variable, there is a difference isalpha() - returned TRUE if in string all symbols alphabets!
Variable name is same but isalpha returns false whn u type space between charater
Владислав
spece != alphabets use if all(str.isalpha() or str.isspace() for str in original):
Yashendra
Some please suggest how can we have one FloatField less than other FloatField in a django model ?
Anonymous
I'm working on a django project for some days now..I have almost completed it but at last I realized I also need to delete the elements..eg..item in to do list...every tutorial online contains implementation using primary key..is there any other method to delete elements ?
Anonymous
Call delete method with filter
How to pass object to use filter function ?
Shihasz
How to pass object to use filter function ?
Modelname.objects.filter(condition).delete()
Anonymous
Modelname.objects.filter(condition).delete()
I want to have user to click on the object to delete it.. How to pass that value
Anton
Hello, guys! Can someone explain me why i can't send values(for example dict) between views? I know i can do it by session, but why i can't do it by return? Or i just miss understand documentation?
Shihasz
You may use an anchor tag for each displaying field in the template
Anton
Example: in one view i get some data. Use: return HttpResponseRedirect(reverse(view_name(request, **kwargs))), and get noreversematch, because of bad request, that get's from the view where i get data
Abel
is there any one who had hosted django in plesk webhosting editions
Anshul
Recently found this amazing article on Machine Learning applications. https://dev.to/anujgupta/12-astonishing-machine-learning-applications-3fkh
Anonymous
You may use an anchor tag for each displaying field in the template
Reverse for 'remove' with keyword arguments '{'pk': ''}' not found. 1 pattern(s) tried: ['remove\\/\\(\\?P(?P<pk>[^/]+)\\\\d\\+\\)\\/\\$$'] after adding pk in url
Akash
I have a django app which works all fine in Debug = True When I set Debug = False and also run collectstatic half of my static files stop working, the js and CSS are not working which are in app directory app_name/static/css app_name/static/js How to resolve this
Day
Django channels, am getting an error of """Multiple exceptions: [Errno 10061] Connect call failed ('::1', 6379, 0, 0), [Errno 10061] Connect call failed ('127.0.0.1', 6379) WebSocket DISCONNECT /ws/chat/example/ [127.0.0.1:63565]"""
Day
thats on my terminal
Day
it's my first time dealing with django channels, i just installed django-redis
Day
@g63nga how do i run the redis server.?
Day
i downloaded redis desktop manager tried to use it, but didnt connect, i also have redis client
Jigani
@g63nga how do i run the redis server.?
You'll also have to install a redis server and get it running
Jigani
What os do you use?