213
Hi, any tutorial how to send data from a frontend form to the DB?
213
using template engine?
Any tutorial? Thanks
Ali
Any tutorial? Thanks
I mean, are you using template engine in order to do that?
Ali
Or using front end frameworks like react and vue?
Ali
Basically, your templates are all in interact with your views and this is your view that interacts with the DB. (I'm talking about MVC or MVT or whatever you call it)
Suhaib_0.0
hello I want a question? Why can't I edit the css file
SHAH Kar
hi freinds,when i go to admin ,this error give me,"python has stopped working" can you help me ?
Scary
I am getting this error with rendering the templates what could be the problem here ? https://ibb.co/Hd7Xx7k image of the error with code
Ali
I am getting this error with rendering the templates what could be the problem here ? https://ibb.co/Hd7Xx7k image of the error with code
As u can see there, it says it's missing base.html which means, you have tried importing the base.html file from somewhere that is not available. Basically happens when you try extending it from other html templates.
Scary
if you can see down there i have base.html file on templates
Ali
if you can see down there i have base.html file on templates
You have it but you are probably addressing in a wrong way.
Scary
which is the right way
Scary
You have it but you are probably addressing in a wrong way.
If I added templates folder to polls app how can I render it ?
Anonymous
import requests r = requests.post( "https://api.deepai.org/api/waifu2x", files={ 'image': open('/path/to/your/file.jpg', 'rb'), }, headers={'api-key': 'fccf1a1a-e571-4384-8445-358c4d3ee1c5'} ) print(r.json())
Anonymous
How i change the open('/path') to path where i upload the image?
Adhil latheef
Is it possible to use django project as a application....on double click on icon it need runserver and open in browser
Nirzal
Hello guys I have a simple question. Which SMTP service should I use to send mails in Django Production level app? Can I use gmail smtp? I heard it limits the no of mail to send Or should I use some paid service like sendgrid or are there any free services?
Doragonsureiyā
LB (Ben)
Hello guys I have a simple question. Which SMTP service should I use to send mails in Django Production level app? Can I use gmail smtp? I heard it limits the no of mail to send Or should I use some paid service like sendgrid or are there any free services?
I would strongly recommend you do not use Gmail SMTP in production, at best you will reach a rate limit or at worst cause your account to be blocked. Many of the popular email services have a free tier but none will be completely free. https://cloud.google.com/appengine/docs/standard/python3/sending-messages (not Django specific) has a list of good email providers.
Nirzal
Sure. Thank you so much for your response.
Moses
I am new to django, anyone can train me on hourly bases ping me please. django is the best i want to learn
Doragonsureiyā
I am new to django, anyone can train me on hourly bases ping me please. django is the best i want to learn
Rule 🔟: Job-related offers are only allowed in the offtopic group. To not be considered spam, Job offers must include: • Skillset/techstack • Contact information • Brief job description • Pay figure • And can only be posted in @PythonOfftopic.
Prometheus
Hey everyone, I know intermediate Django, can do pretty complex database querying. I have made an inventory management system and a social media as well. What topics, besides DRF, should I learn to advance further?
Scary
Which django extension are you using since the one I found in vs code has an issue ie. If I install it html snippets won't work anymore
Deepa
Hi everyone!. How to customize django admin panel.
Doragonsureiyā
Hi everyone!. How to customize django admin panel.
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box, write down the same words you asked here Step 4: Read the first results
Patrick
Hey folks, I'm using pytest with Django (obviously). does anyone know how I could avoid adding to all my tests that touch database the @pytest.mark.django_db? I was reading the docs about any global fixture I could add to the conftest or even a marker to pytest.ini but nothing worked so far
Doragonsureiyā
Patrick
also i just found this https://pytest-django.readthedocs.io/en/latest/faq.html#how-can-i-give-database-access-to-all-my-tests-without-the-django-db-marker
Patrick
Never tried honestly, what I told you works like a charm 😊 So I don't need anything else
Yes, the link i sent work for all files/tests, but for my case only it was only one test file your works better. Early optmization we know it is not good
Fan / Ac
hello, this is kinda similar to question i asked, should i try to host tcp/ip server with django app so data send to the tcp/ip server will also reach to django app or should i send an http post request from the tcp server to django app
Anonymous
Hi what is the best way to integrate react and django?
Mirco
Hi what is the best way to integrate react and django?
The easiest way is to handle them separately So one project full Django e one full react So you build APIs with Django consumed by React
Fan / Ac
I did not get your question
i have a tcp/ip server and it need to send data to my django app
Mirco
i have a tcp/ip server and it need to send data to my django app
Which kind of data ? What's your goal ?
Fan / Ac
Which kind of data ? What's your goal ?
i have many tcp clients that sends data to tcp server i need this data in the django app its text data
Mirco
i have many tcp clients that sends data to tcp server i need this data in the django app its text data
Well just setup a view in Django that receives this data and do something with it
Patrick
Hi what is the best way to integrate react and django?
About this topic, I really like this blogpost https://mattsegal.dev/django-spa-infrastructure.html
Fan / Ac
Well just setup a view in Django that receives this data and do something with it
so you are suggesting to write a view that accept a http post request from the tcp/ip server 🤔
Mirco
but separately, besides CORS, is def the best way
Yeah, but CORS is not a problem by using django-cors-headers In a matter of mins, everything is setup and running
Fan / Ac
thanks 😁
Doragonsureiyā
thanks 😁
You're welcome! 😊
Mirco
Have you created the virtualenv ? Activated it and installed Django ?
Ali
Hi, how can I add an extra field to the response in DRF? I don't want this field to be fillable in the browser. Like I want user to be able to create a new item with these available fields: title: - - body: - - but the response that he gets after creating the new item should be look like this: id='---' title='---' body='---' Any implementation??
Ali
Just change the serializer by overriding the method involved
Does is implement the field in both request and response sides with ignoring the data coming from the request side??
5P34R
https://www.django-rest-framework.org/api-guide/serializers/#specifying-which-fields-to-include
Mirco
Any reference pls?
https://coderedirect.com/questions/495700/use-different-serializers-for-input-and-output-from-a-service
SHAH Kar
hello every one.can you help me about this error "python has stopped working" this error happens wen i ant login in django adminstration
Anonymous
Hi What techniques do I need to build an integrated single web app using django
Anonymous
What do you mean?
I want to build sap ( single application web) what I need to do this
Stanford Education 2
guys is it okay connecting Django to aiogram?
Anonymous
spa framework / library + drf
If I don’t need use a framework is that hard to build
5P34R
If I don’t need use a framework is that hard to build
its much easier and faster to make a spa with frontend frameworks rather than raw html js and vanilla js
Anonymous
Is it the best ?
5P34R
Is vanilla framework to build spa
u try according to your requirements
5P34R
like u can go with react,vue,angular, svelte as ur need
Anonymous
But can u tell me what the best framework to build spa
Anonymous
Using django and react
5P34R
if ur choosing react then u can create a spa itself
Anonymous
if ur choosing react then u can create a spa itself
Good news ! can give me the recourse