Anonymous
cv2.VideoCapture(0 to 1)
Raj
I am new to Django.
darkshadows
Raj
What is difference between Django and other framework s in python
Ashik
What is type error,How to solve
Anonymous
What is difference between Django and other framework s in python
A simple internet search will reveal answers
Disekurity
Can you tell more? Maybe send the error log?
django.core.exceptions.ImproperlyConfigured: Set the USE_DOCKER environment variable
Sultan
Hi i have a problem in nginx can’t call static files
Isaías
how create ACL in django?
Isaías
have post?
Potato
I added 4 instances to product app in Django...and when I try to view 'product object 1' I get this error
Potato
Class decimal.ConversionSyntax
Potato
Rest all other instances can be viewed...no error
Anonymous
How do I get an object I just save with the save() method, instead of writing another query, is it possible to make the object return on save
Guillermo
If you called save() then you have the object already
Guillermo
If you called create() then it returns the object
None
Hello I have an ordering via modeviewset class PostViewSet(viewsets.ReadOnlyModelViewSet): queryset = Post.objects.all() serializer_class = PostSerializer pagination_class = LimitOffsetPagination filter_backends = [filters.OrderingFilter] ordering_fields = ['title'] ordering = ['title'] When I try http://localhost:8000/posts/?ordering=something_else I don't get any exception or mistake(404). How can I validate this valued(ordering) and raise custom response if attribute doesnt exist?
Petr
filterset_class??
https://django-filter.readthedocs.io/en/master/guide/rest_framework.html#adding-a-filterset-with-filterset-class
inchidi
https://django-filter.readthedocs.io/en/master/guide/rest_framework.html#adding-a-filterset-with-filterset-class
i dont think so, since what he want to do is raising 404 when passed field invalid
Petr
i dont think so, since what he want to do is raising 404 when passed field invalid
Using filter_backeds property in views is like defining serializer fpr view with serializer_fields -- thanks god that is not possible
inchidi
Using filter_backeds property in views is like defining serializer fpr view with serializer_fields -- thanks god that is not possible
actually what am trying to suggest is before the code reach https://github.com/carltongibson/django-filter/blob/master/django_filters/filters.py#L711 he should raise 404, so he should make his own custom filter_backends. that also where the ordering fields from get param requests parsed
inchidi
Defining filterset_class in view (and putting required logic in it) is more correct in this case
and about this, personally am not recommending this method coz he will need to write that logic for each view which implement this
inchidi
Subclass this Filter and just add required check
you are correct, thats what custom filter backend is
Petr
and about this, personally am not recommending this method coz he will need to write that logic for each view which implement this
Not so many code -- and this is like always write get_queryset instead of just queryset=
007
Error :- django.urls.exceptions.NoReverseMatch: Reverse for 'update' with keyword arguments '{'pk': ''}' not found. 1 pattern(s) tried: ['update\\/(?P<pk>[0-9]+)\\/$'] ==================================================== html :- <p><a class='btn btn-warning' href="{% url 'basicapp:update' pk=school_detail.pk %}">Update</a></p> ================================================== urls.py:- path('update/<int:pk>/',views.SchoolUpdateView.as_view(),name='update')====================================================views.py :- class SchoolUpdateView(UpdateView): fields=('name','principal') model = models.School
inchidi
Not so many code -- and this is like always write get_queryset instead of just queryset=
but still, its writing custom filterset class and add logic in views vs writing custom filter backend and not doing anything inside views
007
maybe, try paste it in dpaste.de ?
What's that... I don't have any idea about dpaste
inchidi
What's that... I don't have any idea about dpaste
great, then you'll have a new tool in your dev tool list, just try open it
inchidi
But how to use it...
just paste text you want to share here, click/tap on paste snippet, share the link here
007
ok 👍🏻
007
https://dpaste.de/eaiG
inchidi
https://dpaste.de/eaiG
pk should be integer, while you pass (empty) string
inchidi
In html code ?
maybe, you should check your full traceback for that
Anonymous
What is the best way to learn Django ?
Um
What is the best way to learn Django ?
youtube - sentdex or thenewboston
Guillermo
What is the best way to learn Django ?
Follow the tutorial from the official docs
Idiris
thanks
Turtle_In_Hurry
Can any one know steps needed to implement celery beats. Or do have celery beat implemented in django project. Please help
Turtle_In_Hurry
?
H
How to pass data from one form to another
H
???
H
I want to use submitted data
H
Which user enter in the field
H
Anyone there to help
Guillermo
After checking form.is_valid() the data is available in form.cleaned_data
H
Does it possible to send data from one form to another via http redirect response or redirect
H
???
H
After checking form.is_valid() the data is available in form.cleaned_data
Ok after retrieving that data can i send it via render or redirect or http redirectresponse to another user
H
Sorry i mean to say another view
H
Or form
Guillermo
You can send url parameters when doing redirects, not sure about data that would normally go inside the request object, like form data
H
Okay
H
Do you have any idea about how to send data from one form to another
Guillermo
Look, taking data from one form and using it on a different form is trivial, the issue here is that those forms are un different views
H
Okay
H
Does it possible for me to get data input size for matrix from user and send it to another view and ask him for data of input size and from him encrypted matrix data
Guillermo
If you need to pass data between views and that data cant be url parameters then you can store it in your db/redis/memcached
H
Ok thanks man
H
See ya
Ooha
How to apply sessions to my login form???
Yamen
Good Day I am looking for someone can teach me Django online (Skype or..), thank you.
Ooha
? What d'ya need ?
I have a simple login form..i need to add sessions to it..i mean..i am able to open the required page even without actually logging in..so, to avoid that, i want to apply sessions How to do that??
Ajay
Guys can anyone send me crating registaratin and login form in django