inchidi
exception handling? 🤔
try:
# check data
except django.ValidationError as e:
raise rest_framework.ValidationError(e)
inchidi
share your code, am sure it would help
Someone
Someone
inchidi
inchidi
cool
Django Bot
>> Blogs
- Making mistakes
>> Links
- How to upload multiple images in Django using Dropzone and saving path dyna
- Django - File Uploading
- How to Upload files With Django
Luis
Django Bot
>> Links
- Tutorial: Django REST with React (Django 2.0)
Django Bot
>> Links
- Tutorial: Django REST with React (Django 2.0)
- Time Zones in Pytz & Django
Anonymous
Django Bot
>> Links
- Creating a production ready API with Python and Django Rest Framework - par
Someone
cool
https://pastebin.com/QmYJ7Gt4
Someone
Sorry for delay in sending ..
F A H A D
Guys,
Does any one knows what is the security level for django websites??
F A H A D
Is it very secure?
F A H A D
I’m a django newbie
F A H A D
☺️
mλdcodez
Is it very secure?
PInterest and Instagram like sites use django. So. I believe it's secure
Anonymous
Anonymous
F A H A D
F A H A D
F A H A D
Val
Hey guys! I'm working on a project and I need your advice on how I can do two things. I've been racking my brains around all day.. I am building a web app where people can sign up and register their businesses. It's going to have a signUp, signIn, a dashboard, register business and many other stuff. But my challenge is I want to be able to filter businesses by locations and also by category. Please any advice on how to go able it. I'm using postgres + sequelize
Anonymous
you can group people by IP address which links to their location
Someone
Someone
http://django-filter.readthedocs.io/en/latest/index.html
Someone
If this is not what u r looking for, then plz elaborate ur needs/ spec...
Django Bot
>> Jobs
- Django Developer
mλdcodez
»> Post.objects.all()
[<Post: Share Test>, <Post: Technologies>, <Post: testing>, <Post: Who was Django Reinhardt?
>, <Post: Another Post>, <Post: New Title R>]
how do i get the id of these object...? Thanks :)
mλdcodez
»> Post.objects.filter(title='New').id()
AttributeError: 'QuerySet' object has no attribute 'id'
this is what happens when i ask for id
biswaz
Posts = posts.objects.all()
For a in posts:
print(a.id)
biswaz
Only individual objects have Ids.. object managers dont
mλdcodez
Thanks :)
Anonymous
Is there any website for tutorials on geodjango except the docs?
Someone
Hi, I have two models...
Class A(models.Model):
name = field()
manager = FK(B)
Class B(models.Model):
name = field()
id = FK(self)
Now I want to get all objects in A which have a filter from self of model B with that self FK.
For ex :
Model B :-
Instance 1 (FK=null)
Instance 2 (Fk=Instance 1)
Model A :-
Instance 1 (Fk=model A instance 1)
Instance 2 (FK= model A instance 2)
I need to get object of Model A which got filter of Model B (only with model B instance 1 as FK)
How can I do it?
Someone
A.objects.filter(manager=B.objects.filter(id=1))
Someone
OperationalError: (1242, 'Subquery returns more than 1 row')
Someone
Got it solved 😕
Someone
A.objects.filter(manager__in=B.objects.filter(id=1))
Jonás
/0
Val
Val
Anonymous
Django Bot
>> Blogs
- A Multiple Model Django Search Engine
Anonymous
any good open source multivendor marketplace built with Django
Anonymous
?
Django Bot
>> Jobs
- Remote Django Developer for exciting projects
Django Bot
>> Jobs
- Django Developer
Val
Now in more details this is what I'm talking about..
Val
I'm building a project but I'm presently the backend of the app will run using a dummy data first. Now I've created some API routes and hit them from postman. Example is POST /business/ = this is to register a new business, PUT /business/<businessId> = this is to update a new business. But my question is how do I do this API that is base on filter to get all business under a specific location using this api GET /business?location=<location>
Someone
https://pastebin.com/rMrwkBsZ
Someone
https://pastebin.com/rMrwkBsZ
I am having a problem.. my requirement is I have to send objects of a model and custom calculated value to serializer.. I cannot return 2 variables to serializer .. how can I do this?
inchidi
inchidi
inchidi
inchidi
django rest framework
Val
I am actually using node.js but I believe its practical the same procedures
inchidi
with django i need to add filter_backends = (filters.SearchFilter, ) to my view to able to do that
Val
Django Bot
>> Blogs
- Facebook Messenger Bot with Django
Someone
Someone
Hi.. I have 2 applications fully independent build on django.. both apps have API endpoints.. these 2 apps will be used to build front end of application in react .. now I dont want my react frontend to interact with both apps.. is there a way to handle one apps url from another itself.. just my front end should not know the existence of 2 apps.. so I need to call 2nd apps API also from only one app. Like services or something. How can we attain this..?
inchidi
Someone
Like one app have
http://helloworld.com/getemployee
I dont want react to interact with helloworld.com.. rather than it would need same behaviour from my domain .. http://hello.com/getemployee
Same result but from my endpoint
Someone
Is it something like... my app interact with that app fetch info and send the same on my endpoint and vise versa .. get data from client.. hit the other apps endpoint with same payload.. fetch response and forward it to client
inchidi
Someone
inchidi
then i think thats also mean you must make server that passing result from hellowold.com which is mean longer response time
inchidi
am not sure about this, dont know any other option
Someone
We are a team of 3 . One guy react and 2 are django.. another guy is working on one particular requirement and am on another.. we kept it separate bcz to use on any other similar project.. so we made it fully independent...now my boss dont want react guy to talk with both of us and use two separate apps for fetching info and he wants it to call from only one app as it comes from one app ... i thought of importing his views and to configure URL by myself.. but i am just curious to know if what i asked can be done..
inchidi
if possible, you can point subdomain of helloworld to your servers, something like api1.helloworld.com to api you created, and api2.helloworld.com to your friend api