Re: How to effectively use PUT and DELETE HTTP methods in Django Class-Based Views?

2024-04-12 Thread Luis Zárate
: > See > https://docs.djangoproject.com/en/5.0/topics/class-based-views/#supporting-other-http-methods > Also on view you have a variable called, where you can limit the available > methods. > > http_method_names > > > El vie, 12 abr 2024 a las 7:20, Mamadou Alp

Re: How to effectively use PUT and DELETE HTTP methods in Django Class-Based Views?

2024-04-12 Thread Luis Zárate
See https://docs.djangoproject.com/en/5.0/topics/class-based-views/#supporting-other-http-methods Also on view you have a variable called, where you can limit the available methods. http_method_names El vie, 12 abr 2024 a las 7:20, Mamadou Alpha Bah (< mamadoualphabah...@gmail.com>) es

How to effectively use PUT and DELETE HTTP methods in Django Class-Based Views?

2024-04-12 Thread Mamadou Alpha Bah
<https://stackoverflow.com/posts/78314829/timeline> I'm setting up a CRUD system with Django, using Class-Based Views. Currently I'm trying to figure out how to handle HTTP PUT and DELETE requests in my application. Despite searching the Django documentation extensively, I&

OneSignal Push Notification for iOS and Android via Django Views

2023-12-28 Thread Lightning Bit
Hello, The OneSignal API does not have a segment that details how to send a OneSignal Push Notification to iOS and Android devices w/ Python. Is there any way to have a Push Notification delivered after an email is delivered via Django Views? Thanks in advance! -- You received this message

Re: Async views means dropping gunicorn gevent for uvicorn, affecting sync view performance

2023-04-20 Thread awe...@foxmail.com
in this way to make sure everything is going right in production. 在2023年4月18日星期二 UTC+8 07:14:36 写道: > I know you can run gunicorn with uvicorn workers. But the sync views will > be running sync, no longer gevent patched, meaning performance could > change. I’m also unsure if sync

Re: Async views means dropping gunicorn gevent for uvicorn, affecting sync view performance

2023-04-17 Thread Chris Barber
I know you can run gunicorn with uvicorn workers. But the sync views will be running sync, no longer gevent patched, meaning performance could change. I’m also unsure if sync views are serialized into one thread if you don’t set DJANGO_ALLOW_ASYNC_UNSAFE, which could be a bottleneck. I did

Re: Async views means dropping gunicorn gevent for uvicorn, affecting sync view performance

2023-04-16 Thread TITAS ONLINE MARKET
f things can affect performance like moddlewares, serialization etc) > > > On Sun, Apr 16, 2023 at 5:34 PM Chris Barber > wrote: > >> Hello >> >> Production django app, currently 100% sync views, running under gunicorn >> with gevent worker class. >> >&g

Re: Async views means dropping gunicorn gevent for uvicorn, affecting sync view performance

2023-04-16 Thread Fortune Osho
16, 2023 at 5:34 PM Chris Barber wrote: > Hello > > Production django app, currently 100% sync views, running under gunicorn > with gevent worker class. > > @andrewgodwin suggests here it is possible to migrate slowly, just run > hybrid sync-async and add or convert vie

Async views means dropping gunicorn gevent for uvicorn, affecting sync view performance

2023-04-16 Thread Chris Barber
Hello Production django app, currently 100% sync views, running under gunicorn with gevent worker class. @andrewgodwin suggests here it is possible to migrate slowly, just run hybrid sync-async and add or convert views as desired https://www.youtube.com/watch?v=19Uh_PA_8Rc&t=1728s But to

Re: Beginner: How to find fields that can be over-ridden in a Generic Class Based Views

2023-04-11 Thread PULKIT AGRAWAL
6:14 PM PULKIT AGRAWAL wrote: > >> Hello Everyone, >> >> I am very new to Django and am still learning the ropes. If anyone can >> point me in the right direction, I will be thankful to you. >> >> My problems is as follows: >> 1. I have learned about

Re: Beginner: How to find fields that can be over-ridden in a Generic Class Based Views

