Skip to content

Instantly share code, notes, and snippets.

View ishtiaque2asad2's full-sized avatar

Ishtiaque Asad ishtiaque2asad2

View GitHub Profile
@JackAtOmenApps
JackAtOmenApps / django_choices.txt
Last active November 28, 2023 15:19
Example of the new django 3.0 TextChoices enumeration types
from django.db import models
class Animal(models.Model):
class AnimalType(models.TextChoices):
ANTELOPE = 'A', 'Antelope'
BAT = 'B', 'Bat'
COUGAR = 'C', 'Cougar'
animal_type = models.CharField(max_length=1, choices=AnimalType.choices, default=AnimalType.ANTELOPE)
[options]
#
# WARNING:
# If you use the Odoo Database utility to change the master password be aware
# that the formatting of this file WILL be LOST! A copy of this file named
# /etc/odoo/openerp-server.conf.template has been made in case this happens
# Note that the copy does not have any first boot changes
#-----------------------------------------------------------------------------
# Odoo Server Config File - TurnKey Linux