Re: Start Gunicorn on boot

2017-10-20 Thread Nonverbis M
Antonis, thank you. Yes, this is upstart. I'll try it with systemd as you suggested. > > -- 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..

Start Gunicorn on boot

2017-10-20 Thread Nonverbis M
*Ubuntu 16.04.3 Desktop version.* *gunicorn (version 19.7.1)* *virtualenv 15.1.0* I'd like Gunicorn to start on boot. Gunicorn is integrated with *Django*. */etc/init/photoarchive.conf* description "Gunicorn server for photoarchive" start on runlevel [2345] stop on runlevel [!2345] resp

SelectDateWidget when DateField is not required

2017-06-12 Thread Nonverbis M
*Django 1.11.2* I'd like to use SelectDateWidget. class FrameDate(models.Model): through_date = models.DateField(null=True, blank=True, verbose_name=_("through")) ... class FrameDateForm(ModelForm): def clean

Update FileField: what is the name of the old file

2017-05-07 Thread Nonverbis M
*Django 1.11* When FileUpdate is called, I substitute the old file with a new one. I'd like to handle the old file. Namely move it to some other directory. Could you have a look at the picture below. New file is called "C book 1.pdf". Existing file is called "4_Oracle_Database_11g_PLSQL_Fun

Formset: Is get_form_kwargs() has a bad example in documentation?

2016-09-29 Thread Nonverbis M
https://docs.djangoproject.com/en/1.10/topics/forms/formsets/#passing-custom-parameters-to-formset-forms In the documentation we can read: Quotation= The form_kwargs may also depend on the specific form instance. The formset base class provides aget_form_kwargs method. The method takes

Discussing the documentation on formset.get_form_kwargs()

2016-09-29 Thread Nonverbis M
https://docs.djangoproject.com/en/1.10/topics/forms/formsets/#passing-custom-parameters-to-formset-forms In the documentation there is a sentence "The formset base class provides a get_form_kwargs method." Could you help me understand why this sentence should be illustrated with the exmple of