cj
Charly
cj
Matin
Ok , I'll be appreciated if you help me
Mikhail
I suppose, that problem with accordion in the area of musical instruments, not django
Matin
So what should I do..
Pooya
Hi to all,
Can anybody tell me how I can build music notation and play it with django?
Joao Paulo
hello everyone! i'm stuck trying to use django automcomplete light inside a modal ... anyone with experience in this situation?
Charly
Joao Paulo
i cant load the autcomplete data ...that's the problem...outside modal it works...
Pooya
Pooya
Godfred
Hello, please any Django documentation for me as a beginner
Godfred
Thank you
Roshan
× Encountered error while trying to install package.
╰─> psycopg2
i face this error..please help me on it
Prakash
Please suggest me
I have a CSV file
Which I have to display on a html page in table format
But requirement is to display on html page as well as edit those data.. any idea?
Basically fetch data from CSV and display+edit option i need
Carolyn
Hi
I want to create some APIs using django and utilize them in my frontend which is in next.js
Do i need to integrate them? Or I just can keep them separate and use it with fetch api?
Mikhail
Carolyn
Mikhail
yep, for example from docs: https://docs.djangoproject.com/en/4.1/topics/auth/default/
SUSHANT
I am getting INDENTATION error in views.py ...in return statement...
Maxim
Sergey
hi everyone! Is there any way to paginate on some nested field?
Carolyn
@lex
how to solve error that shown the browser page not found 404
Vishal
how to have a form from another model inside a detailview in django?
Vishal
Anyone can help me regarding this ?
Safeer
Is there anybody who can help with python django tutorial complete course 2022 video?
Maxim
Safeer
In youtube videos are outdated
Gregory
I try manage my static files. I have:
STATIC_ROOT = os.path.join(ROOT_DIR, 'static/')
STATIC_URL = 'static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]
i made python manage.py collstatics
it was OK. All my files coped to STATIC_ROOT
Bat i have 404:
[09/Sep/2022 13:42:51] "GET /static/admin/js/vendor/jquery/jquery.min.js HTTP/1.1" 404 179
[09/Sep/2022 13:42:52] "GET /static/admin/js/vendor/xregexp/xregexp.min.js HTTP/1.1" 404 179
Whats wrong?
NAMIKAZE
Mikhail
pycharm -> code -> reformat will help with indentations even in Django projects
Maxim
No Name please read the rules
Peter
Hi team,
I am a django student. I have learnt a lot in the last few months but I have a question.
http://linkode.org/#wopJlJUeCB1VvzAbyXUO53
Maxim
hello
I am building a charging station booking django application, I want to know , how should I make model so that no 2 people can book charging station for same time interval.
hello
If any one know than can you help me.
Rojitech
Tanner
xdd
Hi all, help me please, if someone here worked with stripe, maybe you know, how i can fix the PermissionError?
Carlos
Hi all, do you recommen Work with django templates for medium project ?
Peter
it's not about rules, it's about common sense
Thanks for triggering my mind to think outside the box.
Form in the views function receives request.POST which is a QueryDict. The trick was to create a querydict from a python dictionary and then save the form.
Peter
http://linkode.org/#tRO5SRNAhXKdRG1c8ao9L3
finegorko
guys what's better: Comment.objects.filter(post=self.kwargs.get('post_id'))
or
get_object_or_404(Post, pk=self.kwargs.get('post_id')).comments.all()
?
Naggafin
honestly I would do both though (get the object and then get all its comments) because then you can error check if an invalid post_id was given. pulling directly from kwargs could give the filter function invalid data and if you don't handle the resulting exception you'll get a 500 response
Nour
Good evening everyone
I'm trying to deploy a website on pythonanywhere and it keeps showing:
No module named 'django'
Charly
Nour
I can see django in my venv
Using pip list
finegorko
finegorko
finegorko
or ur requirements.txt
Nour
Nour
I can import it using bash
Naggafin
Naggafin
the reason being is because it can be erroneous to directly pull from self.kwargs in a view and feed it into a model filter
Nour
Yes
Naggafin
say if someone typed the URL and fed junk data like ?post_id=sokfiwnahisjwnd . inputting that into filter might be erroneous if it can't coerce to a type
Rojitech
Yes
Make sure you add it to your requirements
Naggafin
it looks like your post_id field should coerce into an integer, but obviously such a string doesn't coerce, and there for would result in 500 response
Naggafin
now with get_obj_or_404, obviously you'd get a 404 response for any possible lookup failure, which is probably the desired behavior
finegorko
thank you sir !
Naggafin
Nour
Naggafin
what operating system are you trying to deploy on?
Nour
I think linux
Naggafin
OK, that's good. it's much easier IMHO to operate django, or python at all for that matter, on a Unix based OS