Commit fd8398fe authored by philippeoz's avatar philippeoz

Migrations recriadas, alteração no model de clientes

parent d9eecd62
# Generated by Django 2.0.1 on 2018-01-15 17:32 # Generated by Django 2.0.1 on 2018-01-17 10:05
from django.db import migrations, models from django.db import migrations, models
...@@ -15,7 +15,12 @@ class Migration(migrations.Migration): ...@@ -15,7 +15,12 @@ class Migration(migrations.Migration):
name='Cliente', name='Cliente',
fields=[ fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('domain_name', models.CharField(max_length=50)), ('nome', models.CharField(max_length=50)),
('domain_name', models.CharField(max_length=50, unique=True)),
('email', models.EmailField(max_length=70)),
('username', models.CharField(max_length=50)),
('password', models.CharField(max_length=50)),
('droplet_id', models.CharField(blank=True, max_length=50, null=True)),
], ],
options={ options={
'verbose_name': 'Cliente', 'verbose_name': 'Cliente',
......
# Generated by Django 2.0.1 on 2018-01-16 11:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='cliente',
name='email',
field=models.EmailField(default='isaiassantan301@gmail.com', max_length=70),
preserve_default=False,
),
migrations.AddField(
model_name='cliente',
name='password',
field=models.CharField(default='123456', max_length=20),
preserve_default=False,
),
]
File mode changed from 100755 to 100644
from django.db import models from django.db import models
from django.conf import settings
class Cliente(models.Model): class Cliente(models.Model):
"""Model definition for Cliente.""" """Model definition for Cliente."""
domain_name = models.CharField(max_length=50) # Informações do cliente
nome = models.CharField(max_length=50)
domain_name = models.CharField(max_length=50, unique=True)
email = models.EmailField(max_length=70) email = models.EmailField(max_length=70)
password = models.CharField(max_length=20) username = models.CharField(max_length=50)
password = models.CharField(max_length=50)
# Informações do droplet
droplet_id = models.CharField(max_length=50, blank=True, null=True)
class Meta: class Meta:
"""Meta definition for Cliente.""" """Meta definition for Cliente."""
...@@ -16,4 +24,4 @@ class Cliente(models.Model): ...@@ -16,4 +24,4 @@ class Cliente(models.Model):
def __str__(self): def __str__(self):
"""String representation of Cliente.""" """String representation of Cliente."""
return self.domain_name return f'{self.nome.title()} - {self.domain_name}.{settings.BASE_DOMAIN}'
...@@ -10,6 +10,9 @@ SITE_TITLE = config('SITE_TITLE', default='Administração Infatec') ...@@ -10,6 +10,9 @@ SITE_TITLE = config('SITE_TITLE', default='Administração Infatec')
# Header os admin site # Header os admin site
SITE_HEADER = config('SITE_HEADER', default='Administração Infatec') SITE_HEADER = config('SITE_HEADER', default='Administração Infatec')
# Base Domain
BASE_DOMAIN = config('BASE_DOMAIN', default='diariodigital.pege.com.br')
# Base directory of projetc # Base directory of projetc
BASE_DIR = Path(__file__).ancestor(2) BASE_DIR = Path(__file__).ancestor(2)
......
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