Django formset: unicity constraint pass form_valid()

2023-06-04 Thread Jérôme Le Carrou
Hi, I've post my issue on Stackoverflow and do not have any ansewer so far. Hope some Django dev could me here ;) I try using FBV (logic more easy to understand for me). Maybe I should have used inlineformset_facory to deal with FK but for conception concerns patient is passed in context. I fa

Django selenium (StaticLiverServerTestCase): tests run together fail but pass if run individually

2022-03-30 Thread Jérôme Le Carrou
write tests with *StaticLiverServerTestCase* for my Django application. *My issue: tests runs together fail while pass when run individually.* I have read much about this behavior on SO but none of answer/comments help. It seems that issue may come from shared files/fields/data. I have tried

Django: date format management and unique_together -> “20/03/2020” value has an invalid date format. It must be in YYYY-MM-DD format.”]

2020-03-23 Thread Jérôme Le Carrou
Hi, I develop a Django project with internationalization English/French dates have to be displayed with the dd/mm/ format when user webbrowser is FR and -mm-dd when user webbrowser is EN to do that, I use JS that test webbrowser user favorite language and display format accordingly Th

Django: how to make queries between 2 tables that are not related in the model?

2020-02-13 Thread Jérôme Le Carrou
Hi, I have 2 models that are not related (maybe it should...) I need to make a query that select all records of my table Stock WITH related rows in Parametrage based on asp_sto_loc=asp_par_loc Something like SQL: select * from pha_asp_sto left join pha_asp_par on pha_asp_par.asp_par_loc=asp_st

form_add with pre-filled fields

2019-10-17 Thread Jérôme Le Carrou
Hi, I have a models with 3 classes: Visite, Inclusion, BilanBiologique and ExamenBiologique - Inclusion is linked to Visite (OneToOne) - BilanBiologique is linked to Visite (ForeignKey) - ExamenBiologique is linked to BilanBiologique (ForeignKey) - ExamenBiologique is a subform of BilanBiologiqu

Why and when I should override the default AdminSite

2019-10-09 Thread Jérôme Le Carrou
I am newbie in DJango I've started to read Django documentation and particularly the admin related documentation I would like to understand when an why it should be pertinent to override the default AdminSite regards -- You received this message because you are subscribed to the Google Groups

Re: How to prevent empty record in admin subform

2019-10-09 Thread Jérôme Le Carrou
thanks it works ! Le mercredi 9 octobre 2019 08:54:56 UTC+2, Aldian Fazrihady a écrit : > > Can you replace `extra = 1` with `extra = 0` ? > > On Wed, Oct 9, 2019 at 1:26 PM Jérôme Le Carrou > wrote: > >> Hello, >> I am newbie in Django and Python so hope you will

How to prevent empty record in admin subform

2019-10-08 Thread Jérôme Le Carrou
Hello, I am newbie in Django and Python so hope you will be indulgent I've read and read again the Django documentation but for now, some concept still are very abstract for me... I have a database and I use ModelForm and I try to customize this admin forms I currently have a main form with a

Problem with safedelete implementation

2019-09-30 Thread Jérôme Le Carrou
Hi I am new on this forum and very, very new user of Django so hope you will be uncensorious I need to implement the safedelete application (https://buildmedia.readthedocs.org/media/pdf/django-safedelete/latest/django-safedelete.pdf) for my project but I should have miss something in the doc