Browse Source

remove unnecessary bloat™, bump patch

main
Julia Luna 3 years ago
parent
commit
8c776b3f5b
Signed by: xenua
GPG Key ID: 6A0C04FA9A7D7582
  1. 5
      scopedsites/migrations/0001_initial.py
  2. 9
      scopedsites/models.py
  3. 2
      setup.py

5
scopedsites/migrations/0001_initial_squashed_0002_alter_domain_name.py → scopedsites/migrations/0001_initial.py

@ -1,11 +1,11 @@ @@ -1,11 +1,11 @@
# Generated by Django 4.0.5 on 2022-06-18 21:58
# Generated by Django 4.0.5 on 2022-06-18 22:51
from django.db import migrations, models
class Migration(migrations.Migration):
replaces = [('scopedsites', '0001_initial'), ('scopedsites', '0002_alter_domain_name')]
initial = True
dependencies = [
]
@ -16,7 +16,6 @@ class Migration(migrations.Migration): @@ -16,7 +16,6 @@ class Migration(migrations.Migration):
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('fqdn', models.CharField(max_length=255, unique=True, verbose_name='FQDN')),
('name', models.CharField(blank=True, max_length=255, verbose_name='display name')),
],
),
]

9
scopedsites/models.py

@ -10,15 +10,6 @@ class Domain(models.Model): @@ -10,15 +10,6 @@ class Domain(models.Model):
unique=True,
)
name = models.CharField(
_('display name'),
max_length=255,
blank=True,
)
@classmethod
def get_from_request(cls, request):
return get_object_or_404(cls, fqdn__iexact=request.META.get('HTTP_HOST', ''))
def get_name(self):
return self.name or self.fqdn

2
setup.py

@ -3,7 +3,7 @@ from setuptools import setup @@ -3,7 +3,7 @@ from setuptools import setup
setup(
name="django_scopedsites",
packages=["scopedsites", "scopedsites.migrations"],
version="0.1.3",
version="0.1.4",
description="django_scopes x django.contrib.sites",
python_requires=">=3.6",
install_requires=[

Loading…
Cancel
Save