Abdii
Unable to import httpresponse, how i can fix it.
Doragonsureiyā
Unable to import httpresponse, how i can fix it.
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain:
- what you're doing
- what you're expecting
- what you're using
- where you're running the script
- what Python version you're using
- what packages and their versions you're using
- and the most important thing: show the code YOU wrote (read rule 5️⃣ for that)
and more details, that way your chances to get help will increase
Phansivang
hello guys Please help me i want to update the post when I click on button to update the post I want it to filled with the post that I was wrote it in the form
Dj - 505
Hi .. please i need the best tutorials that explain django rest framework ( for advanced level not for beginners)
Maxim
Dj - 505
google django rest framework
Google give me all not advanced only ! I need who explain to me in detail for advaced level .. no rest documentation !
Dj - 505
How i do customize for the class ModelViewSet?
𝚂𝚘𝚑𝚛𝚎𝚝
Hello. How can i save html select option to sql in djnago ?
𝚂𝚘𝚑𝚛𝚎𝚝
im getting Cannot assign "'27'": "UserProduct.category" must be a "Category" instance. error
Uday
I;ve created a serializer class where I've defined a custom validator where i'm returning validation error if field is not valid
in the view (function based) im validating the serializer and if it's not valid I want to return validation error message along with status code.
but I get the error
TypeError: Field 'number' expected a number but got ValidationError
and it response it doesn't respond with validation error but html
Uday
class UserCreationSerializer(serializers.ModelSerializer):
number = serializers.IntegerField()
name = serializers.CharField(max_length=50)
class Meta:
model = User
fields = ('number', 'name')
def validate_number(self, value):
value = str(value)
print(value)
regex = re.compile(r'^(\+91[\-\s]?)?[0]?(91)?[789]\d{9}$')
match = regex.match(value)
if not match:
return serializers.ValidationError('Please provide valid number')
return value
Uday
RIP
hi , I want get step3 value directy in one line or less, weeksoldyestday = '5|11|4|7|8|7|8'
sumsoldtoday = '777'
sumsoldyestday = '775'
_step1 = weeksoldyestday.split('|')[:-1]
_step2 = str(int(sumsoldtoday) - int(sumsoldyestday))
_step1.insert(0,_step2)
_step3 = '|'.join(_step1) , any suggestion?
Amit
Hello everyone i need a help, How do i integrate zamato APi to our POS software.
Amit
Real
Hello everyone
i have Middleware about update last user activity with each user request but i dont have access to request.user
this is the error
Session data corrupted
and
AnonymousUser
we are using DRF and JWT for authentication
i tried this but same problem.
ГуНиСе️
Real
.
In the admin page, is it possible to hide and show a field dynamically depending on another field drop-down menu selection?
Ashif
anyone hosted your nextjs application on firebase
Dimon
Hello, can someone help me? I am trying to deploy a django project on an ubuntu server. When I execute runserver everything works ok. I added the server ip and port to ALLOWED_HOSTS = ['172.18.130.44:5115']. When I run runserver 172.18.130.44:5115 or runserver 0:5115 I get the error ERR_INVALID_HTTP_RESPONSE, nothing is sent to the server. How do I deploy a project on my host?
ГуНиСе️
ГуНиСе️
Dimon
Sobhan
Hi everyone
I gonna make a booking seat for a restaurant by DRF
Now I confused that
How create models of this restaurant
How create two field in model
total capacity
capacity
Every time a customer booking seat
Reduce the Number of seats per totally capacity
Please help me
Д
Д
you don't need help from a person to solve this. go look at the documentation or watch some youtube video.
Kamlesh
Hi, I am facing one issuse in django rest framework, I want to filter the user by email from different table, how can I solve it
Supreet
Hey, can anyone help me to do crud operation in Django using ajax
T4P4N
T4P4N
Kamlesh
Kamlesh
There
Meer
Anyone know Django test?
Meer
I want to test the page where login is require
Shabbir
1. Is mongodb with django a good choice?
2. Does django provide q default orm for it, like it does dor relational databases?
cj
rtg
Hi! when I upload an image it stays in the root and not in the static directory. why?
rtg
I have in settings.... STATIC_URL = 'home/static/'
STATIC_ROOT = 'home/static/'
ГуНиСе️
Anonymous
Anonymous
Abdulhamid
I have bought ssl certificate and my website is working but my bots are not working, who helps me
anrays
Hello guys what are you send maiil with django in cpanel ,?
I can try in my pc an work but try in server cpanel dont working ?
help me, pls?
lubaskinc0de
'User' object is not iterable error
in a views HttpResponse(request.user)
Dj - 505
Hi .. when i complate coding of rest framework and runserver .. it took too long time to response !! In all pages of rest framework browser and postman , but response is quickly at admin page !!
How i solve problem to make server run normal way? Also in the postman ?!
I have used ( serialiser with hyperlink field, ModelViewSet and with relational database )
Тимур
Can I serialize model like this
{pk:{}, pk:{}}?
Natively
Charly
Тимур
Charly
How?
Maybe setting fields list as empty list?
Тимур
ГуНиСе️
{1:{}, 2:{}...}
I barely understand you and your problem, sorry. Maybe you need the in_bulk() method, it returns dicts like you demonstrated.
ГуНиСе️
and if you speak Russian, feel free to reach me in private
Anonymous
how can i put basename in reverse function in drf
Dadakhon
Hello guys! Who knows where to deploy Django & Vue website for free?
Д
it's a pretty heavy-duty solution to this problem but I recommend learning AWS.
Roman
Hello. Such a task. When a user enters the site, the front takes information about the current user along the route. How can I display in drf_yasg (ala swagger) to the front that the response can be different, i.e. can it return AuthUser or AnonUser?
lubaskinc0de
the question is, in the user profile there is a field of subscribers of the m2m user, how to make a check that the user would not subscribe to himself?
Никита
Good afternoon, how to contact 2 variables in a template through splitting {{atr.list.0.slug|add:';'|add:value}} , it doesn't work like that
Artur
hello everyone, maybe someone was making twitter logging in django and was getting an error
403 Client Error: Forbidden for url: https://api.twitter.com/oauth/request_token?
...
hello everyone, is it possible to do a random on the ids of several different tables at once to retrieve the data? I just manage to do it on one table.....is this possible please?
rtg
rtg
YUSUF CR
I want to change LANGUAGE_CODE from 'en-us' to Kazakhstan zone. So I can't find list in documentation. Can someone help?
Егор
RIP
in finally I have to use DRF to handel the model to JSON, now quertions is , how to output the json result by my views.py , I have put mymodelserializer in seriallzers.py. now my views.py looks like it: def mymodelview(request):
Tiger
Tiger
http://www.i18nguy.com/unicode/language-identifiers.html