2023-04-11 Thread Sebastian Jung
My problems is as follows: > 1. I have learned about class based views and have started using them > 2. But every now and then I come across a new field that could have been > overwritten in the class based view to shorted the code > 3. Is there a way to identify all the fields that ca

Re: Beginner: How to find fields that can be over-ridden in a Generic Class Based Views

2023-04-11 Thread Chetan Ganji
you. > > My problems is as follows: > 1. I have learned about class based views and have started using them > 2. But every now and then I come across a new field that could have been > overwritten in the class based view to shorted the code > 3. Is there a way to identify all the f

Beginner: How to find fields that can be over-ridden in a Generic Class Based Views

2023-04-11 Thread PULKIT AGRAWAL
Hello Everyone, I am very new to Django and am still learning the ropes. If anyone can point me in the right direction, I will be thankful to you. My problems is as follows: 1. I have learned about class based views and have started using them 2. But every now and then I come across a new field

Re: I am struggling with calling consumer.py function from views to consumer in django here ismy code. Please help me. I am calling Asyncwebsocketconsumer

2023-04-02 Thread MOHAMED SABEEH VADAKKATH VALAPPIL
can you provide more details about the specific issues you are facing when trying to call this method? Are you getting any error messages, or is the function simply not being called? Any additional information you can provide will help me better understand your problem. I am providing you with

I am struggling with calling consumer.py function from views to consumer in django here ismy code. Please help me. I am calling Asyncwebsocketconsumer

2023-04-02 Thread 'Sneha Vishwakarma' via Django users
from channels.generic.websocket import AsyncWebsocketConsumer import json class MyConsumer(AsyncWebsocketConsumer): async def connect(self): self.room_group_name = 'kafka' # Join room group await self.channel_layer.group_add( self.room_group_name,

Threading and Async Views

2023-03-07 Thread Vasanth Mohan
as a thread local variable, so that the DatabaseRouter can use it. However, I am currently looking up async views to see if it can help optimise our apis. Will my thread-based logic clash with the ASGI async views ? Thanks Vasanth M -- You received this message because you are subscribed t

Re: Function-based Views vs Class-based Views

2023-03-06 Thread Carsten Fuchs
I would like to recommend this excellent guide by Luke Plant: https://spookylukey.github.io/django-views-the-right-way/ Best regards, Carsten Am 06.03.23 um 21:19 schrieb Michael Starr: > What are the pros and cons of either method of rendering HTTP request > responses? >

Re: Function-based Views vs Class-based Views

2023-03-06 Thread Prosper Lekia
Using classes is always a good way of promoting code usability, and inheritance. With class base views you don't need to reinvent the wheel. You can access other Django classes and methods and reduce code complexity. Although most codes are encapsulated, but you can always go back t

Function-based Views vs Class-based Views

2023-03-06 Thread Michael Starr
What are the pros and cons of either method of rendering HTTP request responses? https://www.geeksforgeeks.org/class-based-vs-function-based-views-which-one-is-better-to-use-in-django/ In the article above it states that CBVs are DRYer, but I don't understand why. The article doesn'

Export table created in Views to a CSV with a button

2023-01-09 Thread Tristan Tucker
Hello, I have built a view that takes in dataframes, runs them through a function and then ultimately pumps out a results dataframe that is transformed into a HTML object and displayed on the webapp homepage. Now, I am trying to add in an "Export as CSV" button that upon being clicked will down

Re: EROR AT INITIAL VIEWS

2022-11-15 Thread Pooja Kumari
Try views or .views while importing and urls.py you should give path like views.home_view() On Tue, Nov 15, 2022, 11:25 PM Ogunsanya Opeyemi < ogunsanyaopeye...@gmail.com> wrote: > Your views.py is inside profiles folder not pages folder so change > pages.views to profiles.views &g

Anyone testing async views with django test client?

2022-09-20 Thread 'SP' via Django users
My async CBV works when accessed through my url endpoint with REQUESTS package. But with the django test client it seems to think the database doesn't contain the information I'm trying to pull using ORM. I've confirmed that the data DOES exist in the newly recreated DB (populated with fixtur

Re: Class based views with forms

2022-04-28 Thread Vishesh Mangla
il.html' > > form_class = forms.ContactForm > > success_url = 'tours.html' > > > > As far as i understand i need to get data from request , but i dont > > know how to do it. There are a lot of information in function based > > views, but i

