Changeset 3662
- Timestamp:
- 08/27/06 11:20:02 (2 years ago)
- Files:
-
- django/branches/multiple-db-support/django/contrib/admin/templatetags/admin_modify.py (modified) (1 diff)
- django/branches/multiple-db-support/django/contrib/flatpages/views.py (modified) (2 diffs)
- django/branches/multiple-db-support/docs/faq.txt (modified) (3 diffs)
- django/branches/multiple-db-support/docs/model-api.txt (modified) (2 diffs)
- django/branches/multiple-db-support/docs/overview.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/multiple-db-support/django/contrib/admin/templatetags/admin_modify.py
r3427 r3662 196 196 if f.rel and isinstance(f.rel, models.ManyToManyRel) and f.rel.filter_interface: 197 197 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' % ( 199 199 f.name, f.verbose_name, f.rel.filter_interface-1, settings.ADMIN_MEDIA_PREFIX) 200 200 else: django/branches/multiple-db-support/django/contrib/flatpages/views.py
r3427 r3662 4 4 from django.http import HttpResponse 5 5 from django.conf import settings 6 from django.core.xheaders import populate_xheaders 6 7 7 8 DEFAULT_TEMPLATE = 'flatpages/default.html' … … 33 34 'flatpage': f, 34 35 }) 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 17 17 perfectionists when it comes to following best practices of Web development. 18 18 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. 19 In fall 2003, the World Online developers (Adrian Holovaty and Simon Willison) 20 ditched PHP and began using Python to develop its Web sites. As they built 21 intensive, richly interactive sites such as Lawrence.com, they began to extract 22 a generic Web development framework that let them build Web applications more 23 and more quickly. They tweaked this framework constantly, adding improvements 24 over two years. 25 26 In summer 2005, World Online decided to open-source the resulting software, 27 Django. Django would not be possible without a whole host of open-source 28 projects -- `Apache`_, `Python`_, and `PostgreSQL`_ to name a few -- and we're 29 thrilled to be able to give something back to the open-source community. 25 30 26 31 .. _Apache: http://httpd.apache.org/ … … 43 48 ----------------- 44 49 45 Yes. World Online has been using Django for more than t wo years. Sites built on46 Django have weathered traffic spikes of over one million hits an hour and a50 Yes. World Online has been using Django for more than three years. Sites built 51 on Django have weathered traffic spikes of over one million hits an hour and a 47 52 number of Slashdottings. Yes, it's quite stable. 48 53 … … 631 636 ================= 632 637 638 How can I get started contributing code to Django? 639 -------------------------------------------------- 640 641 Thanks for asking! We've written an entire document devoted to this question. 642 It's titled `Contributing to Django`_. 643 644 .. _Contributing do Django: http://www.djangoproject.com/documentation/contributing/ 645 633 646 I submitted a bug fix in the ticket system several weeks ago. Why are you ignoring my patch? 634 647 -------------------------------------------------------------------------------------------- django/branches/multiple-db-support/docs/model-api.txt
r3621 r3662 1223 1223 1224 1224 * ``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``. 1229 1232 1230 1233 * If the string given is a method of the model, Django will call it and … … 1262 1265 return '<span style="color: #%s;">%s %s</span>' % (self.color_code, self.first_name, self.last_name) 1263 1266 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. 1264 1277 1265 1278 ``list_display_links`` django/branches/multiple-db-support/docs/overview.txt
r2871 r3662 160 160 code. 161 161 162 Here's what a URLconf might look like for the above``Reporter``/``Article``162 Here's what a URLconf might look like for the ``Reporter``/``Article`` 163 163 example above:: 164 164
