Configuring Celery + Redis + Supervisor with Django
Install Celery
$ pip install celery
$ pip install redis
Install Celery Broker
package in.xmlparser; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import org.xmlpull.v1.XmlPullParser; | |
import org.xmlpull.v1.XmlPullParserException; |
import re | |
from typing import Dict, Callable, Optional | |
def to_camel_case(snake_case_str: str) -> str: | |
""" | |
Transforms snake_case to camelCase | |
""" | |
components = snake_case_str.split('_') | |
titled_components = ''.join(x.title() for x in components[1:]) |
$ pip install celery
$ pip install redis
Fields | null=True | blank=True |
---|---|---|
CharField, TextField, SlugField, EmailField, CommaSeparatedIntegerField | DON'T Django's convention is to store empty values as the empty string, and to always retrieve NULL or empty values as the empty string for consistency. | OK Do this if you want the corresponding form widget to accept empty values. If you set this, empty values get stored as empty strings in the database. |
BooleanField | DON'T Use NullBooleanField instead. | DON'T |
IntegerField, FloatField, DecimalField | OK If you wabt to be able to set the value to NULL in the database | OK if you want the corresponding form widget to accept empty values. if so out will also want to set null=True |
DateTimeField, DateField, TimeField | OK if you want to be able to set the value to NULL in the database. | OK If you want the corresponding form widget to accept empty values, or if you are using auto now or auto now add. If so, you will al |