~kkubasik/django/aggregation-branch

« back to all changes in this revision

Viewing changes to django/core/servers/basehttp.py

  • Committer: adrian
  • Date: 2006-05-02 01:31:56 UTC
  • Revision ID: vcs-imports@canonical.com-20060502013156-2941fcd40d080649
MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
242
242
 
243
243
    # Error handling (also per-subclass or per-instance)
244
244
    traceback_limit = None  # Print entire traceback to self.get_stderr()
245
 
    error_status = "500 Dude, this is whack!"
 
245
    error_status = "500 INTERNAL SERVER ERROR"
246
246
    error_headers = [('Content-Type','text/plain')]
247
247
 
248
248
    # State variables (don't mess with these)
383
383
        assert type(data) is StringType,"write() argument must be string"
384
384
 
385
385
        if not self.status:
386
 
             raise AssertionError("write() before start_response()")
 
386
            raise AssertionError("write() before start_response()")
387
387
 
388
388
        elif not self.headers_sent:
389
389
            # Before the first output, send the stored headers
532
532
    server_version = "WSGIServer/" + __version__
533
533
 
534
534
    def __init__(self, *args, **kwargs):
535
 
        from django.conf.settings import ADMIN_MEDIA_PREFIX
536
 
        self.admin_media_prefix = ADMIN_MEDIA_PREFIX
 
535
        from django.conf import settings
 
536
        self.admin_media_prefix = settings.ADMIN_MEDIA_PREFIX
537
537
        BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
538
538
 
539
539
    def get_environ(self):