Django

Code

Changeset 3662

Show
Ignore:
Timestamp:
08/27/06 11:20:02 (2 years ago)
Author:
jpellerin
Message:

[multi-db] Merge trunk to [3657].

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/multiple-db-support/django/contrib/admin/templatetags/admin_modify.py

    r3427 r3662  
    196196    if f.rel and isinstance(f.rel, models.ManyToManyRel) and f.rel.filter_interface: 
    197197        return '<script type="text/javascript">addEvent(window, "load", function(e) {' \ 
    198               ' SelectFilter.init("id_%s", "%s", %s, "%s"); });</script>\n' % ( 
     198              ' SelectFilter.init("id_%s", %r, %s, "%s"); });</script>\n' % ( 
    199199              f.name, f.verbose_name, f.rel.filter_interface-1, settings.ADMIN_MEDIA_PREFIX) 
    200200    else: 
  • django/branches/multiple-db-support/django/contrib/flatpages/views.py

    r3427 r3662  
    44from django.http import HttpResponse 
    55from django.conf import settings 
     6from django.core.xheaders import populate_xheaders 
    67 
    78DEFAULT_TEMPLATE = 'flatpages/default.html' 
     
    3334        'flatpage': f, 
    3435    }) 
    35     return HttpResponse(t.render(c)) 
     36    response = HttpResponse(t.render(c)) 
     37    populate_xheaders(request, response, FlatPage, f.id) 
     38    return response 
  • django/branches/multiple-db-support/docs/faq.txt

    r3621 r3662  
    1717perfectionists when it comes to following best practices of Web development. 
    1818 
    19 Thus, Django was designed not only to allow fast Web development, but 
    20 *best-practice* Web development. 
    21  
    22 Django would not be possible without a whole host of open-source projects -- 
    23 `Apache`_, `Python`_, and `PostgreSQL`_ to name a few -- and we're thrilled to 
    24 be able to give something back to the open-source community. 
     19In fall 2003, the World Online developers (Adrian Holovaty and Simon Willison) 
     20ditched PHP and began using Python to develop its Web sites. As they built 
     21intensive, richly interactive sites such as Lawrence.com, they began to extract 
     22a generic Web development framework that let them build Web applications more 
     23and more quickly. They tweaked this framework constantly, adding improvements 
     24over two years. 
     25 
     26In summer 2005, World Online decided to open-source the resulting software, 
     27Django. Django would not be possible without a whole host of open-source 
     28projects -- `Apache`_, `Python`_, and `PostgreSQL`_ to name a few -- and we're 
     29thrilled to be able to give something back to the open-source community. 
    2530 
    2631.. _Apache: http://httpd.apache.org/ 
     
    4348----------------- 
    4449 
    45 Yes. World Online has been using Django for more than two years. Sites built on 
    46 Django have weathered traffic spikes of over one million hits an hour and a 
     50Yes. World Online has been using Django for more than three years. Sites built 
     51on Django have weathered traffic spikes of over one million hits an hour and a 
    4752number of Slashdottings. Yes, it's quite stable. 
    4853 
     
    631636================= 
    632637 
     638How can I get started contributing code to Django? 
     639-------------------------------------------------- 
     640 
     641Thanks for asking! We've written an entire document devoted to this question. 
     642It's titled `Contributing to Django`_. 
     643 
     644.. _Contributing do Django: http://www.djangoproject.com/documentation/contributing/ 
     645 
    633646I submitted a bug fix in the ticket system several weeks ago. Why are you ignoring my patch? 
    634647-------------------------------------------------------------------------------------------- 
  • django/branches/multiple-db-support/docs/model-api.txt

    r3621 r3662  
    12231223 
    12241224    * ``ManyToManyField`` fields aren't supported, because that would entail 
    1225         executing a separate SQL statement for each row in the table. 
    1226  
    1227     * If the field is a ``BooleanField``, Django will display a pretty "on" or 
    1228       "off" icon instead of ``True`` or ``False``. 
     1225      executing a separate SQL statement for each row in the table. If you 
     1226      want to do this nonetheless, give your model a custom method, and add 
     1227      that method's name to ``list_display``. (See below for more on custom 
     1228      methods in ``list_display``.) 
     1229 
     1230    * If the field is a ``BooleanField`` or ``NullBooleanField``, Django will 
     1231      display a pretty "on" or "off" icon instead of ``True`` or ``False``. 
    12291232 
    12301233    * If the string given is a method of the model, Django will call it and 
     
    12621265                  return '<span style="color: #%s;">%s %s</span>' % (self.color_code, self.first_name, self.last_name) 
    12631266              colored_name.allow_tags = True 
     1267 
     1268    * The ``__str__()`` method is just as valid in ``list_display`` as any 
     1269      other model method, so it's perfectly OK to do this:: 
     1270 
     1271          list_display = ('__str__', 'some_other_field') 
     1272 
     1273    * For any element of ``list_display`` that is not a field on the model, the 
     1274      change list page will not allow ordering by that column. This is because 
     1275      ordering is done at the database level, and Django has no way of knowing 
     1276      how to order the result of a custom method at the SQL level. 
    12641277 
    12651278``list_display_links`` 
  • django/branches/multiple-db-support/docs/overview.txt

    r2871 r3662  
    160160code. 
    161161 
    162 Here's what a URLconf might look like for the above ``Reporter``/``Article`` 
     162Here's what a URLconf might look like for the ``Reporter``/``Article`` 
    163163example above:: 
    164164