SaidBoy
excuse me, I'm newbie in django. I want to ask, what is the use of testing specifically. because it always does a test when I finish creating a code without using test in django. for example if I want to insert data into database I always do that and look directly into my database. if I make a function I always print the data first, if I'm sure then I'll use the function. so I want to learn about tests in django. what is it and what is it for?
Muflone
testing are useful to make sure your model/views code is correct and it's returning what you expect to have
Soham
Soham
This helps you figure out if new updates in ur code has broken other functionality or not. It also helps u think before writing your code.
Amirmohammad
Hello, the api I wrote on the side of Flutter, which I run, runs into this bug: Unsupported media type \"application/json\" in request. Is there anyone to help?
Aniket
Hey guys, I have a query. I have two models one is file and other is user in which I have foreign key of file as profile_pic_id. In admin.py of file app I have FileAdmin in which I created a def save_model() function in which when admin uploads an image/file then in save model I handled file upload in s3 and save file. Main query is that now in admin panel when I created file record from user's UserAdmin section then it's not able to return record id in profile _pic_id. Can anyone provide me solution on it? And sorry If I am not able to explain problem clearly.
Maxim
I can share that issue's image if anyone want to
1. no images 2. everything you share, you share it here
Shaheen
Django is a front-end or back-end?
Prasanth
what are the basic topics of django for a beginner?.. can someone help me out?
Muflone
you both @manwithoute and @SHAHEEN_VSA should read the basic django tutorial
Ammar
Hello, the api I wrote on the side of Flutter, which I run, runs into this bug: Unsupported media type \"application/json\" in request. Is there anyone to help?
Make sure that you specify the type as "application/json" in the flutter side ( or you are really returning json content throug something like rest framework which will make lifr easier )
Eternity
Django is a front-end or back-end?
It's for backend, but you can use templates to implement HTML or CSS code
Ammar
Its is meaning this errors on the flutter code its True?
It might be not sure cuz is cant see any thing but as i know it can be the problem
Eclair
class RegisterPage(FormView): template_name = 'recipes/register.html' form_class = UserCreationForm redirect_authenticated_user = True success_url = reverse_lazy('home') def form_valid(self, form): user = form.save() if user is not None: login(self.request, user) return super(RegisterPage, self).form_valid(form) def get(self, *args, **kwargs): if self.request.user.is_authenticated: return redirect('home') return super(RegisterPage, self).get(*args, **kwargs) why this register form display in row?
Shaheen
i got this warring from my model anyone please help me It is impossible to add a non-nullable field 'id' to salary without specifying a default. This is because the database needs something to populate existing rows. Please select a fix: 1) Provide a one-off default now (will be set on all existing rows with a null value for this column) 2) Quit and manually define a default value in models.py. Select an option:
Anonymous
Hey guys I need help: I wanted to add the update profile feature to my Django website. The function of views is working but not properly because whenever I update data of the user by a form the first name and the last name is not updating. I am using Django's built-in User model. Here are my files attached. https://gist.github.com/MahdinOhi/567b51194010a4400daa5bb486bbb908 Here is the GitHub link of my project: https://github.com/MahdinOhi/MyBlog/tree/profile
Tejas
Settings.py file When we register app in settings.py file What is the difference between: INSTALLEDAPPS = [ " appname", ] AND INSTALLEDAPPS = [ " appname.apps.AccountConfig", ]
_
I host my project in cpannel but root url only working why?
Targoon
I host my project in cpannel but root url only working why?
you sure your hosting is for django/python?
Kareem
How can i deploy my django on my vps server I want to make the server ready so what's the steps i know there are 2 categories 1) production code 2) server setup I want a tutorial for server setup, vps is Linux CentOS
Muflone
Solution?
the telegram search button in the upper right
Muflone
this is a real help instead. being able to search is a requirement for this job
Muflone
no, it's asked TWICE per day it will not be deprecated in just 12 hrs don't confuse lazyness with obsolescence
Jimmies San
And you should learn how to Google before asking
Jimmies San
And only ask for help when you already have something in place
Jimmies San
It's the basic rule for learning, mate
Jimmies San
Did you Google? Did you try?
Jimmies San
If yes: ask for a specific problem/help
Jimmies San
If not: go study and come back, will find a lot of support
Arman
Can someone introduce a course where an web application like Instagram can be made by Django or rest framework ?
Meghana
Hi everyone I want to learn django from the basic level
Meghana
Where should I start
Doragonsureiyā
Hi everyone I want to learn django from the basic level
Check out PythonRes, a channel for Python resources - video courses, pdf books, tutorials and other info to help you learn Python.
Meghana
I learned python and want to know about its frameworks
Shivam
I learned python and want to know about its frameworks
Django DjangoRestFramework Flask Fast api etc
Maxim
I learned python and want to know about its frameworks
this is the Django group, not a Python group
Ammar
hey i am trying to annotate a forgein key and serialize it how ever i am getting this error Got AttributeError when attempting to get a value for field `brand_name` on serializer `MedicineListSerializer`. The serializer field might be named incorrectly and not match any attribute or key on the `int` instance. Original exception text was: 'int' object has no attribute 'brand_name'. this is the code can some one help https://dpaste.org/ENzsU/slim
Kha
How to do crud
Charly
How to do crud
Start by reading the official tutorial
𝐷𝐴𝑁𝐼𝐸𝐿
Hi guys Where should i learn Free django tutorials???
Victor
Hi guys Where should i learn Free django tutorials???
https://docs.djangoproject.com/en/4.2/intro/tutorial01/
Doragonsureiyā
Hi guys Where should i learn Free django tutorials???
Check out PythonRes, a channel for Python resources - video courses, pdf books, tutorials and other info to help you learn Python.
Amin
Hi I wanna use tinymce with math and pictures Can anybody help me?
Ali
Is there any tutorial about graph in django?
kiash
But in server it gives a error 500 internal server erroe on in case of large files.. is there any to upload large files without erroe
Collect static files or talk to the one giving hosting services to check on static files on there end
Ali
What kind of graph?
Totally im looking for creating relationships with graph but i don’t find any thing about that on internet
Maxim
What do you mean by graph
Mathematical object, https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)
kiash
Mathematical object, https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)
This are discrete related I don't see it's connection with django
kiash
If it's to load graphs on django framework maybe you can load the values and create it's logic with django then us js on frontend template to allow you draw graphs
Maxim
Totally im looking for creating relationships with graph but i don’t find any thing about that on internet
in programming there are not always paths marked by tutorials, sometimes you have to pave them yourself
Илья
Totally im looking for creating relationships with graph but i don’t find any thing about that on internet
Do you need graph storage facilities? Do it with Django models. Create "graph" , "vertex" models and fields or a separate table for relations between vertices
Ali
Do you need graph storage facilities? Do it with Django models. Create "graph" , "vertex" models and fields or a separate table for relations between vertices
Is it ok with something like social networks? Because every time you want to find for example followers of a page there is a hit to database i want to know is it ok? Social medias like facebook or instagram , How they made the relationship part of there app?
Илья
Is it ok with something like social networks? Because every time you want to find for example followers of a page there is a hit to database i want to know is it ok? Social medias like facebook or instagram , How they made the relationship part of there app?
I don’t know exactly how it works in large social networks, but it seems to me that it’s all about the proper scaling of the database. And the structure of the tables will be approximately similar to what comes to your mind when you think about it. There are separate tables that represent different relationships. Subscribers, likes, subscriptions and more
Илья
Yes I also think it’s about relational databases But handling that amount of user is crazy
Perhaps you will find answers to some questions if you think about database sharding. It is also worth delving into the topic of query caching.
Lauriano
Hi Guys How to resize images to fit the html, that is, the images all the same size? I saw this article, however, I was kind of confused (I'm not Frontend, Sorry) https://tailwindcss.com/docs/object-fit#resizing-to-cover-a-container
Doragonsureiyā
Hi Guys How to resize images to fit the html, that is, the images all the same size? I saw this article, however, I was kind of confused (I'm not Frontend, Sorry) https://tailwindcss.com/docs/object-fit#resizing-to-cover-a-container
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Charly
Anyone?
What have you tried? Where are your stuck?
Amin
What have you tried? Where are your stuck?
I've tried mathjax but got some errors and couldn't fix them. I'm looking for the easiest solution. I want to copy my content from word (it has math and pictures)
Lauriano
Bhushan
How to serialize context in Apiview
Dlight
Hey guys, I posted this question on stackoverflow no answer. Appreciate the help. I'm using CustomUser ( AbstractUser ) In Signup form I just want to have Email , no password . After we send a confirmation email , user can set the password how can I remove password in Sign up form?
Hey guys I'm still looking for the answer. No one in this 15k group don't know the answer???. Please don't refer me to Stackoverflow responses . Try them all none is working !!! Really appreciate the help
Doragonsureiyā
How to serialize context in Apiview
These single steps will help you a lot: 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