cj
How to create Rest Api in Django
Shubhanshu. Here you have a useful link: https://duckduckgo.com/?q=How+to+create+Rest+Api+in+Django
cj
literally the first result
Guillermo
how to process
Go here and start reading: http://www.django-rest-framework.org/
cj
@c0x6A ,THIS! Fast and performant Django / JS combo :) https://gist.github.com/izznogooood/207271d5b3445c508f553a0003feab13 Thanks for pointing me in the right direction.
I just saw you can reduce one call to the DB in the view without querying for the user in User model, just pass request.user to user= parameter in Item
Anders (izzno / gooood) πŸ‡³πŸ‡΄
"user=" "must be a β€œUser” instance"
cj
request.user is a user instance 🤔
Anders (izzno / gooood) πŸ‡³πŸ‡΄
cj
or try item = Item(user__id=request.user.id, ...
cj
no, it's a number
can't be a number if you can make request.user.id
cj
a 'number' doesn't have .id attr
cj
🤔
Anders (izzno / gooood) πŸ‡³πŸ‡΄
or try item = Item(user__id=request.user.id, ...
That might work (but im not "there" in knowledge). but I will release the full source for the app when I am finished.
cj
I'm gonna try your snippet, I'm pretty user this: item = Item(user=request.user, ... should work fine
cj
🙂
Anders (izzno / gooood) πŸ‡³πŸ‡΄
I ran in to this error: https://stackoverflow.com/questions/9616569/django-cannot-assign-u1-staffprofile-user-must-be-a-user-instance
cj
let me try it
Anders (izzno / gooood) πŸ‡³πŸ‡΄
cj
whats your github ID ?
same as my username here
Anders (izzno / gooood) πŸ‡³πŸ‡΄
You now have access....
cj
You now have access....
can't see it, neither got a notification
Anders (izzno / gooood) πŸ‡³πŸ‡΄
cj ?
cj
cj ?
@c0x6a
Anders (izzno / gooood) πŸ‡³πŸ‡΄
@c0x6a
Thats not CJ :)
cj
Thats not CJ :)
I told you, same as my username here, not as my nickname 🤣
Anders (izzno / gooood) πŸ‡³πŸ‡΄
ah, anyway. Most of the fun happens in cart, and cart/static/js the rest in under construction.
Anders (izzno / gooood) πŸ‡³πŸ‡΄
Krunal
How to deploy Django website on windows?
Krunal
Anyone have step by step guide
Petr
0. Install linux
cj
Anyone have step by step guide
step one: uninstall windows step two: install linux
Anders (izzno / gooood) πŸ‡³πŸ‡΄
0. Install linux
That literally made me belly laugh...
Anders (izzno / gooood) πŸ‡³πŸ‡΄
Petr
That literally made me belly laugh...
100% working and time-proven solution
Petr
Use docker.
Or virtualbox
Anders (izzno / gooood) πŸ‡³πŸ‡΄
Or virtualbox
DO NOT use virtual box in production...
Petr
🙈
Krunal
Thanks for the information.
Anders (izzno / gooood) πŸ‡³πŸ‡΄
Haha, virtualbox is great....
Anders (izzno / gooood) πŸ‡³πŸ‡΄
But IF you have a windows server OS docker is better ;)
Anders (izzno / gooood) πŸ‡³πŸ‡΄
ALOT better.
Anders (izzno / gooood) πŸ‡³πŸ‡΄
I would install it in a Hyper-v Ubuntu or simulare though ;)
Anders (izzno / gooood) πŸ‡³πŸ‡΄
@c0x6A I was so happy with my simple views and you had to go ruin it.... How long have you used Django?
cj
@c0x6A I was so happy with my simple views and you had to go ruin it.... How long have you used Django?
🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣 since 2008
cj
haha, ok... You are forgiven.
trust me, you'll love Class Based Views, just give them time
cj
for your project, they will look overkill (now)... but when you start doing more stuff, CBV will save you time and headaches
Anders (izzno / gooood) πŸ‡³πŸ‡΄
trust me, you'll love Class Based Views, just give them time
I've used them alot in DRE and "crm" type sites, but the knowledge you presented gave me more fuel... But thankfully the "older" person in me is keeping me from rewriting the whole app (+others)... Which was my imidiate instinct 😂😂😂
Anders (izzno / gooood) πŸ‡³πŸ‡΄
Anders (izzno / gooood) πŸ‡³πŸ‡΄
;). anyway, as allways, thanks!
Anders (izzno / gooood) πŸ‡³πŸ‡΄
(and i know its not he's quote, it just made sense)
Anonymous
Hey guys
Anonymous
Anyone used azure bus service as celery broker?
Anonymous
Can it even be used?
Ajay
Guys I have a doubt
Ajay
Which is latest technology in Java
Ajay
Tell me something about it
Anonymous
Hey guys, can anyone help me out debugging this error
Trials
Which one ?
people like mistery these days 🙂
007
how to pass javascript choice variable in this code to django views.py :- https://dpaste.de/MBJ3
George
Wot
Modou-dev
Wot
using mulpiprocessing or thread
007
Ya.. i have use ajax in my code