Anders (izzno / gooood) 🇳🇴
right ?
Anders (izzno / gooood) 🇳🇴
I've been in flask for a month 🙃
Anders (izzno / gooood) 🇳🇴
and some function to handle routes if I am not mistaken.
cj
Anders (izzno / gooood) 🇳🇴
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")] ?
Anders (izzno / gooood) 🇳🇴
The url option i was thinking about was for media files ;)
cj
ⓦⓐⓢⓓⓚⓘⓛⓛⓔⓡ
cj
licensed
hello. i am new with django and I'm having trouble with template paths:
TemplateDoesNotExist at /
core/student_list.html
i am using default template settings:
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
The correct template path is project/app/templates/student_list.html, right? This file exists but my project is searching at project/core/templates/core/student_list.html
Anders (izzno / gooood) 🇳🇴
licensed
i already tried dirs=['/templates/'] and same error
Anders (izzno / gooood) 🇳🇴
app/templates/app/
Anders (izzno / gooood) 🇳🇴
unless your app is going to be huge I find adding [os.path.join(BASE_DIR, "templates")] to the list and putting my templates in /templates/whateversreasonably
licensed
app/templates/app/
really?? this is very repetitive..
can't I use app/templates/ only? i think this is correct
Anders (izzno / gooood) 🇳🇴
no
Anders (izzno / gooood) 🇳🇴
This has to do with namespacing.
Anders (izzno / gooood) 🇳🇴
Shaun
I mean. They could just use app/templates/ only. Assuming the aren’t adding other stuff.
Shaun
They can change the template directory config to be name spaced when they grow. (As an option)
Shaun
You’re both correct
Ghorz
Shaun
licensed
licensed
what is django standards? /project/app/templates/app/ right?
Anders (izzno / gooood) 🇳🇴
ⓦⓐⓢⓓⓚⓘⓛⓛⓔⓡ
ⓦⓐⓢⓓⓚⓘⓛⓛⓔⓡ
anyway thanks for your maximum effort to this question, its really really helpful 😍😍😍 @c0x6A and @izznogooood 😍😍😍
ⓦⓐⓢⓓⓚⓘⓛⓛⓔⓡ
Shubham
cj
ⓦⓐⓢⓓⓚⓘⓛⓛⓔⓡ
@c0x6A did you work with django-channels?
cj
cj
Anders (izzno / gooood) 🇳🇴
Anders (izzno / gooood) 🇳🇴
(dont do that) ...
Anders (izzno / gooood) 🇳🇴
;)
ⓦⓐⓢⓓⓚⓘⓛⓛⓔⓡ
not yet
I did some basic things in channels. I handle the file upload using http request and need to pass that file url to the real time chat, I mean pass into the django-channels class 😢😢😢
ⓦⓐⓢⓓⓚⓘⓛⓛⓔⓡ
ⓦⓐⓢⓓⓚⓘⓛⓛⓔⓡ
Anders (izzno / gooood) 🇳🇴
I have a lot of experiance with linux (I use it daily, on every machine in the house/ work servers) but not alot with SElinux, and there's a reason for that.
Anders (izzno / gooood) 🇳🇴
My only regret is starting with computer science (programming) late in life (my life :) ) ...
Anonymous
I have 4 class each class reletion with another via foreign keys, but now i am not able to serialise the data
Anonymous
Anyone can help me onit
Sebuhi
return redirect('sendErc865')
first you need to import redirect after render in the up, like from django.shortcuts import render, redirect then the if the condition if fuch is False, it has redirect a template. what I see you dont have any condition,
Nizzle
Nizzle
Anyway redirect it is not working in my case
Anonymous
Nithin
I am deploying django with docker. while building the image I am running collectstatic. But django throws error saying it cant find the secrect_key env variable (I only take it from env variable and use diff values for dev and prod).
what is the best way to solve this ? i dont want to put a secrect value in setting, neither do i want to remove collectstatic (as logically it should run during building image). How do you guys do it?
Nithin
So while building set env variables for each?
ʚɞÇherry Łoveʚɞ
Sorry, I misunderstood.
ʚɞÇherry Łoveʚɞ
ʚɞÇherry Łoveʚɞ
i think this will work in your case.
Anonymous
I would like create an app for quiz.
Anonymous
Simple quiz.. Like object oriented questions.
Anonymous
Any one have done it ??
Corn
I’m what’s the best way to show real-time data on a webpage with out refreshing? For example sensor readings
ManJain
hey guys, I am trying to make a site which allows the users to upload and download. The uploaf part us done. But I couldn't get how to implement download functionality. I am string the files in FileStorageSystem
ʚɞÇherry Łoveʚɞ
Mirco
Your post instance is None , fix that
Bhupesh
George
Image of screen yay
Ghorz
Reactifying Django seem to be beautiful.
All you do is DRF your project then write the views functionalities in pure JavaScript React.
Mirco
Ghorz
Mirco
Mirco
sounds like u have urlspattern bad defined
Gio
hello guys, any Django developer interested in working on a project?