Re: Class based views with forms

2022-04-28 Thread Ryan Nowakowski
#x27;     form_class = forms.ContactForm     success_url = 'tours.html' As far as i understand i need to get data from request , but i dont know how to do it. There are a lot of information in function based views, but i didnt get how to do it in class based views. And it would be nice of you

Class based views with forms

2022-04-26 Thread alex smolyakov
request , but i dont know how to do it. There are a lot of information in function based views, but i didnt get how to do it in class based views. And it would be nice of you to explain where should i put send_mail function. Any help will be appreciated. -- You received this message because y

Re: Update to Tutorial 4 - Generic Views

2022-03-11 Thread Heman Okumbo
ould take this > question to a potentially more useful place. > > Anyway; I am pretty new to Django but I've been following the tutorials > and in the Generic Views section here: > https://docs.djangoproject.com/en/4.0/intro/tutorial04/ > > I beleive that there is a missi

Re: Update to Tutorial 4 - Generic Views

2022-03-11 Thread Antonis Christofides
tutorials but I can't seem to find a way. If you could help me there I could take this question to a potentially more useful place. Anyway; I am pretty new to Django but I've been following the tutorials and in the Generic Views section here: https://docs.djangoproject.com/en/4.0/i

Update to Tutorial 4 - Generic Views

2022-03-11 Thread Dan Cox
Hi I've been searching on how I might contribute to the tutorials but I can't seem to find a way. If you could help me there I could take this question to a potentially more useful place. Anyway; I am pretty new to Django but I've been following the tutorials and in the Generi

Re: CELERY CLASS BASED VIEWS

2022-03-08 Thread John Dollosa
I think this might help https://docs.celeryproject.org/en/stable/userguide/tasks.html#task-custom-classes Let me know if this works, if not I will try to find a working example. I have been using Celery but I don't do class based tasks. On Tuesday, 8 March 2022 at 16:30:01 UTC+8 aadil1...@gmail.

CELERY CLASS BASED VIEWS

2022-03-08 Thread Aadil Rashid
i am using celery version 5.2.3, How can i register this class based task, and how can we name add name to this class based task, I would appreciate your valuable suggestions Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsu

Permission view: Creating different views depending on testmixin results

2022-02-20 Thread Jian Wu
create additional tests to determine which group the user belongs to and render out different contexts and templates depending on the user's group? from django.shortcuts import render from django.views import View from django.contrib.auth.mixins import LoginRequiredMixin # Create your views

How to display class based views

2022-02-18 Thread Wilford Chidawanyika
Good day, Trust you are all well i have written my models and they are working very well. l am struggling to create a class based view which will diplay on the client dashboard side so that he can enter data on a form please i need help you can app on +27 66 3838 041 With thanks Wilford --

Maintaining state across multiple views

2021-12-17 Thread Amit Karnam
Hey all, I am working on a web app using django where in the first view i.e the landing page I collect a piece of info around which the web app revolves. I need this piece of info to be saved across different views. GOAL : Instead of the drop down in the diseaseName I want the disease

Re: Handling url in class based views.

2021-11-20 Thread Lalit Suthar
you can get that slug value from kwargs def get(self, request, *args, **kwargs): slug = self.kwargs.get("slug") also if you like to pass it in the context you can override get_context_data refer: https://ccbv.co.uk/ to know more about class based views you can refer to thi

Re: Handling url in class based views.

2021-11-19 Thread Perry Bates
You can use the DetailListView from generic views. Pass in the template name, form class, and query(which in this case takes in the slug to query the db) On Mon, Nov 15, 2021, 21:27 Aadil Rashid wrote: > Hello my dear Friends, I have a question regarding Class Based Views. > > If we h

Re: Handling url in class based views.

