Re: "Django road map and resources"

2023-03-02 Thread David Nugent
I’ll second that - Udemy is a great resource and frequent run specials on courses. Also, don’t overlook Youtube where you can often find same/similar and good quality content available for free. Regards, David -- Original Message -- From "Sebastián Bevc Costa" To "Django users" D

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

2023-03-02 Thread Boris Pérez
One way could be latest_action=ActionGame.obje cts.filter(published=published).order_by('-id')[:1] El jue, 2 mar 2023 a las 17:29, Sandip Bhattacharya (< sand...@showmethesource.org>) escribió: > Your problem is still about where the 'published’ value is coming from in > the call to filter(publi

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

2023-03-02 Thread Sandip Bhattacharya
Your problem is still about where the 'published’ value is coming from in the call to filter(published=published). Is it coming from a form? A Get parameter? A post parameter? Extract it appropriately before calling filter() > On Mar 2, 2023, at 3:46 AM, Byansi Samuel wrote: > > def action (

Re: django.db.utils.OperationalError: foreign key mismatch - "pet_profile_petphoto_pet" referencing "pet_profile_petphoto"

2023-03-02 Thread Michael Starr
Now I am trying https://stackoverflow.com/questions/28385919/django-no-such-table-for-custom-user-profile-why But it doesn't get rid of OperationalError at /admin/pet_profile/pet/ no such table: pet_profile_pet Django is acting as though it has hidden memory somewhere, outside of the db.sqlite d

Re: django.db.utils.OperationalError: foreign key mismatch - "pet_profile_petphoto_pet" referencing "pet_profile_petphoto"

2023-03-02 Thread Michael Starr
Including not even finding the basic model field Pet, the most basic thing OperationalError at /admin/pet_profile/pet/ no such table: pet_profile_pet It's totally effed. Michael On Thursday, March 2, 2023 at 2:01:15 PM UTC-8 Michael Starr wrote: > This > > https://stackoverflow.com/questions/627

Re: django.db.utils.OperationalError: foreign key mismatch - "pet_profile_petphoto_pet" referencing "pet_profile_petphoto"

2023-03-02 Thread Michael Starr
This https://stackoverflow.com/questions/62726885/foreign-key-mismatch-comment-referencing-chellenge seems to work, but now I am getting a slew of database table model errors. On Wednesday, March 1, 2023 at 12:35:59 PM UTC-8 Michael Starr wrote: > I even deleted the pet field from pet_photo and

Re: "Django road map and resources"

2023-03-02 Thread Sebastián Bevc Costa
You can search for Udemy courses. In some of them they build complete projects that you can follow along. There are books as well that guide you through projects, a quick google search or search in amazon books should give you some resources On Wednesday, March 1, 2023 at 9:30:57 PM UTC-3 Ryan

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

2023-03-02 Thread Byansi Samuel
Hey thanks, but l tried to use ordering=('-published') On Feb 28, 2023 5:04 PM, "Dev Femi Badmus" wrote: 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: