Re: How to retrieve the latest object added (new one) in Django models and display it in the template?

2023-02-28 Thread Andréas Kühne
I'm sorry Dev, but that is really bad practice. You are doing in python what can be done by the database. That type of code would create a memory error and be very slow to run. It's much better to get the last item from the database. In your example it would just be: last_action =

Re: List validator

2023-02-28 Thread Geo Jacob
Larry, It seems like request data field name don't have underscore. It should be case_status instead of casestatus Regards, Geo On Tue, Feb 28, 2023 at 2:12 AM Larry Martell wrote: > I have this defined in my serializer: > > case_status = serializers.ListField( >

Re: Need way of authentication with google without using an allauth packages

2023-02-28 Thread Jeman Kumar
https://python-social-auth.readthedocs.io/en/latest/configuration/django.html On Tue, 28 Feb, 2023, 12:50 pm MaheshKumar, wrote: > I need how to create an google authentication without using the django > -allauth packages. > > > Please give me an idea to create an flow of authentication with

Re: Need way of authentication with google without using an allauth packages

2023-02-28 Thread Vineet Kothari
https://realpython.com/flask-google-login/ Try this one to get an overall idea the concept is same for google. On Tue, 28 Feb 2023, 7:34 pm Dev Femi Badmus, wrote: > google cloud auth or account auth, which one?? > > On Tue, Feb 28, 2023 at 8:21 AM MaheshKumar wrote: > >> I need how to

Re: Need way of authentication with google without using an allauth packages

2023-02-28 Thread Dev Femi Badmus
google cloud auth or account auth, which one?? On Tue, Feb 28, 2023 at 8:21 AM MaheshKumar wrote: > I need how to create an google authentication without using the django > -allauth packages. > > > Please give me an idea to create an flow of authentication with google in > django > > -- > You

Re: How to retrieve the latest object added (new one) in Django models and display it in the template?

2023-02-28 Thread Dev Femi Badmus
all_action=ActionGame.objects.all() my_action = [] for action in all_action: my_action.append(action) last_action = my_action[-1] On Tue, Feb 28, 2023 at 1:05 PM Andréas Kühne wrote: > Se comments below. > > > Den fre 24 feb. 2023 kl 12:14 skrev Byansi Samuel < > samuelbyans...@gmail.com>:

Re: How to retrieve the latest object added (new one) in Django models and display it in the template?

2023-02-28 Thread Andréas Kühne
Se comments below. Den fre 24 feb. 2023 kl 12:14 skrev Byansi Samuel : > Hey everyone, l got a problem. Am trying to retrieve a single latest > object added everytime, and display it in the template. > Below is my codes but; > > Help me figure it out the source of the problem in these different

Re: How can I serve an Angular app from root?

2023-02-28 Thread Andréas Kühne
Hi, You shouldn't be serving your angular application that way. Running it in development, you run it and serve it from the "ng serve" command. Running in production, you need to have a webserver in front of your application any way, and should serve the angular files from the webserver. Med