no longer using legacy remove_www_and_dev function on example
This commit is contained in:
parent
fdc8dfec81
commit
1aa30ad7fb
|
@ -1,7 +1,7 @@
|
|||
from django.conf import settings
|
||||
from django.db import utils
|
||||
from django.views.generic import TemplateView
|
||||
from tenant_schemas.utils import remove_www_and_dev
|
||||
from tenant_schemas.utils import remove_www
|
||||
from customers.models import Client
|
||||
|
||||
|
||||
|
@ -11,7 +11,7 @@ class HomeView(TemplateView):
|
|||
def get_context_data(self, **kwargs):
|
||||
context = super(HomeView, self).get_context_data(**kwargs)
|
||||
|
||||
hostname_without_port = remove_www_and_dev(self.request.get_host().split(':')[0])
|
||||
hostname_without_port = remove_www(self.request.get_host().split(':')[0])
|
||||
try:
|
||||
Client.objects.get(schema_name='public')
|
||||
except utils.DatabaseError:
|
||||
|
@ -27,4 +27,4 @@ class HomeView(TemplateView):
|
|||
context['only_public_tenant'] = True
|
||||
|
||||
context['tenants_list'] = Client.objects.all()
|
||||
return context
|
||||
return context
|
||||
|
|
Loading…
Reference in New Issue