mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-18 15:34:16 +02:00
updated host object to not be unique
This commit is contained in:
parent
1b2f34935a
commit
5fed6d5810
2 changed files with 21 additions and 1 deletions
17
src/registrar/migrations/0062_alter_host_name.py
Normal file
17
src/registrar/migrations/0062_alter_host_name.py
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Generated by Django 4.2.7 on 2024-01-09 02:32
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("registrar", "0061_domain_security_contact_registry_id"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="host",
|
||||||
|
name="name",
|
||||||
|
field=models.CharField(default=None, help_text="Fully qualified domain name", max_length=253),
|
||||||
|
),
|
||||||
|
]
|
|
@ -20,7 +20,7 @@ class Host(TimeStampedModel):
|
||||||
null=False,
|
null=False,
|
||||||
blank=False,
|
blank=False,
|
||||||
default=None, # prevent saving without a value
|
default=None, # prevent saving without a value
|
||||||
unique=True,
|
unique=False,
|
||||||
help_text="Fully qualified domain name",
|
help_text="Fully qualified domain name",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -30,3 +30,6 @@ class Host(TimeStampedModel):
|
||||||
related_name="host", # access this Host via the Domain as `domain.host`
|
related_name="host", # access this Host via the Domain as `domain.host`
|
||||||
help_text="Domain to which this host belongs",
|
help_text="Domain to which this host belongs",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f"{self.domain.name} {self.name}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue