hi guys when i deploy django app to heroku this give me command "heroku logs —tail" after this command brauser give me Method not allowed
could you help me guys
Mirco
def delete(...) and your code e.g. def delete(self, request, pk, format=None): your code return Response(status=status.HTTP_204_NO_CONTENT)
sunshine
I need to implement login via Google, Twitter and Facebook using DRF. How can I implement this? I'm trying a few days and I cannot implement this. Many tutoriais don't work for me!
Yusuf
Hi guys How can I run a cloned Django project from GitHub? I have tried a lot (beginner)
Alexander
Hello.sorry, i didn't notice that it is English speaking group.I have a problem, please help.My get request takes near to 30 seconds after 20 or 25 clicks.So, i don't have any throttling setups in settings.py and I don't have any idea of how to solve this problem
Alexander
django toolbar shows me no doubled queries.everything works fast until the 20th(or 25th) get-request
Abhishek
anyone have all ORM queries
Charly
anyone have all ORM queries
What do you mean all ORM queries? that makes no sense
Abhishek
i mean about ORM queries
Charly
i mean about ORM queries
.filter() exclude() get()
Alexander
Did you optimise the queries?
yeah.there is just one query and it runs fast first 30th requests.
Charly
Abhishek
.filter() exclude() get()
yeah right but I want to all queries which is used in the django project
Charly
yeah right but I want to all queries which is used in the django project
https://docs.djangoproject.com/en/4.0/ref/models/querysets/ Always go to docs first
Abhishek
ook thanks sir
govind
Am laravel developer
govind
Now am starting DRF WITH react
govind
Please give me some tips for developing backend with DRF
Doragonsureiyā
Please give me some tips for developing backend with DRF
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
govind
I want to develop from scratch
Charly
I want to develop from scratch
Well there is the documentation from scratch
govind
Please refer me any articles
govind
With examples
Doragonsureiyā
Please give me some tips for developing backend with DRF
Are you looking for Django REST Framework documentation? Here you have it: https://www.django-rest-framework.org/
govind
Can i use DRF without predefined admin dashboard
govind
govind
What are the topics i want to cover
govind
Give me any roadmap
Doragonsureiyā
Give me any roadmap
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
Anonymous
Give me any roadmap
https://github.com/DjangoEx/python-engineer-roadmap
Aashish
Django programming error realtion ss_ss doesn't exist...... After deployment on heroku any idea
Nurus
Hello, Can I change the superuser password with manage.py shell?
Nurus
Yes
How
Doragonsureiyā
How
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
Nana
I need help
Nana
I tried to migrate
Doragonsureiyā
I need help
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Dark Angel
Please read the error. In your settings.py file os module isn't imported.
Nana
oh ok
salar
nothing just import os
Heigler Rocha
hi guys when i deploy django app to heroku this give me command "heroku logs —tail" after this command brauser give me Method not allowed
Are you using CBV? It seems you're making a request (eg a POST) in a view that doesn't allow it (eg TemplateView), but you should share your code. The heroku logs part it's not relevant, it's just showing your latest requests results
Dullah
Hey Guys. How can i get the exact string value from an instance in a database. For example i have a database with teams, and i can access the team with {{ score.team }} and will return the name of the team, like “team212” How can i access the string “team212” and set an image with an if statement. I tried {{ if score.team == “team212” }}, but it didn’t work
Dullah
Correction {% if score.team == “team212” %}
Code
how to share code in this group?
Doragonsureiyā
how to share code in this group?
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
Amit
I have a question, how to create digitally signature in pdf file using python
Doragonsureiyā
I have a question, how to create digitally signature in pdf file using python
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.
Dadakhon
Hello. Can anyone help me please? I am stuck on this. How can i set the default value for ManyToManyField on Django Models?
Dadakhon
At least 1 default Value
Alex
At least 1 default Value
"default="
Dadakhon
class Filters(models.Model): name = models.CharField(unique=True, max_length=200) date_added = models.DateTimeField(auto_now_add=True) class Meta: ordering = ['-date_added', ] def str(self): return self.name def get_first_model1(): return Filters.objects.all()[:1].get() class CountryFood(models.Model): name = models.CharField(max_length=200) filter_by = models.ManyToManyField(Filters, related_name='filter_foods', default=get_first_model1, )
Dadakhon
This code is not working
Dadakhon
why custom get_first_model() ? django itself provide .first() method
Can you please write it, like this filter_by = models.ManyToManyField(Filters, default=...)
Amit
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.
@Doragonsureiya_bot this project is already based on Django framework, that's the reason I am asking in this group
Alex
Can you please write it, like this filter_by = models.ManyToManyField(Filters, default=...)
``` def get_first_model1(): return Filters.objects.all()[:1].get() this part
Alex
Ohh understand but its not working too
>Filters.objects.first() you don't need custom method
Viktor
Anyone know how to make multiple files upload in DRF? 🙏
Maxim
@Doragonsureiya_bot this project is already based on Django framework, that's the reason I am asking in this group
your question on Python, it doesn't matter if the project is based on Django
Dadakhon
Please help me With Default Value, its not reacting to defaul
Alex
i will suggest handling default in form instead of this way
Dadakhon
default=Filters.objects.first()
raise ValueError( ValueError: Cannot serialize: <Filters: Dessert> There are some values Django cannot serialize into migration files.
Alex
How?
form_valid
Maxim
default=Filters.objects.first()
default=Filters.objects.first without parentheses