diff --git a/examples/__init__.py b/examples/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/examples/hello/__init__.py b/examples/hello/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/examples/hello/urls.py b/examples/hello/urls.py deleted file mode 100644 index e57c2b8e8c..0000000000 --- a/examples/hello/urls.py +++ /dev/null @@ -1,10 +0,0 @@ -from django.conf.urls.defaults import * - -urlpatterns = patterns('examples.hello.views', - (r'^html/$', 'hello_html'), - (r'^text/$', 'hello_text'), - (r'^write/$', 'hello_write'), - (r'^metadata/$', 'metadata'), - (r'^getdata/$', 'get_data'), - (r'^postdata/$', 'post_data'), -) diff --git a/examples/hello/views.py b/examples/hello/views.py deleted file mode 100644 index 07f955a38d..0000000000 --- a/examples/hello/views.py +++ /dev/null @@ -1,55 +0,0 @@ -from django.http import HttpResponse -from django.utils.html import escape - -def hello_html(request): - "This view is a basic 'hello world' example in HTML." - return HttpResponse('

Hello, world.

') - -def hello_text(request): - "This view is a basic 'hello world' example in plain text." - return HttpResponse('Hello, world.', mimetype='text/plain') - -def hello_write(request): - "This view demonstrates how an HttpResponse object has a write() method." - r = HttpResponse() - r.write("

Here's a paragraph.

") - r.write("

Here's another paragraph.

") - return r - -def metadata(request): - "This view demonstrates how to retrieve request metadata, such as HTTP headers." - r = HttpResponse('

All about you

') - r.write("

Here's all known metadata about your request, according to request.META:

") - r.write('') - meta_items = request.META.items() - meta_items.sort() - for k, v in meta_items: - r.write('' % (k, v)) - r.write('
%s%r
') - return r - -def get_data(request): - "This view demonstrates how to retrieve GET data." - r = HttpResponse() - if request.GET: - r.write('

GET data found! Here it is:

') - r.write('' % ''.join(['
  • %s: %r
  • ' % (escape(k), escape(v)) for k, v in request.GET.items()])) - r.write('
    ') - r.write('

    First name:

    ') - r.write('

    Last name:

    ') - r.write('

    ') - r.write('
    ') - return r - -def post_data(request): - "This view demonstrates how to retrieve POST data." - r = HttpResponse() - if request.POST: - r.write('

    POST data found! Here it is:

    ') - r.write('' % ''.join(['
  • %s: %r
  • ' % (escape(k), escape(v)) for k, v in request.POST.items()])) - r.write('
    ') - r.write('

    First name:

    ') - r.write('

    Last name:

    ') - r.write('

    ') - r.write('
    ') - return r diff --git a/examples/manage.py b/examples/manage.py deleted file mode 100644 index 008aeeb72b..0000000000 --- a/examples/manage.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python -from django.core.management import execute_manager -try: - import settings # Assumed to be in the same directory. -except ImportError: - import sys - sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__) - sys.exit(1) - -if __name__ == "__main__": - execute_manager(settings) diff --git a/examples/settings.py b/examples/settings.py deleted file mode 100644 index aa54a34386..0000000000 --- a/examples/settings.py +++ /dev/null @@ -1,5 +0,0 @@ -# Django settings for the example project. - -DEBUG = True -TEMPLATE_DEBUG = DEBUG -ROOT_URLCONF = 'examples.urls' diff --git a/examples/urls.py b/examples/urls.py deleted file mode 100644 index 69b465f65d..0000000000 --- a/examples/urls.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.conf.urls.defaults import * - -urlpatterns = patterns('', - (r'^$', 'examples.views.index'), - (r'^hello/', include('examples.hello.urls')), -) diff --git a/examples/views.py b/examples/views.py deleted file mode 100644 index 902bfda0f8..0000000000 --- a/examples/views.py +++ /dev/null @@ -1,12 +0,0 @@ -from django import http - -def index(request): - r = http.HttpResponse('

    Django examples

    ') - return r