2021-11-15 Thread Aadil Rashid
gt; Hello my dear Friends, I have a question regarding Class Based Views. >>> >>> If we have a url e.g, >>> path('item//', views.funView) >>> >>> We can handle it in Function Based Views, >>> By simply >>> def funView(request, s

Re: Handling url in class based views.

2021-11-15 Thread pankaj palmate
Also request in def get itself On Tue, 16 Nov, 2021, 9:40 am pankaj palmate, wrote: > def get(self, pk, *args,**kwargs ) : > ...body.. > > On Tue, 16 Nov, 2021, 2:57 am Aadil Rashid, > wrote: > >> Hello my dear Friends, I have a question reg

Re: Handling url in class based views.

2021-11-15 Thread pankaj palmate
def get(self, pk, *args,**kwargs ) : ...body.. On Tue, 16 Nov, 2021, 2:57 am Aadil Rashid, wrote: > Hello my dear Friends, I have a question regarding Class Based Views. > > If we have a url e.g, > path('item//', views.funView) > > We can handle

Handling url in class based views.

2021-11-15 Thread Aadil Rashid
Hello my dear Friends, I have a question regarding Class Based Views. If we have a url e.g, path('item//', views.funView) We can handle it in Function Based Views, By simply def funView(request, slug) : #logic return render(request, "tempName") We can even

Re: How to show views when an endpoint is called

2021-10-05 Thread Adeyemi Deji
Hi, what you are trying to achieve isn't clear to me. Kindly elaborate pls On Sunday, October 3, 2021 at 4:30:31 AM UTC+2 iroegbu...@gmail.com wrote: > Hello guys, thanks for helping the last time. > I am trying to show course views on django admin. Django is serving as an > AP

How to show views when an endpoint is called

2021-10-02 Thread Sophia Iroegbu
Hello guys, thanks for helping the last time. I am trying to show course views on django admin. Django is serving as an API to a flutter app Am i to create another endpoint to count views? -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Unable to run requests-html functions from Django views

2021-03-24 Thread Prashanjeet Halder
On Thursday, March 25, 2021 at 8:12:46 AM UTC+5:30 Prashanjeet Halder wrote: > Hello all, > I'm trying to run a python script that uses requests-HTML library every > time a view is triggered but getting an error. > > -- You received this message because you are subscribed to the Google Groups

Unable to run requests-html functions from Django views

2021-03-24 Thread Prashanjeet Halder
Hello all, I'm trying to run a python script that uses requests-HTML library every time a view is triggered but getting an error. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it,

Re: How to disable django views in the browser

2021-03-10 Thread Kunal Solanke
Won't you end up stopping multipart requests in that case? On Thu, Mar 11, 2021, 02:36 Ryan Nowakowski wrote: > On Wed, Mar 10, 2021 at 07:43:55AM -0800, Mostapha Bouderka wrote: > > I'm working on a project with react and django; and want to use django > > views

Re: How to disable django views in the browser

2021-03-10 Thread Ryan Nowakowski
On Wed, Mar 10, 2021 at 07:43:55AM -0800, Mostapha Bouderka wrote: > I'm working on a project with react and django; and want to use django > views to be used as information source only and not show a page on the > browser. For example, I have a pilot sign up page that uses

Re: How to disable django views in the browser

2021-03-10 Thread Mostapha Bouderka
al Solanke wrote: > >> By doing this you won't be able to stop the get requests from browser, >> but post requests can be stopped. >> >> On Thu, Mar 11, 2021, 01:42 Kunal Solanke wrote: >> >>> Ok in that case, drf by default sets a browsableapi rend

Re: How to disable django views in the browser

2021-03-10 Thread Kunal Solanke
2021, 01:42 Kunal Solanke > wrote: > >> Ok in that case, drf by default sets a browsableapi render on all of the >> views and viewsets, either overide that in settings, or use >> renderer_classes=(JSONRendere,) in views in which yiu want to stop it. >> >> Sear

Re: How to disable django views in the browser

2021-03-10 Thread Kunal Solanke
By doing this you won't be able to stop the get requests from browser, but post requests can be stopped. On Thu, Mar 11, 2021, 01:42 Kunal Solanke wrote: > Ok in that case, drf by default sets a browsableapi render on all of the > views and viewsets, either overide that in setti

Re: How to disable django views in the browser

2021-03-10 Thread Kunal Solanke
Ok in that case, drf by default sets a browsableapi render on all of the views and viewsets, either overide that in settings, or use renderer_classes=(JSONRendere,) in views in which yiu want to stop it. Search for BrowsableAPIRenderer. Ig you should have mentioned drf sooner. On Thu, Mar 11

Re: How to disable django views in the browser

2021-03-10 Thread Mostapha Bouderka
I'am using the django rest framework On Wednesday, March 10, 2021 at 8:01:26 PM UTC kunalsol...@gmail.com wrote: > Idk the overall use case here , > But if the prject is reasonably bigger and you want to use class based > views, I'd suggest you to use drf. > But you if

Re: How to disable django views in the browser

2021-03-10 Thread Mostapha Bouderka
Thanks for the reply. However, your answer didn't really solve my issue. The form i mentioned is just an example, in fact i have other views,. The issue is that i want those views to only handle information and send them bach to the front end, but if a user tries to access them thro

Re: How to disable django views in the browser

2021-03-10 Thread Kunal Solanke
Please ignore typos. On Thu, Mar 11, 2021, 01:30 Kunal Solanke wrote: > Idk the overall use case here , > But if the prject is reasonably bigger and you want to use class based > views, I'd suggest you to use drf. > But you if you don't want to use that,you will have

Re: How to disable django views in the browser

2021-03-10 Thread Kunal Solanke
Idk the overall use case here , But if the prject is reasonably bigger and you want to use class based views, I'd suggest you to use drf. But you if you don't want to use that,you will have to overide most to the CBV given by djnango as most of them expect a success url or a template

Re: How to disable django views in the browser

2021-03-10 Thread Kasper Laudrup
On 10/03/2021 16.43, Mostapha Bouderka wrote: I'm working on a project with react and django; and want to use django views to be used as information source only and not show a page on the browser. For example, I have a pilot sign up page that uses a pilot create view to provide informati

How to disable django views in the browser

2021-03-10 Thread Mostapha Bouderka
Hi I'm working on a project with react and django; and want to use django views to be used as information source only and not show a page on the browser. For example, I have a pilot sign up page that uses a pilot create view to provide information to the pilot model. I want the users

Re: can we integrate html views that look far better then what is available with django

2021-03-07 Thread Ryan Nowakowski
ows for any design that you really want yourself - you just > >> need to design the HTML the way you want - I have personally used Django > >> for many different projects and they all look different. There is no > >> default layout for Django - so I think I don't really

Re: can we integrate html views that look far better then what is available with django

2021-03-05 Thread sridhar vumma
cts and they all look different. There is no >> default layout for Django - so I think I don't really understand your >> question :) >> >> Regards, >> >> Andréas >> >> >> Den tors 18 feb. 2021 kl 14:43 skrev sridhar vumma > >: &

Re: can we integrate html views that look far better then what is available with django

2021-02-19 Thread sridhar vumma
I have personally used Django > for many different projects and they all look different. There is no > default layout for Django - so I think I don't really understand your > question :) > > Regards, > > Andréas > > > Den tors 18 feb. 2021 kl 14:43 skrev sridhar v

Re: can we integrate html views that look far better then what is available with django

2021-02-18 Thread Andréas Kühne
many different projects and they all look different. There is no default layout for Django - so I think I don't really understand your question :) Regards, Andréas Den tors 18 feb. 2021 kl 14:43 skrev sridhar vumma : > we see better html views with websites like stackoverflow.co

can we integrate html views that look far better then what is available with django

2021-02-18 Thread sridhar vumma
we see better html views with websites like stackoverflow.com can we integrate such high end html websites along with django is that possible -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Hi any body help i want code video belonging views,likes and dislikes

2021-02-01 Thread Mahendra
Like youtube videos belonging to views,likes and Dislikes Mahendra Yadav On Mon, 1 Feb 2021, 20:23 Kasper Laudrup, wrote: > If you want someone to help you with anything, at least take the minimal > effort of asking for it in a proper way. > > I have no idea which kind of response y

Re: Hi any body help i want code video belonging views,likes and dislikes

2021-02-01 Thread sakshi jain
Hi - Plz help me On Mon, Feb 1, 2021, 20:23 Kasper Laudrup wrote: > If you want someone to help you with anything, at least take the minimal > effort of asking for it in a proper way. > > I have no idea which kind of response you expect to get from posting > something like this. > > Kind regards

Re: Hi any body help i want code video belonging views,likes and dislikes

2021-02-01 Thread Kasper Laudrup
If you want someone to help you with anything, at least take the minimal effort of asking for it in a proper way. I have no idea which kind of response you expect to get from posting something like this. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to

Hi any body help i want code video belonging views,likes and dislikes

2021-02-01 Thread Mahendra
Mahendra Yadav -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://group

Re: Good Django libraries to read to really understand class-based views?

2021-01-12 Thread Robert F.
yond that supports more specific use cases that usually > simplifies handling the request - i.e. templates - and each of those > provides its own set of patterns. > > HTH, > /d > > > On 12 January 2021 at 02:15:11, Robert F. (robert....@gmail.com) wrote: > > Are there

Re: Good Django libraries to read to really understand class-based views?

2021-01-12 Thread David Nugent
t;) wrote: Are there any Django libraries that make extensive use of class-based views that I might study if I want to gain an in-depth understanding of how to use them? The Django documentation is OK at explaining what they are and how they work but most of the examples are very trivial in natur

