return or not from super().method(*args, **kwargs)

2021-11-30 Thread Carles Pina i Estany
reading some code and I thought that I was in a "save()" for a form but I was in the model. For the form I need to not forget the "return". Thanks for any thoughts / comments :-) Cheers, -- Carles Pina i Estany https://carles.pina.cat -- You received this mess

Re: To start contribution from initial level

2021-01-20 Thread Carles Pina i Estany
t. There is quite a lot of documentation here: https://docs.djangoproject.com/en/dev/internals/contributing/ Cheers! -- Carles Pina i Estany https://carles.pina.cat -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from t

Re: CRUD Generator

2021-01-10 Thread Carles Pina i Estany
Forms (using django-crispy-forms), update the urls.py. But depends on the project it might make sense to use something that helps on this. Cheers, -- Carles Pina i Estany https://carles.pina.cat -- You received this message because you are subscribed to the Google Groups "Django u

Re: MultipleChoiceField form bug?

2020-12-22 Thread Carles Pina i Estany
= ['name'] ``` I would look at not using forms.MultipleChoiceField and use forms.ModelMultipleChoiceField(): then you should be able to pass queryset (first argument for the ModelMultipleChoiceField) and avoid the REF_OPTIONS=... line Let me know what you find :-) Cheers, > > > On

Re: MultipleChoiceField form bug?

2020-12-22 Thread Carles Pina i Estany
using datetime.now() in a class variable when I wanted it the "now" that the view was used not the "now" when the application was started up. -- Carles Pina i Estany https://carles.pina.cat -- You received this message because you are subscribed to the Google Groups &q

Re: Deploy a finished django application

2020-12-03 Thread Carles Pina i Estany
he steps to deploy it. If the application needs to be packaged in Docker, virtual machine templates, create you a database user so the application can connect to it, etc. -- Carles Pina i Estany https://carles.pina.cat -- You received this message because you are subscribed to the Google Gro

Re: Get datetime now, not at server initialisation

2020-10-30 Thread Carles Pina i Estany
it is: https://docs.djangoproject.com/en/3.1/ref/models/fields/#django.db.models.FileField.upload_to , it doesn't explain how it is implemented internally). It might help you to use a Python debugger and see the steps as they happen, variables, etc. (adding a breakpoint in the Django code and

Re: Get datetime now, not at server initialisation

2020-10-28 Thread Carles Pina i Estany
ion time. Some time ago I had a similar code that caused a bug: in a ListView the "queryset = " is executed on startup time. For a dynamic one I should have used get_queryset() method. -- Carles Pina i Estany https://carles.pina.cat -- You received this message because you ar

Re: Want to get informations about bets Django hosting plateform

2020-09-23 Thread Carles Pina i Estany
ore standard than on Heroku (in case that I want to change it). Other than that I use VPSs with Docker. Cheers, -- Carles Pina i Estany https://carles.pina.cat -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this g

Re: I want to store (City, Country) pairs in my models as a field. Is GeoDjango an overkill for my use case?

2020-09-17 Thread Carles Pina i Estany
; to use?* I've read your question in multiple places I think! I would seriously consider just using: https://django-autocomplete-light.readthedocs.io/en/master/ You would need to have in your Django app the cities and countries, tweak the query from django-autocomplete-light, etc. Cheers, --

Re: project ideas

2020-07-31 Thread Carles Pina i Estany
Do you have lots of books? A book locator... etc. :-) -- Carles Pina i Estany https://carles.pina.cat -- 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

not possible to delete if calling self.errors in a Form in InlineFormSet

2020-06-18 Thread Carles Pina i Estany
if I need to show the checkbox or not. I wonder if there is some other way to approach this issue that is a bit cleaner (avoiding self.data, self contained in the form logic, etc.). Do you use any other approach? c) Actually, should Django tried to prevent my error somehow? :-) Thanks very much!

Re: how to add an extra field in an admin form (not part of the model)

2020-05-17 Thread Carles Pina i Estany
me for the same problem. > > Raj Patel > > On Sun, 17 May, 2020, 6:50 pm Carles Pina i Estany, wrote: > > > > > Hi, > > > > Last week I tried to do something in admin but it didn't work as I had > > guessed. > > > > The simplification of what I

how to add an extra field in an admin form (not part of the model)

2020-05-17 Thread Carles Pina i Estany
s). Does any of you expand an admin form with a new field? any idea, references, etc. welcomed! Thank you very much, -- Carles Pina i Estany -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop