Muflone
WHAT? no no
Anonymous
WHAT? no no
so...how?
Muflone
{% load static %} <link rel="stylesheet" href="{% static 'css/all.css' %}">
Muflone
why don't you read documentation?
Anonymous
Muflone
google: django static files first result
Anonymous
you...how to use static "whatever"?
Muflone
whatever is your file
Anonymous
wait...wait
Anonymous
no...no
Muflone
whatever.jpg
Anonymous
I mean something else
Anonymous
i read the documentation... but i want to use this pattern...look: {% load whatever %} <link rel="stylesheet" href="{% whatever 'css/all.css' %}">
Anonymous
is it possible?
Muflone
what should do whatever ?
Anonymous
is it possible that use custom name instead of static?
Get
{% load static %}
Muflone
you should create a custom module, to serve static files
Anonymous
you should create a custom module, to serve static files
thanks... Is there a file or site guide؟
Anonymous
i don't know do this
Anonymous
I want a guide
Muflone
https://docs.djangoproject.com/en/3.0/howto/custom-template-tags/#writing-custom-template-tags
Muflone
what's the reason to replace static with another tag which does the same thing?
Get
thanks... Is there a file or site guide؟
what do you want i can help you
Anonymous
what's the reason to replace static with another tag which does the same thing?
Thank you very very much i think...another tag_name maybe easy... But it was as if I was wrong
Anonymous
😂😂😂😂
Get
on django setting you assign the path of static files placed
Muflone
Thank you very very much i think...another tag_name maybe easy... But it was as if I was wrong
don't you like the word static? you wanted to use get_my_css 'css/all.css'
Muflone
LOL why?
Anonymous
LOL why?
😂😂😂😂😂 i don't know Maybe it's just a challenge
Muflone
this is the static tag source https://github.com/django/django/blob/master/django/templatetags/static.py have fun duplicating it with another name
Anonymous
now...i think... static is better
Adan
how does someone go about intergrating tensorflow to django
Get
how?where?
on the main directory of your project create the folder to store static files
Muflone
Anonymous
😙
😊😘
Get
how?where?
STATIC_URL = '/static/' STATIC_ROOT=os.path.join(BASE_DIR,'staticfiles') STATICFILES_DIRS=[os.path.join(BASE_DIR,'static')
Dhruva
How to override the django by default rest auth emails that is it contains text format but i want to have html features to it
Vishal
Hello guys Can anyone help me I need to add list of some items to database in a single field Like One user has rented a no books from our database Now I need to add all those books in in his account on that day So how to do this How the models will be for that?? Thanks
Adan
you should create a book model and refrence userID as ForeignField
Anonymous
{% widthratio 87 255 1 %} this is django template tag code which divide 87/255 how i write 87/255*100 inside template tag and show result
L
Hey veryone! I'm done trying to find out how to put a favicon on my site. Has anyone been able to do this succesfully?
L
I thought I did
Vishal
favicon files will be in static folder
Vishal
favicon files will be in static folder
https://docs.djangoproject.com/en/3.0/howto/static-files/
L
I do know that. But I can't seem to match the folder my apps looks for with the one which holds my favicon
L
I'll take a second look at the documentation
Vishal
Or you can check on javatpoint here explained better https://www.javatpoint.com/django-static-files-handling
L
Excellent resource
L
I'll give it a try and let you know
L
Thanks i advance
L
in*
Vishal
Kushal
Making api for waiter app and chef app
Kushal
Taking orders editing and updating orders
Mirco
Write in one message please
Kushal
In waiter app
Kushal
And chef app receives orders
Kushal
How to make
Mirco
Start studying Django Rest Framework and REST APIs
Kushal
I am currently working with a restaurant management system in django and waiter as well as chef application in java. I am confused about api creation. I want to make an order by assigning a waiter and sending an ordered item to the chef app. How to make an API in django for all these functionalities?
Kushal
I already worked with api for displaying data in android
Mirco
I already worked with api for displaying data in android
Perfect so you have an idea of what Django Rest Framework is ?
Kushal
Yes
Mirco
And what's you difficulty ? What you wanna do is basic CRUD APIs
Mirco
And with Django Rest Framework is pretty easy
Mirco
For example you need a Create View for your order by assigning the waiter before saving this order
Mirco
So you need a foreign key for the waiter or m2m I don't know your models
sm
I want to make quiz app I have created 3 models (Quiz , Question, Answer) Question has foreign key with Quiz Answer has foreign key Question I want to create view. So that i can only show those question who have same quiz subject ( i want to print each question on separate page) Plz help me how can i do that
Gil
I want to make quiz app I have created 3 models (Quiz , Question, Answer) Question has foreign key with Quiz Answer has foreign key Question I want to create view. So that i can only show those question who have same quiz subject ( i want to print each question on separate page) Plz help me how can i do that
It's time to play with Frontend: djangotemplates + viewsbackend I recommend to do all oficial tutorial that makes a Poll. Its similar https://docs.djangoproject.com/en/3.0/intro/tutorial01/ Then with some moditications you can do your project! Good luck!
ᐯᑌᏞᏦᗩᑎ📈
What to write to DATABASE_URL variable when connecting database