Orack
https://youtu.be/tzlT__hx6sk
Orack
https://youtu.be/tzlT__hx6sk
this was very helpful, if anyone wants to try out drf
Orack
I cannot understand if you want the csrf or not. You can disable per view wherever you don't want it
i want to use csrf ,but in html we can put {{%csrf_token%}} how can we put that when running from httpie or android request
Orack
nvm im going on with token authentication though
Muflone
1) make csrf_exempt 2) get the token from a former request
Orack
my vscode is giving 10+ warnings like Class 'Snippet' has no 'objects' member
Orack
but the code works
Orack
is there some plugin missing
Muflone
Just ignore it, even pycharm has them
Muflone
Exactly as every browser does
Mirco
Muflone
how will i get that token from java
getHeaderField/s from the connection object
Mirco
getHeaderField/s from the connection object
get header by using your http client in java
G
Hi everyone, someone know about a good tutorial to integrate Django and Vuejs??
Mirco
Hi everyone, someone know about a good tutorial to integrate Django and Vuejs??
you can work on them separately and just call django apis from vue
G
you can work on them separately and just call django apis from vue
I'm was trying that, but when I try to get images from the static or media files of django, I got an not found error. I'm using Django Rest Framework to build the API
G
we cannot do so much if u don't share code
I think I found where the problem was. Thanks anyway
Alexander
what do you think about positional-only vs. keywords-only arguments? def some_func(pos-only, /, pos-or-keywords, *, keywords-only): Django API Domains requires Functions in services.py must use keyword arguments. , is it good idea in your opinion?
Alexander
so you can't do some_func(1, 2), you must some_func(param=1, param2=2)
Alexander
(https://phalt.github.io/django-api-domains/files/#services)
Bharath Raj
Can anyone please help ? For Image upload in django rest api function ?
Master
u mean adding path in url.py ...right?
No. I mean write form process into your post_new function. Django doesn't know what you want to do with it
Orack
can we bring models editing
Orack
in localhost:8000/admin section
cj
please rephrase, Mr. ex-President
cj
I can't get your idea
Orack
if i open localhost:8000/admin
Orack
i get a page where i can add users
cj
ah ok... now I get it... you want to see all your other models
Orack
yes
cj
and make a CRUD on them
Orack
and make a CRUD on them
with premade GUI
cj
piece of cake
cj
https://docs.djangoproject.com/en/2.2/ref/contrib/admin/#module-django.contrib.admin
cj
that 👆
Anders (izzno / gooood) 🇳🇴
channels here we go...
cj
channels here we go...
🏃‍♂️
Anders (izzno / gooood) 🇳🇴
yeah... fortunate I have time now...
Orack
from myproject.myapp.models import Author admin.site.register(Author)
cj
keep us updated with your advances/discoveries 🙂
Orack
gotit
Anders (izzno / gooood) 🇳🇴
I am familiare with socket.io so I hope 'this will be a walk in the park
cj
gotit
👏🏻
Anders (izzno / gooood) 🇳🇴
cj
from myproject.myapp.models import Author admin.site.register(Author)
there are bunch of other options to make it look more "interesting". just keep reading the docs 😉
Orack
just for me to test soem data
Orack
happy with noob UI
Abdulwahab
How can I use Sweet Alert js library with Django ? I found a library called "sweetify" but, it doesn't work ! Anyone used it or there is a better alternative ?
cj
also I hope you're using SweetAlert2 (notice the number 2)
El
What is the path of the site admin?
Orack
what should i refer
Orack
for register and login in drf
Orack
without using jwt
Orack
or it cant be done without jwt?
👍
How to deploy django celery task in AWS elastic beans ??
Mirco
for register and login in drf
session , like Django does when you don't use DRF
Orack
session or jwt
Mirco
which one do you recommend
“Session vs Token Based Authentication” by Sherry Hsu https://link.medium.com/JaCafaTD2X
El
/admin
But not working in my file urls.py
Orack
but there is TokenAuthentication and JsonWebTokenAuthentication
Master
@MiguelTristan
Master
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), ... other urls ... ]
Master
Your urls should looks like this
Noufal
Any can help me
Noufal
How to learn djaango
pino@mastrobirraio ~$
This question was asked many time, search on this group and you'll find a lot of resources
techy
How to learn djaango
See pinned msg