#elvin
Django
cj
Hy im not able to add jinja templte to pycharm .not much stuff is there on youtube related to this . Any alternate i can add istead of jinja ?
why do you want to use jinja if you already have DTL? also, why are you searching things on YouTube?
Knight
Hi all~ Should I include status code in Jsonresponse when responding to the api call? or the Jsonresponse will return the status code byitself?
Unknown
Hy everyone
Unknown
I want to learn django is there any best Android application for it ..
Ash
Music streaming app with Django + vuejs + Django rest framework + jwt https://glammingspace.blogspot.com/2020/08/lets-build-music-streaming-app-with.html
Pradyum
Can anyone Solve this issue? https://stackoverflow.com/q/64099264/7999665
Ghorz
And I want to save the image to separate folder
You can write its quite easy using pqt https://duckduckgo.com/?q=python+Web+page+screenshot&ia=qa&iax=qa
Star
Hi im a complete beginner to django and I really got stuck at a point were image inside my static file won't load Inside project settings I added: static_dir =os.path.join(BASE_DIR,"static") STATIC_URL ='/static/' STATICFILES_DIR= [STATIC_DIR,] And on index page {% load static %} And also the img tag with {% static 'images/st.jpg'%} While running server the webpage doesn't load the image and returns a 404
Star
Can anyone help me out
Anonymous
login [name='login'] The empty path didn't match any of these. I have given login.urls on project urls.py it shows like this . Please help
Anonymous
path('', include(login.urls))
Anonymous
Project name is account and the app name is login
Star
From django.conf import settings From django.conf.url.static import static Urlpatterns = [ #other paths] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Star
path('', include(login.urls))
U do this inside your project urls twhich would refer to you apps url page and inside that url file you can give different path to your views
Anonymous
Hi, I have a simple quesion.
Anonymous
Please help me
Anonymous
Hi, I have a simple quesion.
Why don't u just ask?
Anonymous
in the callback funciton, it's defined like this store_data(self, request, *args, **kwargs)
Anonymous
Can I get query params at kwargs instead of using request.GET?
Anonymous
Method is get, detail is false
Anonymous
bro i learning now
Akorede
Pls I need a flask group
Doragonsureiyā
Pls I need a flask group
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
iNcAeLuM
Hi, I am a little confuse of how django manages static files: I have an app called convert. inside that folder I created /static/convert/css placed css inside that folder. I loaded {% load static %} in my indedx.html and changed this line to look for css file: <link rel="stylesheet" href="{% static "css/style.css" %}" but server is returning: Not Found: /convert/css/style.css
iNcAeLuM
what I am doing wrong?
iNcAeLuM
Did u also include in setting.py
i have this line in my settings.py: STATIC_URL = '/static/'
Anonymous
i have this line in my settings.py: STATIC_URL = '/static/'
Set the static file dur that is: STATICFILES_DIRS = (BASE_DIR, 'static')
iNcAeLuM
Set the static file dur that is: STATICFILES_DIRS = (BASE_DIR, 'static')
Added that lien in settings.py, but still have same error: Not Found: /convert/css/style.css
iNcAeLuM
i have this tree: convert static convert css
Star
Instead of os.path.join ....use basedir.joinpath('static')
Mine was 3.1.1 and yes I got the issue solved because I placed the static folder in project folder not in app , thank you
Anonymous
i have this tree: convert static convert css
The static file must be in the root directory not inside the app
The mint of Linux **
The static file must be in the root directory not inside the app
It also work for many editors or u can say it must for atom
π
Traceback (most recent call last): File "————————.py", line 32, in <module> number_of_frames = int(sys.argv[1]) IndexError: list index out of range how do I fix this {sys.argv[1]) I've changed it to diffferent number and it still says out of range only 0 shows a different error
The mint of Linux **
For base dir...u have to specifiy TEMPLATE_DIR =[ 'TEMPLATES']
iNcAeLuM
The static file must be in the root directory not inside the app
i placed static folder in main dir (where manage.py is) and still same error:
Roman
Hi guys, does anyone know s packagee for DRF to create live chat ?
Anonymous
3
Dir tree static convert css Html file <link rel="stylesheet" href="{% static "convert/css/style.css" %}" Settings.py STATICFILES_DIRS = [ os.path.join(BASE_DIR, '' static"),]
iNcAeLuM
Dir tree static convert css Html file <link rel="stylesheet" href="{% static "convert/css/style.css" %}" Settings.py STATICFILES_DIRS = [ os.path.join(BASE_DIR, '' static"),]
dont know what is happening: i have the tree like u said: project/static/convert/css and inside all css placed STARICFILES_DIRS = [ os.path.join(BASE_DIR, '' static"),] in settings.py and in index.html : Html file <link rel="stylesheet" href="{% static "convert/css/skel.css" %}" /> <link rel="stylesheet" href="{% static "convert/css/style/style.css" %}" /> <link rel="stylesheet" href="{% static "convert/css/style-xlarge.css" %}" /> at the beginning of index.html: {% load static %} server still returning: Not Found: /convert/css/style.css Not Found: /convert/css/style-xlarge.css Not Found: /convert/css/style-large.css
Anonymous
STATICFILES_DIRS check the spelling
iNcAeLuM
in fact is strange cuz this other lines: <script src="{% static "js/jquery.min.js" %}"></script> <script src="{% static "js/skel.min.js" %}"></script> <script src="{% static "js/skel-layers.min.js" %}"></script> <script src="{% static "js/init.js" %}"></script> are not returning error
iNcAeLuM
STATICFILES_DIRS check the spelling
am pretty sure i am writting this well STATICFILES_DIRS = [os.path.join(BASE_DIR,'static'),]
Anonymous
am pretty sure i am writting this well STATICFILES_DIRS = [os.path.join(BASE_DIR,'static'),]
Well that's how it's done, have worked with static files before?
Anonymous
I am trying to use return statement to output my result but it gives me an empty execution why????
Julio Cezar
I've a problem with Cards in frontend. Does anyone understand about It?
iNcAeLuM
Anonymous
am pretty sure i am writting this well STATICFILES_DIRS = [os.path.join(BASE_DIR,'static'),]
STATICFILES_DIRS =(os.path.join(BASE_DIR,"staticfoldername")) Try this, it worked for me
Julio Cezar
I've a problem with Cards in frontend. Does anyone understand about It?
In the First and Second line there are 3 cards aligned, but in the third LINE they become 2 per line.
Anonymous
NOP am just trying to understand how it works
Make sure your folder name and href match, i think u hv a spelling error, double check ur css file name
Kamlesh
Try <link rel="stylesheet" href="{% static "convert/style-xlarge.css" %}" />
Anonymous
am looking
may be you should try this one STATICFILES_DIRS = (BASE_DIR, "static" )
Darth✧
is it possible to use computational power from aws while running in local machine with django?
Roman
is it possible to use computational power from aws while running in local machine with django?
Yeah,sort it. I thik in PyCharm as the interpeter you can set up SFTP host one
Darth✧
Yeah,sort it. I thik in PyCharm as the interpeter you can set up SFTP host one
I already have pycharm professional I'd....can you refer any blog or video for this ?
Anonymous
I am building an app that stores peoples pictures and after grabbing from CCTV it recognizes from the stored pics using opencv but, pip install face_recognition is not working for me how can i install this package in win10
Anonymous
Have you tried anaconda?
No could tell me how?
R.U.S.H.A.B.H
No could tell me how?
Try searching anaconda installation in win 10 and install open cv tutorial is there
Anonymous
Try searching anaconda installation in win 10 and install open cv tutorial is there
Okay but how do i install face_recognition using anaconda
Anonymous
Hello everyone.. Where should I get Django tutorial
R.U.S.H.A.B.H
Okay but how do i install face_recognition using anaconda
It can be done after anaconda installed
Star
Hello everyone.. Where should I get Django tutorial
Django has a well documented office page but if your like me who's completely new I am undergoing a Udemy course and it's helpful
Star
*Official page