Test task for Smyt company.
git clone https://github.com/bilabon/smyt_task.git
cd smyt_task
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt --allow-all-external
cp smyt_task/settings/local.py.template smyt_task/settings/local.py
make test
make init_syncdb
make migrate_data
make run
- You can set structure of models here
/admin/core/setting/1/
. After saving you can see the updated filemodel.yml
in directory core's app. Then you can migrate it by commandmake migrate_data
- You can modify, update and create Users and Rooms at
https://smyt-task.herokuapp.com
auto: AutoField
bigint: BigIntegerField
bool: BooleanField
char: CharField
date: DateField
datetime: DateTimeField
decimal: DecimalField
email: EmailField
file: FileField
float: FloatField
image: ImageField
int: IntegerField
ip: IPAddressField
gip: GenericIPAddressField
nbool: NullBooleanField
pint: PositiveIntegerField
psint: PositiveSmallIntegerField
slug: SlugField
sint: SmallIntegerField
text: TextField
time: TimeField
url: URLField
fk: ForeignKey
m2m: ManyToManyField
timestamp: DateTimeField
<ModelName>:
[doc: docstring]
<fieldname>[-type-alias]:
[type: type-alias],
[args: arglist],
kwarg: value
Example:
Room:
doc: This is the room model
department:
type: char
blank: false
max_length: 200
spots:
type: int
blank: false