Re: Good Django libraries to read to really understand class-based views?

2021-01-12 Thread Benjamin Schollnick
> I recommend you consider > https://spookylukey.github.io/django-views-the-right-way/ I second this, I’m going through this right now, and it’s very useful information regarding Class Based views vs Function Based views… It’s making me consider rewriting Quickbbs/Gallery again, with

Re: Good Django libraries to read to really understand class-based views?

2021-01-12 Thread Carsten Fuchs
Dear Robert, I recommend you consider https://spookylukey.github.io/django-views-the-right-way/ Best regards, Carsten Am 11.01.21 um 16:14 schrieb Robert F.: > Are there any Django libraries that make extensive use of class-based views > that I might study if I want to gain an in

Re: Good Django libraries to read to really understand class-based views?

2021-01-11 Thread Arisophy
Hello Robert. Did you read class based views code? Original django class-based view code is below. https://github.com/django/django/tree/master/django/views/generic I made an extension class for FormView and ListView. https://github.com/Arisophy/django-searchview I hope it helps you

Good Django libraries to read to really understand class-based views?

2021-01-11 Thread Robert F.
Are there any Django libraries that make extensive use of class-based views that I might study if I want to gain an in-depth understanding of how to use them? The Django documentation is OK at explaining what they are and how they work but most of the examples are very trivial in nature. I&#

