Ticket #4951: models.diff
File models.diff, 684 bytes (added by , 17 years ago) |
---|
-
models.py
1 1 from django.db import models 2 2 from django.utils.translation import ugettext_lazy as _ 3 from django.http import get_host 3 4 4 5 class SiteManager(models.Manager): 5 6 def get_current(self): … … 36 37 The save() and delete() methods raise NotImplementedError. 37 38 """ 38 39 def __init__(self, request): 39 self.domain = self.name = request.META['SERVER_NAME']40 self.domain = self.name = get_host(request) 40 41 41 42 def save(self): 42 43 raise NotImplementedError('RequestSite cannot be saved.')