Rutya
I want to fetch citi from a country plz tell me how to do it with django rest framework
Charly
I read
The quickstart says how to make an API
Rutya
Send me url
Rutya
This link
Charly
Send me url
But you told us you have read the documentation, the quick start is on the documentation
Rutya
I saw that the link you are talking about is not there
Rutya
Can you plz send me
Rutya
Okk
Tiger
Hi guys. I am having this TemplateSyntaxError:
'json_script', expected 'endblock'. Did you forget to register or load this tag?
ChatGPT couldn't help)
Maxim
Wan
Hy, how to show BynariField in admin page??
Alex
no
I overrode PermissioRequiredMixin has_permission func and disabled raise_exception still traceback.
Here is the traceback:
https://pastebin.com/ZRNiruqL
Alex
Muhammed
Hi I migrating the model in django_restframework showing no changes detected.i,am using vscode
vivek
Doragonsureiyā
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Rohan
How can I manage user cart for my django e-commerce website as my last year project
Alireza
Hello
I want only the user who has the admin username to be able to see the price field. I wrote this, but it shows this field to other usernames too!
Help me...
class TaskUpdate(LoginRequireMixin, UpdateView):
model = Task
success_url = reverse_lazy('tasks')
fields= ['field_1', 'field_2', 'field_3', ... , 'price']
def get_context_data(self, kwargs):
context = super().get_context_data(kwargs)
if self.request.user.username != 'admin':
context = ['field_1', 'field_2', 'field_3', ...]
return context
.
Hello
I want only the user who has the admin username to be able to see the price field. I wrote this, but it shows this field to other usernames too!
Help me...
class TaskUpdate(LoginRequireMixin, UpdateView):
model = Task
success_url = reverse_lazy('tasks')
fields= ['field_1', 'field_2', 'field_3', ... , 'price']
def get_context_data(self, kwargs):
context = super().get_context_data(kwargs)
if self.request.user.username != 'admin':
context = ['field_1', 'field_2', 'field_3', ...]
return context
Show your template code in a code pasting website. I suspect the context data isn’t the only source of data you’re using.
Yavar kazemi
Hey everyone
I mistakenly removed a table from the database
And now I can't convert it with migrate recipe
What can i do ?
Neha
Hello guys is anyone know how to do login with mobile otp ...
cj
Abd Al Rhman
Guys, is there any video or article that shows how to integrate react.js with django?
AG
Guys, can you help me? I try to use model in view file, but I got this error
AG
I got error using Modelname.objects.all() - Cannot find reference 'objects' in Modelname
AG
But it works when I use python shell
Ani
Add
objects = models.Manager in the Modelname class
AG
Didn't work( . But 'objects' aren't highlighted now
Bharathi
hi all...does any one has code for sending otp to mobile number from 2factor.in in django
root
Hi all....so I need a little help with hosting a django website so here's the thing, I have a primary domain (www.example.com) and a subdomain (www.bookings.example.com).In the primary account I want WordPress which I have installed and it loads fine and I want to install django in the subdomain i.e bookings.example.com.Can anyone tell me how to configure the cPanel and how to install django correctly
Charly
root
Ok🥲
Aza
can anyone recommend good tutorial for login/signup ?
𝒮𝒽𝒶𝓏
Anyone,
Can you please help with a tutorial
Where we have LOGIN --> integrating LIVE YouTube VIDEO API --> LOGOUT
Артём
Hey guys! I’m a little bit confused learning Django forms and seems some explanation would be so appropriate here! In Django we have two types of forms: forms.Form and forms.Model. Reading Django official documentation I couldn’t find class heirs that these classes have (like UserCreationForm). If someone send me a source of documentation where I’ll find all necessary information or explain here what classes are inside form.Form and form.Model and when to use them, I’d be so grateful! Thanks a lot!
Kene
Hello
I want only the user who has the admin username to be able to see the price field. I wrote this, but it shows this field to other usernames too!
Help me...
class TaskUpdate(LoginRequireMixin, UpdateView):
model = Task
success_url = reverse_lazy('tasks')
fields= ['field_1', 'field_2', 'field_3', ... , 'price']
def get_context_data(self, kwargs):
context = super().get_context_data(kwargs)
if self.request.user.username != 'admin':
context = ['field_1', 'field_2', 'field_3', ...]
return context
I'd try 2 things here; either you use context.pop('price') since context is basically a dict or just check for the type of user when displaying the field in the template e.g {% if user.get_username == 'admin' }}
Seyed Hossein
Hello, I want to start learning Django, can you guide me where to start and which educational podcasts can help me build a site with Django faster? thank you
Malik
Alireza
Anonymous
hehehehahaha
Hello I have a doubt that jinja2 we can use with django or it is only used in flask?
cazan
Can someone adivce me with a good tutorial from 0 to make user auth based on role
Jumana
django - how to make a notification? when user register it will send notification to email of admin
Anonymous
Dz
Anyone know OTP login in Django?
Doragonsureiyā
Anyone know OTP login in Django?
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
null
Drishti
When i run a pychaem file it is showing errors in base.py
From .import version
Importerror : attempted relative import with no known parent package
Pls help and resolve this problem
Kene
AG
Hey guys. Can anybody help me? Django can't see my template. I have the template in project_name/app_name/templates/app_name/template.html. I specify in view.py that template locates at app_name/template.html. I always have been doing like that, but now django can't see template
The Inspired
AG
When I load page I got TemplateDoesNotExistError
The Inspired
yeah, I know that...
post the error stack trace
The Inspired
the screenshot of the error page
AG
I can't send pictures here
AG
Solved. I forgot to add my app in settings.py file 😕
x-yro
Hello guys. Anyone can help me with pagination in my django app?
Doragonsureiyā
x-yro
And how i can show here code? to explain clearly
Rahat
Tell me which media folder in django we want to uploaded in YouTube channel
Doragonsureiyā
Mikias
What is the reason for the raise of AttributeError: 'AnonymousUser' object has no attribute
Maxim
John
I Need a help to return the good value about the case
John
https://linkode.org/#vfqPbEhpulWHcYMqUju4z7