Re: How can I multiply 2 or more fields in django views or models

2021-01-04 Thread jose angel encinas ramos
Ok, i understood, can you show me how to multiply 2 fields? really i can't to do that... i guess i in mental looping i try to do that in views.py: data = Articles.objects.all().annotate(result=F('coust_buy') * F('quantity' )).output_field=FloatField('result') and the result is this what to yo

Re: How can I multiply 2 or more fields in django views or models

2021-01-04 Thread Ayser shuhaib
Nothing wrong with the query, the problem is that you are trying to multiply two values of a different type. You can fix that by converting the smallInteger value to decimal. On Mon, 04 Jan 2021 at 23:01, jose angel encinas ramos < encinasj.an...@gmail.com> wrote: > Hi everyone, i'm a new in djan

Re: Built in views how to change in django watson package.

2020-12-09 Thread Omkar Parab
gt; Please enter a query in the search form. >> {% endif %} >> >> {% endif %} >> >> >> >> On Wed, Dec 9, 2020, 2:35 PM Salima Begum >> wrote: >> >>> Thank you @Omkar Parab, I have tried your

Re: Built in views how to change in django watson package.

2020-12-09 Thread Salima Begum
> > > On Wed, Dec 9, 2020, 2:35 PM Salima Begum > wrote: > >> Thank you @Omkar Parab, I have tried your suggestion. It is working but >> the only thing i want is how to show the result search list in the front >> end page in template. >> >>

Re: Built in views how to change in django watson package.

2020-12-09 Thread Omkar Parab
ur suggestion. It is working but > the only thing i want is how to show the result search list in the front > end page in template. > > Please can you help me out in this also. > > Thanks > ~Salima > > On Wed, Dec 9, 2020 at 11:16 AM Omkar Parab wrote: > >> He

