Kk
Why??
Luciano
Anonymous
Where to learn django basics
Rohan
Where to learn django basics
By reading the pinned post
Anonymous
??
Doragonsureiyā
??
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Anonymous
Thx
Holla
How to add bootstrap to django project not cdn am followimg along a tut he used cdn but i dont want to use cdn
Alessio Balderi
What do you advice for server production?
Mirco
What do you advice for server production?
Explain better what u wanna know
Alessio Balderi
Explain better what u wanna know
I'd like to deploy a web server in production on a vps
Holla
Download Bootstrap files and include them into your templates
I moved the bootstrap folder in my templates and included my base.html still didnt work
Mirco
I'd like to deploy a web server in production on a vps
Start reading the deployment topic on official docs
Holla
If you don't share code we cannot tell u so much
Media is not allowed in here can share code only pic check pm
Mirco
Media is not allowed in here can share code only pic check pm
I don't answer in PM, you need to read rules 🙂
Abdul
I moved the bootstrap folder in my templates and included my base.html still didnt work
Use correct template tags for the links in base.html nd also chrck the template folder directory added in settings.py file. {%load staticfiles %}..... Still sharing code pic is good option for exact resolution
Holla
Lemme check that
Abdul
load static is enough now
Yeah my bad...! 😁
Holla
But their is no static folder
Holla
Should i move the bootstrap folder to static
Abdul
Yes... Its a good to maintain css js and websiteimages in static folder
Holla
Ok
Holla
Nothing worked
Abdul
Add STATICFILES_DIRS list in settings.py
Mirco
Nothing worked
Share settings file using pastebin and a template file where you try to include It's faster if you wanna receive help
Holla
I am using data... my pc is not connected i would share it long time ago
Abdul
Give your static dir complete machine path inside that list... You can use os.path.join(BASE_DIR, "static") #this static will be your static folder name. Save this to avarible and add this to list...
Abdul
Still your are facing issue its best way is go through static django ref......... Or as @Micro suggested...share code
Knight
1) path('login/', Login.as_view(), name='login-page'), VS 2) path('login', Login.as_view(), name='login-page'), Which one is correct way to define a path between 1 and 2?
cj
just there's some preference to use a trailing slash on django
Knight
When I use the 1, I have to end the url with slash. But strangely its only for login, for other urls I dont have to end with slash
cj
🤔 if not a chapter, at least a paragraph
Knight
Thanks for helping, I will look for it!
Deep
Hey Folks, i need some help with creating different types of users and mapping those to each other.
Deep
Pls guide me through
Ярослав
Hi. Tell me how you can return multiple values to Ajax using HttpResponse
Ярослав
You can use json. Like jsonresponse
I know that. But isn't there another way to return multiple values with HttpResponse?
Ярослав
Like what?
For example a list
Ярослав
Like what?
Or a dictionary
Alex
Or a dictionary
Oo, learn json spec.
Ярослав
Oo, learn json spec.
It's strange. Json is certainly good, but why such difficulties for a simple action?
Alex
It's strange. Json is certainly good, but why such difficulties for a simple action?
ffs, why do you think serialization is a simple task? How do you want js to interpret python's array of numbers as such [1_000_000, float("inf"), 1.1e10]
Xavier
Hey Folks, i need some help with creating different types of users and mapping those to each other.
many to many key will help you a lot good luck https://docs.djangoproject.com/en/3.0/topics/db/examples/many_to_many/
Prithvi
Error = Class 'post' has no 'objects' member pylint(no-member) That is error in my django project how to solve
Viram
Hey please help how can I upload and download pdf file in django?
Alex
Hey please help how can I upload and download pdf file in django?
to upload a file from a web form you need to define it as multipart and delcare file type input.
Viram
Ok thanks bro👍
Bunty chhatri wala..
Used absolute url on detail.html page..and on the same page I'm using another url likr this { url 'email' posts.id } Not working.. because this link is sending some data from that page also..how to solve that
Bunty chhatri wala..
Anyone?
Bunty chhatri wala..
Bunty chhatri wala..
On a list page..i defined a url like this {{ posts.get_absoulte_url }} And when it redirect me to a detail page..
Sachin
% % maybe
Use this after curly brackets
Sachin
And before it's ending
Bunty chhatri wala..
I set up 1 link on detail page which is { url 'email' posts.id }
Bunty chhatri wala..
Its not working.. i think..it is the issue between absolute url and naming url..
Bunty chhatri wala..
Bunty chhatri wala..
Use this after curly brackets
Thanks it worked.. i forgot to add %% in naming url
vijay
def sort_month(): b = Passenger.objects.values_list('pass_dob', flat=True) a = sorted(b, key=attrgetter('month')) for i in a: c = Passenger.objects.filter(pass_dob=i).values_list('pass_name', flat=True) print(i, c) sort_month()
vijay
How to write test case
Anonymous
Any one have GitHub django pygal code snippet
Xavier
Already I checked but not getting any idea
why? that's written really nicely have u ever worked with unit testing before?
Alex
Already I checked but not getting any idea
You may be interested by this https://www.obeythetestinggoat.com/