Charly
could u plz help me with this
Don't put pressure on me I'mhelping you already
Yooo
ok
Charly
project/templates/index.html
try with: project/templates/app1/index.html
Yooo
template is in project folder
Yooo
tried didnt work :proj2/template/app1/index.html
Charly
Yooo
yes with s only
Charly
and app1 shoud be the name of your app (not project)
Yooo
def temp(request): return render(request,'proj2/templates/app1/index.html')
Charly
but the path should be the one I told you
Yooo
worked thankyou
Yooo
but i have one doubt template should be in project folder right
Yooo
or can it be anywhere?
AleX
Good night Tell me please. How can I implement getting a data object via API in django rest framework. that is, I send to the front via api id_product, name_product, total_product making orders table now for orders but I can’t find information anywhere to write down not one product but an object for example, at the front, several products were selected, the quantity of each product was added to them and sent to the backend via api but I can't help but realize that such an object would come to me orders_id: id_product. count id_product, count id_product, count total_orders
Mohamed
Anyone have a good roadmap for django?
Gaurav
Do anyone know how to diploy django channels with websockets...
Gaurav
Can you help me
Doragonsureiyā
Gaurav
No
Why..??
Doragonsureiyā
Why..??
You can use Google to find that easy thing
Aritra
You can find everything inside Django Rest framework official doc
ok... I am using DRF as suggested by you along with CBV... I already had option for the user to signin via a webpage... now, does my User need to signin again for the api? suppose he needs to use both page and the api... does he need to signin twice?
Hugo
Hi guys, I'm a backend engineer. Due to my company circumstances I've been working on some non coding for a year now and I'm feeling like I've almost forgotten everything and lost my skills. I'm at a point where I'm doubting myself. I wanted to upskill. I wanna learn. Could you please help me with how to fill the skill gap that I'm facing? How to start over? A roadmap would be really helpful.
Aritra
Inside your app you will have another sign in page
yes... 2 signins... can we avoid that?
Mirco
yes... 2 signins... can we avoid that?
No, unless you build a single sign on or use social for single sign on
Aritra
No, unless you build a single sign on or use social for single sign on
what do you mean by building a single sign on? we already have a signin page used by web users... now all we want is, add notification support in the app... web users don't need notifications...
Aritra
using flutter
Aritra
don't want to use firebase
Mirco
that is an extra feature...
Useless, I won't install an app that does nothing honestly
Mirco
Maybe rethink a bit
Aritra
for users who need... you know... we are not commercial companies... we are students in an university... prof said make an app and see if people uses it or not
Aritra
also it is not coursework... just a hobby...
Aritra
No, unless you build a single sign on or use social for single sign on
ok... so I figured out we can't have both of these options... SSO will be compromising with security... and social sign ins will be again a lot of work... and change everything we have done till now
Aritra
so let the user login twice for now... later when we will be pro in dart and flutter we can code the frontend part in dart only... no webviews then...
Doragonsureiyā
ok... thanks a lot Mirco
You're welcome! 😊
Gaurav
S
Can anybody give me rest framework project github link?
S
Ok
S
But im not getting
ask
Anyone please suggest best free resources to learn django rest framework..
Aritra
Store the user logged details on session and pass it in all pages when rendering
no need... I have figured out simpler hacks for now... Thanks though
Doragonsureiyā
Anyone please suggest best free resources to learn django rest framework..
Are you looking for Django REST Framework documentation? Here you have it: https://www.django-rest-framework.org/
Sobhan
Hi, hope you have great time. I have an html template that contains one page and there is an email field in it. I want to save all the field entries in the database through the model, but when I check the database, I see the input values ​​are not saved in the database. Do you have any ideas?
Alex
I just return rendered page
they mean how your view handle post data
Sobhan
they mean how your view handle post data
It takes the values ​​of the html field as a post Like : request.POST(‘’html_field_name’’)
Sobhan
I think I didn’t get your mean
Alex
are you using function based view?
Hussein
👋 Hello
Hussein
I need the best algorithm for the following example: I have a lot of posts, it can be a huge number, maybe 10k posts or more I have a users table Every user who accesses the blog, I want to not be able to view it again What is the best way? Thank you in advance
Hussein
cj
Do you mean to make an intermediate table?
I mean to use a flag... a flag can be whatever you want, it's up to you if you want to make a new table or a new field or whatever other thing you want
Alex
Yes
share code
Семерухин Михаил
Hi guys! I have an issue! I have created FORM and want to render some data in it. More precise: data i have gotten from API (list of currensy) and want to chose items from this list in ChoiseField in my Form. But nothing works? I got an empty field VVVVVVVVVV Hear the link for my code VVVVVVVVVVVVVVVV http://linkode.org/#yG90JVr5vmIghj2Vu2DAh3
🍃
Error: That port is already in use. 👆👆👆 Hello, can anyone solve this problem?
Сергей
Error: That port is already in use. 👆👆👆 Hello, can anyone solve this problem?
Check who is running on the port. Maybe like this ss -tunlp | grep users If you have a service running on this port you'll need to stop it. (sudo systemctl stop service_name) If it's some container running on this port then stop it. (sudo docker container stop container_name)
Hussein
Hi I have many objects and I have an m2m field, how can I remove an element from the m2m field from all objects
Влад
Hi I am trying to create a json file to load data into a database. The question arose, how to correctly specify your model. It says myapp.person, should I just write "name"? https://django.fun/en/docs/django/4.0/howto/initial-data/
Nats
I get an Wanring when I use mongoengine and celery with django. [2022-12-16 04:48:49,805: WARNING/ForkPoolWorker-99] /opt/conda/envs/runtime/lib/python3.9/site-packages/pymongo/topology.py:164: UserWarning: MongoClient opened before fork. Create MongoClient only after forking. See PyMongo's documentation for details: https://pymongo.readthedocs.io/en/stable/faq.html#is-pymongo-fork-safe
Nats
How to creat mongoclient after celery concurrency?
Jasur
Who are do deploy project with crontab ?
Doragonsureiyā
Who are do deploy project with crontab ?
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
Patrick
Who are do deploy project with crontab ?
Create a function which you want to run Search for django crontab Define time interval for cron in settings Enable Cron
ishaan
A question : Hi, Can someone help me with a very simple question. So basically I am trying to import a json db file to firestore And i am getting this error : Root or document reference does not have a collections property From that I understand that my db is not in the same format as needed But i can find no diff in the formats Any idea? Module I am using is : Node-firestore-import-export (github)