#\ Lennox /#
people somebody has some document of Django + react
Doug
people somebody has some document of Django + react
I've done it, but haven't documented it yet. What do you need?
#\ Lennox /#
You will have some CRUD to guide me
#\ Lennox /#
They left me a job in the University and the teacher wants me to program in Django with react and the database is SQL server
№r sairi
what u share this
Nmn
@admin
#\ Lennox /#
Is this for work or for school
It's for the University
Neo
hello all can somebody tell me which python framework will be better for using dynamodb
Neo
django or flask
Mirco
django or flask
https://github.com/pynamodb/PynamoDB With this one you can choose whatever framework you want according to your requirements
Neo
ok thanks but as It is nosql
Neo
so will it change the way django works
Neo
as django uses ORM
Neo
and flask is like an empty notebook
Neo
Yep, but instead of use it you should config this one and make models with it
So are you saying that we can use pynamodb to configure django
Neo
so that we can make it feel like orm
Mirco
So are you saying that we can use pynamodb to configure django
you don't need to configure Django, just use that wrapper for DynamoDB APIs
Neo
ok and then a seperate model will be created to dynamo
Neo
do you have any references to start
Neo
for fast starting
Mirco
do you have any references to start
https://wmerobertson.wordpress.com/2016/02/02/part-1-dynamo-django-and-aws/ NOTE: this guy don't use that wrapper, I recommend ya to use it to have cleaner code
Dostonbek
Hi django community
Dostonbek
Who has a clear doc to deploying django app to any host?
Mirco
and django gives u a cool command to check if your project is ready for deploying
Dostonbek
There are many more docs and tuts but they all play with heroku, d.ocean, aws or pythonanywhere
Mirco
and ? why don't u like them ?
Dostonbek
What I mean is that I have a completed django project and want to deploy it to my custom host
Dostonbek
Let's say you have completed some django projects right?
Artyom
Hello, devs! Can I use standart routes for allow HTTP method delete or put? or I have to create new class MyOwnClass (routers.DefaultRouter):
Artyom
Yes
Mirco
Yes
if u define put() into your view you can use the same path for GET to make PUT requests
Mirco
same about delete?
yep have a look here
Artyom
yep have a look here
thanks! But it is not about viewset (I wrote, about routes( I think this is means that for viewset only)). Or this works for viewsets too?
Artyom
yep have a look here
Thanks for target. I think I have to read this https://www.django-rest-framework.org/tutorial/6-viewsets-and-routers/
Mirco
Thanks for target. I think I have to read this https://www.django-rest-framework.org/tutorial/6-viewsets-and-routers/
https://www.django-rest-framework.org/api-guide/viewsets/#viewset-actions The basic one without mixins instead of put, delete, get etc. you need to override update and destroy for PUT and DELETE
Neo
hey @pyflare do we have an option to make country wise seprate database
Neo
as law do not allow to store db(user details) of other country
Neo
using aws/dynamo
Mirco
afaik don't, you have to config dynamodb based on country by yourself
dynamic
I'm trying to pass a POST request to django through NGINX and UWSGI, the value of latitude is 12.92134345454456799 but when the request is recieved at the POST method, i'm getting a rounded off value which is 12.921343454544568. Anyone knows why this is happening?
dynamic
Are you seeing this value right off the post request or are you seeing it in the database?
Right off the post request. I printed it as soon as I got it in my POST method
Doug
yeah that's odd, i've never seen that before.
Aitugan
Hello, guys! Could anyone advice some good django courses, tutorials or lessons online, please?
Anonymous
Anybody having django learning path flow
dynamic
yeah that's odd, i've never seen that before.
Would any of the existing middlewares be doing it?
dynamic
Would any of the existing middlewares be doing it?
As in the default Django middlewares not the extra added one
Mehul
https://www.youtube.com/playlist?list=PL-osiE80TeTtoQCKZ03TU5fNfx2UY6U4p
Artyom
Devs! I have a one more question about DELTE and other extra methods. I wrote viewset, local urls and router in project urls, but DELETE doesn't allow... All looks ok, but I think I have a problem. Please look code : https://hastebin.com/abipimucix.py
Mirco
Read better the topic on DRF official docs
Mirco
and into urlspattern with path you have to bind every view to a specific path
Aitugan
Artyom
and into urlspattern with path you have to bind every view to a specific path
ok, if i look on a whole list of my urls, I can see that viewset generate url for delete without my local urls.py and decorator in viewset. So I see ^api/ ^cutarea-dual-fca-factuse/(?P<pk>[^/.]+)/$ [name='cutarea-dual-fca-factuse-detail']
Artyom
Could I have a problem with permission to api/cutarea-dual-fca-factuse/108 cause my api when using GET looks like:
Artyom
{ "id_fca": "М30042019", "fell_form": "stringinfo", "fell_type": "stringinfo", "main_type": "Тstringinfo", "sortiment": "stringinfo", "ed_izm": "кг", "vol_drew": 1000.0, "fca_res": "stringinfo", "vol_res": 1231.0, "kind": null }
Artyom
you have to decide to choose between using routers or path
I understand. I use routers. And I see than extra functions for viewset and routers are unnecessary. But I don't understand now why api/cutarea-dual-fca-factuse/108 is wrong
Artyom
108 it is pk
Mirco
I understand. I use routers. And I see than extra functions for viewset and routers are unnecessary. But I don't understand now why api/cutarea-dual-fca-factuse/108 is wrong
do you have a path like this path("api/cutarea-dual-fca-factuse/<int:pk>/") or just path("cutarea-dual-fca-factuse/<int:pk>/") if u are including urls ?
Pushpak
can i implement react-django project?
dynamic
I have a question, does the rest framework has a limitation on the size of the decimal? Because my request.body output shows one of the value as 12.92134345454456799123123123,\n while request.data shows the following output 12.921343454544568, Can someone help with this?
Turtle_In_Hurry
i defined a django email in celery task but can not receive emails without getting any error. email isn't working as a celery task...
cj
Satyam wanted to post this long code: https://hastebin.com/sokajucete Do it yourself next time 😉
Turtle_In_Hurry
i think its problem with celery with django email backend. please help if one of you worked with celery https://hastebin.com/sokajucete