1
0
mirror of https://github.com/django/django.git synced 2025-10-13 16:59:35 +00:00

15 Commits

Author SHA1 Message Date
Adrian Holovaty
ab45bbbb02 new-admin: Changed runtests.py not to display full exception if test database can't be created
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@1391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-24 03:41:49 +00:00
Robert Wittams
c40fd89b1a Changed how edit_inline works in the admin. Now it is done by a subclass of BoundRelatedObject.
This means anyone using edit_inline="path/to/template" will need to subclass this ( or 
TabularBoundRelatedObject or StackedBoundRelatedObject). The functionality may be restored if 
it becomes obvious exactly what information should be available to these templates; before it 
was kind of random. 

So you can do 
class MyBoundRelatedObject(TabularBoundRelatedObject):
	def template_name(self):
	    return "path/to/template"

and then edit_inline=MyBoundRelatedObject to duplicate the previous functionality. 



git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@986 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-20 23:27:27 +00:00
Robert Wittams
bd47a97997 Rationalised related object methods
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@982 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-20 19:07:15 +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
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
Adrian Holovaty
09bd9d3ef6 Fixed #506 -- runtests.py now allows models to be tested individually. Thanks, Simon
git-svn-id: http://code.djangoproject.com/svn/django/trunk@646 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-19 01:18:04 +00:00
Jacob Kaplan-Moss
f65350b197 Doctest now uses the ELLIPSIS option, which allows the one_to_one test to pass under sqlite. This fixes #238.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@466 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-10 18:10:38 +00:00
Jacob Kaplan-Moss
3a1ae2164b Added a custom doctest OutputChecker that ignores differences between ints and longs in values returned from the database; refs #238
git-svn-id: http://code.djangoproject.com/svn/django/trunk@465 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-10 18:00:52 +00:00
Adrian Holovaty
151bf05850 Fixed #297 -- Added a '--settings' option to runtests.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@463 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-10 15:36:16 +00:00
Adrian Holovaty
fd579f24d7 Improved unit-test framework so that it handles database errors more elegantly
git-svn-id: http://code.djangoproject.com/svn/django/trunk@446 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-09 23:51:55 +00:00
Jacob Kaplan-Moss
440a2a97e9 Added framework for writing non-model-based tests, and added tests for cache and templates
from the old django/tests location (which has been removed).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@367 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-01 19:09:07 +00:00
Adrian Holovaty
5002b44f28 Added tests.builddocs, which builds HTML documentation by introspecting the model unit tests
git-svn-id: http://code.djangoproject.com/svn/django/trunk@348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 22:35:54 +00:00
Adrian Holovaty
a47794c824 Changed model test framework to use meta.get_app() instead of a manual import
git-svn-id: http://code.djangoproject.com/svn/django/trunk@342 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 20:25:02 +00:00
Jacob Kaplan-Moss
f6e75ab3cf Added support for sqlite backend to test framework
git-svn-id: http://code.djangoproject.com/svn/django/trunk@341 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 19:22:50 +00:00
Adrian Holovaty
daf8467b37 Added first stab at model and DB-API unit tests
git-svn-id: http://code.djangoproject.com/svn/django/trunk@336 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 15:15:40 +00:00