-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(domains): change model name Sites to Route
- Loading branch information
1 parent
d83e3b2
commit 1c5d12b
Showing
4 changed files
with
34 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
from django.contrib import admin | ||
|
||
from .models import Site | ||
from .models import Route | ||
|
||
|
||
class SiteAdmin(admin.ModelAdmin): | ||
class RouteAdmin(admin.ModelAdmin): | ||
list_display = ("dns", "subdomain", "instance", "service") | ||
autocomplete_fields = ("dns", "subdomain") | ||
|
||
|
||
admin.site.register(Site, SiteAdmin) | ||
admin.site.register(Route, RouteAdmin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
app/contrib/domains/traefik/migrations/0002_auto_20231206_1951.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Generated by Django 3.2 on 2023-12-06 19:51 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('route53', '0005_alter_vps_options'), | ||
('traefik', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Route', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('service', models.CharField(choices=[('webpage@docker', 'Public'), ('cms@docker', 'CMS')], max_length=25)), | ||
('dns', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='route53.hostedzone')), | ||
('instance', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='route53.vps')), | ||
('subdomain', models.ForeignKey(blank=True, limit_choices_to={'record_type': 'A'}, null=True, on_delete=django.db.models.deletion.SET_NULL, to='route53.recordset')), | ||
], | ||
), | ||
migrations.DeleteModel( | ||
name='Site', | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters