/mysite/ealan/migrations/0001_initial.py
Python | 53 lines | 45 code | 6 blank | 2 comment | 0 complexity | 084bf56bbcbd8ef3c44a16ee880971b0 MD5 | raw file
- # -*- coding: utf-8 -*-
- # Generated by Django 1.9.5 on 2016-04-06 09:36
- from __future__ import unicode_literals
- import django.core.validators
- from django.db import migrations, models
- import django.db.models.deletion
- class Migration(migrations.Migration):
- initial = True
- dependencies = [
- ]
- operations = [
- migrations.CreateModel(
- name='Category',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=140)),
- ],
- ),
- migrations.CreateModel(
- name='Post',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(max_length=140)),
- ('details', models.TextField()),
- ('date', models.DateTimeField()),
- ('image', models.ImageField(upload_to=b'')),
- ('price', models.FloatField()),
- ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ealan.Category')),
- ],
- ),
- migrations.CreateModel(
- name='Vender',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=140)),
- ('Address', models.TextField()),
- ('Phone1', models.CharField(blank=True, max_length=9, validators=[django.core.validators.RegexValidator(message=b"Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.", regex=b'^\\+?1?\\d{9,15}$')])),
- ('Phone2', models.CharField(blank=True, max_length=9, validators=[django.core.validators.RegexValidator(message=b"Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.", regex=b'^\\+?1?\\d{9,15}$')])),
- ('email', models.CharField(max_length=140)),
- ],
- ),
- migrations.AddField(
- model_name='post',
- name='vender',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ealan.Vender'),
- ),
- ]