Django

Code

Changeset 6526

Show
Ignore:
Timestamp:
10/18/07 15:06:31 (11 months ago)
Author:
jacob
Message:

[django-website] checked in changes to django website since, um, last time.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • djangoproject.com/django_website/apps/docs/views.py

    r6060 r6526  
    6666            try: 
    6767                title, blurb = docstring_re.match(content).group(2).strip().split('\n', 1) 
    68             except AttributeError
     68            except (AttributeError, ValueError)
    6969                continue # Skip models that don't have docstrings. 
    7070 
  • djangoproject.com/django_website/settings.py

    r6472 r6526  
    22 
    33# Far too clever trick to know if we're running on the deployment server. 
    4 DEVELOPMENT_MODE = ("servers.ljworld.com" not in platform.node()
     4DEVELOPMENT_MODE = (platform.node() != "djangoproject"
    55 
    66ADMINS = (('Adrian Holovaty','holovaty@gmail.com'), ('Jacob Kaplan-Moss', 'jacob@lawrence.com')) 
     
    1010MANAGERS = (('Wilson Miner','wminer@ljworld.com'),) 
    1111 
     12DATABASE_ENGINE = 'postgresql_psycopg2' 
     13DATABASE_NAME = 'djangoproject' 
     14TEMPLATE_DIRS = [os.path.join(os.path.dirname(__file__), "templates")] 
     15 
    1216if DEVELOPMENT_MODE: 
    1317    DEBUG = True 
    1418    PREPEND_WWW = False 
    15     DATABASE_ENGINE = 'postgresql_psycopg2' 
    16     DATABASE_NAME = 'djangoproject' 
    1719    CACHE_BACKEND = "file:///tmp/djangoprojectcache/" 
    18     TEMPLATE_DIRS = [os.path.join(os.path.dirname(__file__), "templates")] 
    1920    DJANGO_SVN_ROOT = "http://code.djangoproject.com/svn/django/" 
    2021else: 
    2122    DEBUG = False 
    2223    PREPEND_WWW = True 
    23     DATABASE_ENGINE = 'postgresql' 
    24     DATABASE_NAME = 'djangoproject' 
    2524    DATABASE_USER = 'apache' 
    26     DATABASE_PASSWORD = '' 
    27     DATABASE_HOST = '10.0.0.80' # set to empty string for localhost 
    28     DATABASE_PORT = '5433' 
    2925    CACHE_BACKEND = 'memcached://127.0.0.1:11211/' 
    30     TEMPLATE_DIRS = ['/home/html/templates/djangoproject.com/'] 
     26    TEMPLATE_DIRS = ['/home/djangoproject.com/django_website/templates'] 
    3127    DJANGO_SVN_ROOT = "file:///home/svn/django/django/" 
    3228 
     
    5854DJANGO_TESTS_PATH = "/home/html/djangoproject.com/tests/" 
    5955 
    60 CACHE_MIDDLEWARE_SECONDS = 60 * 60 * 1 # 1 hour 
     56CACHE_MIDDLEWARE_SECONDS = 60 * 5 # 5 minutes 
    6157CACHE_MIDDLEWARE_KEY_PREFIX = 'djangoproject' 
    6258CACHE_MIDDLEWARE_GZIP = True 
     59CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True 
    6360 
    6461MIDDLEWARE_CLASSES = ( 
     62    'django.middleware.http.SetRemoteAddrFromForwardedFor', 
    6563    'django.contrib.sessions.middleware.SessionMiddleware', 
    6664    'django.contrib.auth.middleware.AuthenticationMiddleware', 
    6765    'django.middleware.common.CommonMiddleware', 
     66    'django.middleware.cache.CacheMiddleware', 
    6867    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', 
    6968    'django.contrib.redirects.middleware.RedirectFallbackMiddleware', 
     
    7574USE_I18N = False 
    7675 
     76DEFAULT_FROM_EMAIL = "noreply@djangoproject.com" 
     77 
    7778# django-registration settings 
    7879ACCOUNT_ACTIVATION_DAYS = 3 
  • djangoproject.com/django_website/templates/base.html

    r4783 r6526  
    4747                <!-- END #content --> 
    4848                <div id="footer"> 
    49                         <p>&copy; 2005-{% now "Y" %} <a href="http://www.ljworld.com/">Lawrence Journal-World</a> unless otherwise noted. Django is a registered trademark of Lawrence Journal-World.</p> 
    50                 </div> 
     49                        <p>&copy; 2005-{% now "Y" %} <a href="http://www.ljworld.com/">Lawrence Journal-World</a> unless otherwise noted. Django is a registered trademark of Lawrence Journal-World.  
     50            Hosting graciously provided by <a href="http://mediatemple.net/"> 
     51            <img style="vertical-align: middle; position: relative; top: -1px;" src="http://media.djangoproject.com/img/site/mt.png" alt="media temple"></a> 
     52            </p> 
    5153        </div> 
    5254        <!-- END #container --> 
  • djangoproject.com/django_website/templates/blog/entry_archive.html

    r6472 r6526  
    88 
    99{% for object in latest %} 
    10     {% get_public_free_comment_count for blog.entry object.id as comment_count %} 
    1110    <h2><a href="{{ object.get_absolute_url }}">{{ object.headline }}</a></h2> 
    1211    {{ object.body }} 
    13     <p class="date small">Posted by <strong>{{ object.author }}</strong> on {{ object.pub_date|date:"F j, Y" }} | <a href="{{ object.get_absolute_url }}#comments">{{ comment_count }} comment{{ comment_count|pluralize }}</a></p> 
     12    <p class="date small">Posted by <strong>{{ object.author }}</strong> on {{ object.pub_date|date:"F j, Y" }}</p> 
    1413{% endfor %} 
    1514 
  • djangoproject.com/django_website/templates/blog/entry_detail.html

    r6472 r6526  
    2222{% endfor %} 
    2323 
    24 <h2>Comments are closed</h2> 
    25  
    2624{% if object.comments_enabled %} 
     25<h2>Post a comment</h2> 
    2726{% free_comment_form for blog.entry object.id %} 
    2827{% else %} 
     28<h2>Comments are closed</h2> 
    2929<p>To prevent spam, comments are no longer allowed after sixty days.</p> 
    3030{% endif %} 
  • djangoproject.com/django_website/templates/comments/freecomment_list.html

    r6060 r6526  
    3030      </span> 
    3131    </a> 
    32     {% if perms.comments.delete_freecomment %} 
     32    {% if perms.comments %} 
    3333      <form style="display: inline" action="/admin/comments/freecomment/{{ comment.id }}/delete/" method="post"> 
    3434        <input type="hidden" name="post" value="yes" /> 
  • djangoproject.com/django_website/templates/docs/0.96_index.html

    r6060 r6526  
    77{% ifequal version "trunk" %} 
    88  These docs are for Django's SVN release, which can be 
    9   significantly different than previous releases. Get old docs here:  
     9  significantly different from previous releases. Get old docs here:  
    1010  {% for r in all_versions %} 
    1111    <a href="{{ r.version }}/">{{ r.version }}</a>{% if forloop.last %}.{% else %},{% endif %} 
  • djangoproject.com/django_website/templates/docs/detail.html

    r6060 r6526  
    99{% ifequal version "trunk" %} 
    1010  This document is for Django's SVN release, which can be 
    11   significantly different than previous releases. Get old docs here:  
     11  significantly different from previous releases. Get old docs here:  
    1212  {% for r in all_versions %} 
    1313    <a href="../{{ r.version }}/{{ slug }}/">{{ r.version }}</a>{% if forloop.last %}.{% else %},{% endif %} 
  • djangoproject.com/django_website/templates/docs/index.html

    r6060 r6526  
    77{% ifequal version "trunk" %} 
    88  These docs are for Django's SVN release, which can be 
    9   significantly different than previous releases. Get old docs here:  
     9  significantly different from previous releases. Get old docs here:  
    1010  {% for r in all_versions %} 
    1111    <a href="{{ r.version }}/">{{ r.version }}</a>{% if forloop.last %}.{% else %},{% endif %} 
     
    6666    <li><a href="syndication_feeds/">Syndication feeds (RSS and Atom)</a> (<code>django.contrib.syndication</code>)</li> 
    6767    <li><a href="flatpages/">Flatpages</a> (<code>django.contrib.flatpages</code>)</li> 
     68    <li><strong>New:</strong> <a href="form_preview/">Form preview</a></li> 
    6869    <li><a href="redirects/">Redirects</a> (<code>django.contrib.redirects</code>)</li> 
    6970    <li><a href="sites/">Sites</a> (<code>django.contrib.sites</code>)</li> 
  • djangoproject.com/django_website/templates/docs/model_detail.html

    r4795 r6526  
    99{% ifequal version "trunk" %} 
    1010  This example is for Django's SVN release, which can be 
    11   significantly different than previous releases. Get old examples here:  
     11  significantly different from previous releases. Get old examples here:  
    1212  {% for r in all_versions %} 
    1313    <a href="/documentation/{{ r.version }}/models/{{ slug }}/">{{ r.version }}</a>{% if forloop.last %}.{% else %},{% endif %} 
  • djangoproject.com/django_website/templates/docs/model_index.html

    r6060 r6526  
    77  {% ifequal version "trunk" %} 
    88    These examples are from Django's SVN release, which can be 
    9     significantly different than previous releases. Get old examples here:  
     9    significantly different from previous releases. Get old examples here:  
    1010    {% for r in all_versions %} 
    1111      <a href="../{{ r.version }}/models/">{{ r.version }}</a>{% if forloop.last %}.{% else %},{% endif %} 
  • djangoproject.com/django_website/templates/flatfiles/homepage.html

    r6472 r6526  
    7575 
    7676{% for latest_entry in latest_entries %} 
    77     {% get_public_free_comment_count for blog.entry latest_entry.id as comment_count %} 
    7877    <h3><a href="{{ latest_entry.get_absolute_url }}">{{ latest_entry.headline }}</a></h3> 
    7978    <p class="date">by <strong>{{ latest_entry.author }}</strong> on {{ latest_entry.pub_date|date:"M. j, Y" }}</p>