Re: Built in views how to change in django watson package.

2020-12-09 Thread Salima Begum
the link for the built-in-views, > > https://github.com/etianen/django-watson/wiki/Built-in-views > > To return search results on the home page, you need to add your, > > {℅ Url "your_home_namespace" ℅} > > in > > > > On Wed, Dec 9, 2020, 9:35 AM Sa

Re: Built in views how to change in django watson package.

2020-12-08 Thread Omkar Parab
Here's the link for the built-in-views, https://github.com/etianen/django-watson/wiki/Built-in-views To return search results on the home page, you need to add your, {℅ Url "your_home_namespace" ℅} in On Wed, Dec 9, 2020, 9:35 AM Salima Begum wrote: > Hi all, > &g

Built in views how to change in django watson package.

2020-12-08 Thread Salima Begum
Hi all, I am using the django watson package in my project. How to achieve to change built in views to change default template rendering and to search results in the home page. This is url of django watson '''https://github.com/etianen/django-watson/wiki/Built-in-views''

RES: testing class based generic views

2020-10-26 Thread Samuel Nogueira
/SamuelNoB Linkedin: https://www.linkedin.com/in/samuel-nogueira-87800b1aa/ - De: Patrick CarraEnviado:sábado, 24 de outubro de 2020 16:53Para: Django usersAssunto: testing class based generic views Can

testing class based generic views

2020-10-24 Thread Patrick Carra
Can anyone point me towards a tutorial for how to test a CreateView function? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegr

Re: Changing ordering of model in the admin views

2020-10-11 Thread Dvs Khamele
Hi do you hire contract based python/django freelancer? We can help you in this and related tasks at fair prices. Reply or send email to divy...@pythonmate.com Best Regards, Divyesh Khamele, Pythonmate On Sat, 10 Oct 2020, 2:03 pm אורי, wrote: > Django users, > > I have a User model, in which I

Changing ordering of model in the admin views

2020-10-10 Thread אורי
Django users, I have a User model, in which I defined class Meta with ordering. It's defined like this: class Meta: verbose_name = _('user') verbose_name_plural = _('users') ordering = ('-speedy_net_site_profile__last_visit',) swappable = 'AUTH_USER_MODEL' But, I have two apps -

Re: How to pass a set of objects in between two views?

2020-08-24 Thread Kunal Solanke
rm > from django.contrib.auth.forms import AuthenticationForm > import random > from django.contrib.auth import login, logout, authenticate > > # Create your views here. > def home(request): > return render(request, 'testapp/home.html') > > def loginuser(request): > #

Re: How to pass a set of objects in between two views?

2020-08-24 Thread vipul shinde
from django.shortcuts import render, redirect from .models import * from .forms import UserForm from django.contrib.auth.forms import AuthenticationForm import random from django.contrib.auth import login, logout, authenticate # Create your views here. def home(request): return render(request

Re: How to pass a set of objects in between two views?

2020-08-24 Thread hans alexander
Can you share the views.py that you wrote? Actually If the page for random set of questions is same for User NOT Logged In and User Logged In, the data you called from database will still showing up. On Mon, Aug 24, 2020 at 9:19 PM vipul shinde wrote: > > I'm building a quiz app in which I'm sto

How to pass a set of objects in between two views?

2020-08-24 Thread vipul shinde
I'm building a quiz app in which I'm storing questions in the database by creating a model class. I am retrieving a random question set for each user from the database and then rendering them on an HTML page. The problem is after logging a user in, a random set of questions appears but that random

Leverage Django 3.1+ async views to implement SSE

2020-08-22 Thread Benoit Blanchon
Hi, Documentation for Django 3.1 <https://docs.djangoproject.com/en/3.1/topics/async/#async-views:%7E:text=The%20main%20benefits%20are%20the%20ability,long%2Dpolling%2C%20and%20other%20exciting%20response%20types.> says this about async views: *The main benefits are the ability to s

How to pass values of drop down from html template to views in Django?

2020-06-26 Thread ratnadeep ray
I need to send the value of the selected option in a drop down to the views. My html code is as follows: > > Select version to compare with > {%for ver in version_list%} > **{{ver}} option>** > {% endfor %} > The above is giving me the following error: > Page n

Re: Django Reference Manual on what classes can be used with views, urls, etc...

2020-06-24 Thread Dennis Triplett
asses, or Djanago tools > > are allowed in its calling syntax... Example > > > from django.urls import path > from MyApplication import views > > > What I am looking for is an explanation of what things can be imported with > URLS, VIEWS, HTTP > > There are ot

Re: Django Reference Manual on what classes can be used with views, urls, etc...

2020-06-24 Thread Cbh Bnh
...@gmail.com a écrit : > I have been looking for a Django Reference Manual to let me know what > classes, or Djanago tools > > are allowed in its calling syntax... Example > > > from django.urls import path > from MyApplication import views > > > What I am look

Re: Django Reference Manual on what classes can be used with views, urls, etc...

2020-06-24 Thread Cbh Bnh
UTC+2, dlt1...@gmail.com a écrit : > I have been looking for a Django Reference Manual to let me know what > classes, or Djanago tools > > are allowed in its calling syntax... Example > > > from django.urls import path > from MyApplication import views > > > What

Django Reference Manual on what classes can be used with views, urls, etc...

2020-06-23 Thread Dennis Triplett
I have been looking for a Django Reference Manual to let me know what classes, or Djanago tools are allowed in its calling syntax... Example from django.urls import path from MyApplication import views What I am looking for is an explanation of what things can be imported with URLS

RE: why in views we use def(functions) and model we use class, why not we use def(fuction) in models and class in views

2020-06-18 Thread Vishesh Mangla
If your wish whatever you want to use, all you have to use is the “request” variable that Django gives you. Btw see “generic views”.  Sent from Mail for Windows 10 From: yashwanth balanaguSent: 18 June 2020 12:23To: Django usersSubject: why in views we use def(functions) and model we use class

why in views we use def(functions) and model we use class, why not we use def(fuction) in models and class in views

2020-06-17 Thread yashwanth balanagu
why in views we use def(functions) and model we use class, why not we use def(fuction) in models and class in views -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, sen

Re: Customizing Django built-in views such as LoginView

2020-05-30 Thread 'László Hegedűs' via Django users
users, > > Which way is preferred to customize Django built-in views such as > LoginView: > > - Define a line in urls.py: > > path(route='login/', view=views.django_auth_views.LoginView.as_view( > template_name='accounts/login.html', authenti

Re: Customizing Django built-in views such as LoginView

2020-05-29 Thread אורי
Thank you. אורי u...@speedy.net On Fri, May 29, 2020 at 3:57 PM Augusto Destrero wrote: > I would choose the second option and define a LoginView subclass in the > views.py module. > The outcome is exactly the same, but I'd prefer to have my views all > defined in views.py f

Re: Customizing Django built-in views such as LoginView

2020-05-29 Thread Augusto Destrero
I would choose the second option and define a LoginView subclass in the views.py module. The outcome is exactly the same, but I'd prefer to have my views all defined in views.py file. Adding too much logic in the urls.py module IMHO is not a good idea and it makes the view less extendab

Customizing Django built-in views such as LoginView

2020-05-29 Thread אורי
Django users, Which way is preferred to customize Django built-in views such as LoginView: - Define a line in urls.py: path(route='login/', view=views.django_auth_views.LoginView.as_view( template_name='accounts/login.html', authentication_form=forms.LoginForm

Re: How to pass a variable to views from a template using href ?

2020-05-19 Thread Ignat Petrov
You should be able to do that by using a relative path instead of the absolute "/execute". Just use something like href="{% url 'execute' 'SQL' %}. For this to work you need to name the url path as 'execute'. That way you'll pass the 'SQL' value to the endpoint. Here is example from the polls tu

Re: How to pass a variable to views from a template using href ?

2020-05-19 Thread Desh Deepak
line, can we send the value "SQL" clicking on the link > of "SQL data" to the method "execute" written in the views? If not, then > what way can I do so? > > Thanks. > > > > > > -- > You received this message because you are subscribed

  1   2   3   4   5   6   7   8   9   10   >