1
0
mirror of https://github.com/django/django.git synced 2025-07-05 02:09:13 +00:00

667 Commits

Author SHA1 Message Date
Robert Wittams
a122c04d47 Merged to r863. Fixes to template error reporting and som cleanup of field binding
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@864 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-14 15:25:09 +00:00
Robert Wittams
d41ffe4ee4 Merged to r852.
Cleaned up some templates. 
Efficiency fix in field_widget tag.




git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@854 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-13 18:28:44 +00:00
Robert Wittams
0f338b8c2e merged to 818
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-10 13:21:30 +00:00
Robert Wittams
b335fab55e Small fixes: context for add_stage was wrong, and labels for booleans.
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-10 13:12:53 +00:00
Robert Wittams
f114e652e3 clean up token parsing for error stuff and removed debug statements.
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@817 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-09 14:40:10 +00:00
Robert Wittams
0442a5440a Merged to r802
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-08 14:37:05 +00:00
Robert Wittams
5923c63c8d Fixed token parsing bug in the error stuff.
Reorganisation and rationalisation of helper objects for admin templates. 


git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@802 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-08 14:28:21 +00:00
Robert Wittams
6e90c35b63 Remove 'intentional' error for error message testing ;-)
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@797 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-07 01:20:28 +00:00
Robert Wittams
c7d7e4cb78 Template fixes for inline tabular to let errors show up properly
Typo fix for extends tag doc

Hugely improved messages for template syntax errors. 
Tokens and nodes are tagged with file and line numbers.
These are used in error messages. 

Example: 

TemplateSyntaxError: Unclosed tag 'if' starting at /usr/lib/python2.4/site-packages/django/conf/admin_templates/admin_submit_line.html, line 6. Looking for one of: else, endif 




git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@796 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-07 01:13:32 +00:00
Robert Wittams
f9e1deb8b3 Merged to r789
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@791 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-06 14:49:22 +00:00
Robert Wittams
0b8ce51ce6 small change to undo javascript testing modification
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@783 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-06 00:06:47 +00:00
Robert Wittams
e3f3d4e86f Merged to r778. Added template tag decorators:
* simple_tag : transforms a function outputting a string into a tag. 
                arguments are converted into tag arguments, and defaults are 
                supported. 
 * inclusion_tag : transforms a function outputting a dictionary into a tag 
                which renders an included template. The name of the template is
                given as an argument to the decorator, and the dictionary 
                returnd by the function is used to populate the context 
                to render the included template. The template is loaded at
                compile time, and the nodelist cached. 

Also made the {%include %} tag load the template at compile time if the argument is a constant string.  


git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@780 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-05 21:41:41 +00:00
Robert Wittams
555502e208 Added templates for 'funny' widgets here: django/conf/admin_templates/widget
Added a follow argument to manipulators. This allows you to exclude/include fields and related objects ( recursively), defaulting to current behaviour, meaning that forms can modify a subset of fields. This should fix #445. Fixed update generic view to use this (will change others soon).  Merged to trunk r772. 



git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-04 16:35:39 +00:00
Robert Wittams
1c9cf48651 Undo bad fix for #684
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@766 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-02 18:08:01 +00:00
Robert Wittams
cfe2e95529 Merge to r764. Fix 684, also allow overloading indivual fields templates in the admin.
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@765 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-02 17:55:03 +00:00
Robert Wittams
3afc81d44e merged r741:748 into new-admin
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@749 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-30 17:26:00 +00:00
Robert Wittams
e6c080db2b Possible fix for #499. Also gets error handling working properly in the admin without changing field names.
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@748 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-30 17:17:50 +00:00
Robert Wittams
eb07d93938 Merged trunk changes, and converted submit lines to use a template
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@741 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-30 13:39:24 +00:00
Robert Wittams
d0ba57ee90 Initial checkin of new admin branch. Ticket #535. I've tried to cover the changes below, but may have forgotten some.
M      django/conf/urls/admin.py
Modified to allow running the old and new code in parallel. Simply add _old on the end of a change or add form to check against the behaviour of the old admin. 
eg http://myadmin/auth/users/1/ -> http://myadmin/auth/users/1_old/

