Commit eb38e7a5 authored by freetux's avatar freetux

some fixes and migration

parent 96af488f
......@@ -5,7 +5,7 @@ __pycache__/
# C extensions
*.so
tanbamaapp/media/avatars/*
# Distribution / packaging
.Python
.venv/
......
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-05-22 22:07
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_jalali.db.models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('body', '0002_drug_rx'),
]
operations = [
migrations.CreateModel(
name='UserActivity',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('activity', models.CharField(choices=[('VL', 'بدون فعالیت'), ('L', 'کم فعالیت'), ('N', ' فعالیت متوسط'), ('A', ' فعال'), ('VA', ' بیش فعال')], max_length=2, verbose_name='میزان فعالیت روزانه')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.AlterField(
model_name='rx',
name='date_created',
field=django_jalali.db.models.jDateTimeField(blank=True, editable=False, verbose_name='Date Created'),
),
migrations.AlterField(
model_name='weight',
name='date_created',
field=django_jalali.db.models.jDateTimeField(blank=True, editable=False, verbose_name='Date Created'),
),
]
......@@ -20,7 +20,7 @@ class Weight(models.Model):
def __unicode__(self):
return smart_unicode(self.text)
class Drug(models.Model):
class Drug(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(max_length=255)
description = models.CharField(max_length=255)
......
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-05-22 22:07
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
import django_jalali.db.models
class Migration(migrations.Migration):
dependencies = [
('users', '0003_auto_20180520_0118'),
]
operations = [
migrations.RemoveField(
model_name='user',
name='avatar',
),
migrations.AlterField(
model_name='user',
name='birthday',
field=django_jalali.db.models.jDateTimeField(null=True, verbose_name='تاریخ تولد'),
),
migrations.AlterField(
model_name='user',
name='date_joined',
field=django_jalali.db.models.jDateTimeField(default=django.utils.timezone.now, verbose_name='زمان عضویت'),
),
migrations.AlterField(
model_name='user',
name='email',
field=models.EmailField(db_index=True, max_length=255, unique=True, verbose_name='آدرس ایمیل'),
),
migrations.AlterField(
model_name='user',
name='is_active',
field=models.BooleanField(default=True, help_text='مشخص میکند که کاربر فعال است یا خیر به جای حذف حساب کاربری این قسمت را غیرفعال کنید.', verbose_name='فعال'),
),
migrations.AlterField(
model_name='user',
name='is_staff',
field=models.BooleanField(default=False, help_text='تعیین اینکه آیا کاربر میتواند به بخش مدیریت وارد شود یا خیر.', verbose_name='وضعیت کاربر'),
),
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment