Browse Source

add to string for domain objects

main
Julia Luna 2 years ago
parent
commit
a5fc03ecb8
Signed by: xenua
GPG Key ID: 6A0C04FA9A7D7582
  1. 3
      scopedsites/models.py
  2. 2
      setup.py

3
scopedsites/models.py

@ -10,6 +10,9 @@ class Domain(models.Model):
unique=True, unique=True,
) )
def __str__(self):
return self.fqdn
@classmethod @classmethod
def get_from_request(cls, request): def get_from_request(cls, request):
return get_object_or_404(cls, fqdn__iexact=request.META.get('HTTP_HOST', '')) return get_object_or_404(cls, fqdn__iexact=request.META.get('HTTP_HOST', ''))

2
setup.py

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

Loading…
Cancel
Save