A      django/conf/admin_templates/admin_change_form.html
A      django/conf/admin_templates/admin_edit_inline_stacked.html
A      django/conf/admin_templates/admin_field.html
A      django/conf/admin_templates/admin_field_widget.html
A      django/conf/admin_templates/admin_edit_inline_tabular.html

These are templates extracted from the admin code that are now used to render the views. 


M      django/conf/admin_media/js/urlify.js

Change to dashes rather than underscores in slug fields. 

M      django/core/formfields.py

All of the data conversion from POST to something fields can understand now takes place here. 

M      django/core/meta/__init__.py

Added InlineRelatedObject and added manipulator methods for data flattening. 
Also includes a fix to ordering descending select='' fields. 

M      django/core/meta/fields.py

Data flattening pushed down into fields. 

M      django/core/defaulttags.py

Added "include" tag, which is like ssi parsed, but uses normal template resolution rather than absolute paths. 

M      django/core/validators.py

Allow dashes in slugfields. 

A      django/templatetags/admin_modify.py

A new set of template tags to provide functionality for the admin. 

M      django/views/admin/main.py

New view functions for add and change. New helper objects for the admin templates to access ( BoundField, AdminFieldSet)

M      tests/runtests.py

Show the details of an error rather than assuming the existance of a database.


git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@740 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-30 12:16:43 +00:00
Jacob Kaplan-Moss
404147c385 Added new-admin branch.
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-29 15:28:48 +00:00
Adrian Holovaty
277cc05462 Changed django.core.template_file to use absolute import for 'template' module
git-svn-id: http://code.djangoproject.com/svn/django/trunk@721 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-29 15:06:53 +00:00
Jacob Kaplan-Moss
2aadb6ef8c Nonsense change to README to test svn auth setup
git-svn-id: http://code.djangoproject.com/svn/django/trunk@720 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-29 15:04:02 +00:00
Adrian Holovaty
38649f4c3f Fixed #537 -- Fixed typo in [718]. Thanks, Esaj
git-svn-id: http://code.djangoproject.com/svn/django/trunk@719 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-29 14:59:49 +00:00
Jacob Kaplan-Moss
22f27949bd Fixed #537; thanks, fonso
git-svn-id: http://code.djangoproject.com/svn/django/trunk@718 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-29 13:29:12 +00:00
Jacob Kaplan-Moss
152d437305 Fixed #546 - render_to_string and render_to_response may now take lists of templates and use select_template instead of get_template. Thanks, hugo
git-svn-id: http://code.djangoproject.com/svn/django/trunk@717 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-29 13:26:49 +00:00
Jacob Kaplan-Moss
808b3f4b91 Fixed #106 - "Add another" now correctly works in IE - thanks, Paolo
git-svn-id: http://code.djangoproject.com/svn/django/trunk@716 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-29 13:02:34 +00:00
Adrian Holovaty
8a7189f38f Fixed #501 -- Fixed block.super in multi-level templates, and added unit tests to confirm. Thanks for the patch, django@kieranholland.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-29 04:22:09 +00:00
Adrian Holovaty
26021249a4 Fixed #573 -- Added 'Add another' link to many-to-many fields in admin. Thanks, hp@syntomax.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-29 03:19:14 +00:00
Adrian Holovaty
c1a16d54b0 Fixed #553 -- Added django.core.meta.fields.Field.get_internal_type() hook, for creating custom meta.Field subclasses. Thanks, wojtek3
git-svn-id: http://code.djangoproject.com/svn/django/trunk@713 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-28 23:08:47 +00:00
Jacob Kaplan-Moss
cd34c163cc Moved JING from django.core.validators into settings where it belongs. Fixes #568.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-27 16:34:10 +00:00
Adrian Holovaty
8b67f5f829 Fixed #567 -- Added HttpRequest.has_key() method. Thanks, wojtek3@brandlay.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@711 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-27 16:33:25 +00:00
Jacob Kaplan-Moss
2d1303bd68 Added EMAIL_SUBJECT_PREFIX setting so you can customize the "[Django]" prefix
on emails send with mail_admins/mail_managers.  Refs #568.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@710 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-27 16:32:21 +00:00
Adrian Holovaty
cac99144fd Fixed #544 -- Added xmlns and lang attributes to <html> tag in admin_templates/base.html, so that the admin works when served as application/xhtml+xml. Thanks, Sune Kirkeby
git-svn-id: http://code.djangoproject.com/svn/django/trunk@706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-27 04:28:18 +00:00
Adrian Holovaty
787ff70e9d Fixed #563 -- Fixed minor typo in docs/cache.txt. Thanks, Eugene
git-svn-id: http://code.djangoproject.com/svn/django/trunk@705 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-27 04:25:08 +00:00
Adrian Holovaty
c084005d58 Fixed #131 -- URLconfs that are 'included' now receive captured parameters from parent URLconfs. Thanks for the idea, jcernelli@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@704 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-27 04:24:19 +00:00
Adrian Holovaty
7f4067100c Fixed #150 -- Clarified DATABASE_NAME description in docs/tutorial01.txt for SQLite. Thanks, lstep@adelux.fr
git-svn-id: http://code.djangoproject.com/svn/django/trunk@703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-27 03:38:15 +00:00
Adrian Holovaty
d86624877d Fixed #213 -- Improved formfields.TimeField.html2python() so that it doesn't fail for None input
git-svn-id: http://code.djangoproject.com/svn/django/trunk@702 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-27 03:34:58 +00:00
Jacob Kaplan-Moss
9b72153139 Quick bug fix to [699] - fixes #515.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-26 16:30:14 +00:00
Jacob Kaplan-Moss
2a072999ca Fixed type in static view URL pattern example (refs #428)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@700 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-26 13:38:49 +00:00
Jacob Kaplan-Moss
adce221d92 Added exception handlers to take care of the bugs with the file and db backends
(refs #515).  Eugene, I'm going to leave #515 open; can you check the bug fixes
in this revision and mark the ticket as closed if you're satisfied?  I don't 
run Django in a threaded environment, so I'm having issues reproducing your 
errors.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-26 12:38:41 +00:00
Adrian Holovaty
c44fd057fa Subclassed models now use their own class name (or explicitly defined verbose_name) as the verbose_name, not the parent's verbose_name. See also #558 and [697].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@698 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-26 05:12:22 +00:00
Adrian Holovaty
60bb739d9e Fixed #558 -- Subclassed models now use their own class name (or explicitly defined module_name) as the module_name, not the parent's module_name
git-svn-id: http://code.djangoproject.com/svn/django/trunk@697 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-26 05:03:40 +00:00
Adrian Holovaty
fa8662a13f Added unit test to confirm #558
git-svn-id: http://code.djangoproject.com/svn/django/trunk@696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-26 05:00:29 +00:00
Jacob Kaplan-Moss
871ffbe7ee Fixed #515 (again) - renamed "key" field in SQL cache to "cache_key" because
MySQL reserves "key".


git-svn-id: http://code.djangoproject.com/svn/django/trunk@695 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-26 03:14:37 +00:00
Adrian Holovaty
a978dbe779 Fixed #489 -- Changed MySQL backend to use longtext for XMLField
git-svn-id: http://code.djangoproject.com/svn/django/trunk@694 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-26 02:36:53 +00:00
Adrian Holovaty
9b68dbf95e Fixed #469 -- Admin changelist no longer assumes ForeignKey has 'ordering' set when ordering by a ForeignKey field
git-svn-id: http://code.djangoproject.com/svn/django/trunk@693 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-25 22:27:23 +00:00
Jacob Kaplan-Moss
0fa1aa8711 Added a database-backed cache backend, along with a tool in django-admin to
create the necessary table structure.  This closes #515; thanks again, 
Eugene!


git-svn-id: http://code.djangoproject.com/svn/django/trunk@692 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-25 22:03:30 +00:00
Adrian Holovaty
6b4095ad10 Fixed small typo in docs/db-api.txt. Thanks, Rachel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@691 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-25 21:57:32 +00:00
Adrian Holovaty
f053130f67 Fixed ReST bugs in [689]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-25 21:54:51 +00:00
Adrian Holovaty
9e03747ebb Fixed ReST bugs in [688]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@689 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-25 21:53:06 +00:00