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
JN
Ashraf
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.
Doragonsureiyā
Aniket
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
Amirmohammad
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
Anonymous
Anonymous
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
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
Kareem
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
Meghana
I learned python and want to know about its frameworks
Shivam
Maxim
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
𝐷𝐴𝑁𝐼𝐸𝐿
Hi guys
Where should i learn
Free django tutorials???
Amin
Hi
I wanna use tinymce with math and pictures
Can anybody help me?
Ali
Is there any tutorial about graph in django?
Charly
kiash
Ali
What kind of graph?
Totally im looking for creating relationships with graph but i don’t find any thing about that on internet
kiash
kiash
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
Ali
Илья
Ali
Ali
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ā
Amin
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
Lauriano
Bhushan
How to serialize context in Apiview
Ali
Dlight
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