277 rows where "changetime" is on date 2006-10-07

View and edit SQL

Suggested facets: component, type, severity, version, resolution, owner, has_patch, created (date), last_pulled_from_trac (date)

changetime (date)

  • 2006-10-07 · 277
id ▼ created changetime last_pulled_from_trac stage status component type severity version resolution summary description owner reporter keywords easy has_patch needs_better_patch needs_tests needs_docs ui_ux
6 2005-07-13 19:13:41 2006-10-07 21:25:13 2019-06-24 00:15:20.130105 Unreviewed closed Metasystem defect minor   fixed Remove has_related_links option from models The current (undocumented) {{{has_related_links}}} code is too Ellington-specific and doesn't belong in Django. Let's remove it. We'll have to come up with a more generic way of associating content_type_id/object_id relationships, such as related links, to a model. adrian adrian   0 0 0 0 0 0
46 2005-07-17 15:44:25 2006-10-07 22:22:38 2019-06-24 00:15:46.195969 Unreviewed closed contrib.admin defect normal   fixed Refactor DATE_TRUNC() and EXTRACT() database code for MySQL It's a Windows XP SP 2, Apache 2.0.54, Python 2.41, Mod_python 3.14, MySQL 4 setup. You can reproduce the bug in several cases. One of them is to click the filters in the Users page. Also ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''month' FROM polls_polls.pub_date) = '7' AND polls_polls.pub_date BETWEEN '2005-' at line 1") Another example would be using date_hierarchy = 'pub_date', to get ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('year', polls_polls.pub_date) FROM polls_polls GROUP BY 1 ORDER BY 1 ASC' at line 1") adrian Umair   0 0 0 0 0 0
111 2005-07-20 14:38:19 2006-10-07 16:23:30 2019-06-24 00:16:27.508998 Unreviewed closed contrib.admin defect normal   duplicate Filtering doesn't clean up arguments When selecting different filters (DateTimeField-based, in this case), in order: * Today: ?datetime__day=20&datetime__month=7&datetime__year=2005 * Then, past 7 days: ?datetime__day=20&datetime__gte=2005-07-13&datetime__month=7&datetime__lte=2005-07-20%2023:59:59&datetime__year=2005 It seems any new arguments should clean up arguments that concern the same field. adrian Manuzhai   0 0 0 0 0 0
113 2005-07-20 16:00:52 2006-10-07 21:45:17 2019-06-24 00:16:28.760339 Unreviewed closed Core (Other) defect normal   fixed auto-reload broken in standalone WSGI server Auto reload is broken in the new standalone server (http://www.djangoproject.com/weblog/2005/jul/18/local_server/)... Let's bring auto reload back. The code for this borrow's from Peter Hunt and the CherryPy project (www.cherrypy.org), which in turn borrows from Ian Bicking's Paste (http://pythonpaste.org/) We'll need to check on Paste and CherryPy's licenses to make sure this is all kosher. adrian Jason Huggins auto reload 0 0 0 0 0 0
114 2005-07-20 16:25:56 2006-10-07 19:00:07 2019-06-24 00:16:29.381309 Unreviewed closed Core (Other) defect normal   fixed DeprecationWarning when creating a new project (see patch) I decided to start over with the newewst build and received the following when creating a new project: C:\www\webroot>django-admin.py startproject myproject C:\Python24\lib\whrandom.py:38: DeprecationWarning: the whrandom module is deprecated; please use the random module DeprecationWarning) This didn't happen the first couple of times, so I'm guessing that it has to do with the build. I'm running WinXP & Py 2.4.1. adrian sdelatorre@gmail.com   0 0 0 0 0 0
118 2005-07-20 18:47:08 2006-10-07 17:54:45 2019-06-24 00:16:31.905694 Unreviewed closed Core (Other) defect trivial   fixed flatfiles should be called flatpages I keep forgetting that flatfiles live only in the database and start hunting around the filesystem for them (the ones for the Django site that is). Should they be called flatpages instead? adrian Simon Willison   0 0 0 0 0 0
123 2005-07-20 21:39:20 2006-10-07 18:13:53 2019-06-24 00:16:35.054709 Unreviewed closed Documentation defect normal   fixed Typo in the model_api/#field-types Currently the ImageField says this. ImageField Like a FieldField, but validates that the ... I believe this should be Like a FileField, but validates that the ... jacob jay@skabber.com documentation typo 0 0 0 0 0 0
145 2005-07-21 23:38:17 2006-10-07 21:08:21 2019-06-24 00:16:48.779648 Unreviewed closed contrib.admin defect normal   fixed Logout link and user name visible after logging out. After logging out of the admin site, my user name and the "logout" link were still visible in the upper right hand side of the page. Clicking on the logout link again takes you to the login page, which then immediately logs you back out after you login. Note: this happened while using the built-in webserver (WinXP, Py 2.4.1) adrian sdelatorre@gmail.com   0 0 0 0 0 0
165 2005-07-22 18:07:44 2006-10-07 21:16:40 2019-06-24 00:17:01.632283 Unreviewed closed Core (Other) defect normal   wontfix Should mod_python config use PythonOption instead of SetEnv for settings? I'm not sure what does this for performance (probably not bad, though), but it surely ameliorates compatibility with mod_python-2 (and therefore apache-1, a whole suite of webhosts). Why was SetEnv chosen in the first place? adrian Manuzhai   0 0 0 0 0 0
202 2005-07-26 01:13:25 2006-10-07 13:36:04 2019-06-24 00:17:24.905692 Unreviewed closed Metasystem defect normal   fixed Error when uploading image When uploading an image with width and height fields, I get this error: {{{ Traceback (most recent call last): File "C:\Program Files\Python\lib\site-packages\django\core\meta.py", line 1948, in save_file setattr(new_object, self.width_field, getattr(original_object, self.width_field)) AttributeError: 'NoneType' object has no attribute 'image_width' }}} source:django/trunk/django/core/meta.py#311, lines 1941 onwards: {{{ #!python def save_file(self, new_data, new_object, original_object, change, rel): FileField.save_file(self, new_data, new_object, original_object, change, rel) # If the image has height and/or width field(s) and they haven't # changed, set the width and/or height field(s) back to their original # values. if change and (self.width_field or self.height_field): if self.width_field: setattr(new_object, self.width_field, getattr(original_object, self.width_field)) if self.height_field: setattr(new_object, self.height_field, getattr(original_object, self.height_field)) new_object.save() }}} When I upload the image for the first time original_object is None, so getattr(original_object, self.width_field) fails. It probably should not be executed. The comment above the if condition says "if they haven't changed" but the code says "if change". One of them must be wrong. Indeed "if not change" seems to fix it (though I couldn't try what happens when I don't change the image, see #201). ''mod_python on Windows'' adrian Steadicat   0 0 0 0 0 0
206 2005-07-26 10:02:36 2006-10-07 22:44:40 2019-06-24 00:17:27.539368 Unreviewed closed Tools defect normal   fixed Referential integrity violation upon applying output of "django-admin.py sqlclear" after admin update If you create a new app, and create some objects via the admin interface, entries in "auth_admin_log" prevent deletion of the app using django-admin.py sqlclear How to reproduce: 1. Create and install new app; it can be entirely trivial, the example I used is shown below. 1. Add an object in the new app using the admin interface. 1. Attempt to delete the app from the database using django-admin.py sqlclear and piping the output to psql Result: {{{ > django-admin.py sqlclear deletion BEGIN; DELETE FROM content_types WHERE package = 'deletion'; DELETE FROM auth_permissions WHERE package = 'deletion'; DELETE FROM packages WHERE label = 'deletion'; DROP TABLE deletion_dummys; COMMIT; > django-admin.py sqlclear deletion | psql djangos BEGIN ERROR: update or delete on "content_types" violates foreign key constraint "$2" on "auth_admin_log" DETAIL: Key (id)=(21) is still referenced from table "auth_admin_log". ERROR: current transaction is aborted, commands ignored until end of transaction block ERROR: current transaction is aborted, commands ignored until end of transaction block ERROR: current transaction is aborted, commands ignored until end of transaction block COMMIT }}} Here's the model used in the above: {{{ > cat deletion/models/deletion.py from django.core import meta class Dummy(meta.Model): fields = (meta.CharField('dummy', maxlength=200), ) admin = meta.Admin(list_display = ('dummy',),) }}} Two possible fixes spring to mind: 1. Extend sqlclear so it also deletes from auth_admin_log. 1. Remove that foreign key constraint. The first is perhaps preferable, on the basis that if you're deleting an app, you probably don't care about its history? OTOH maybe there's an option 3 which would be better. Anyway... adrian django@gimbo.org.uk django-admin.py sqlclear admin integrity 0 0 0 0 0 0
226 2005-07-29 19:29:45 2006-10-07 18:55:48 2019-06-24 00:17:40.262582 Unreviewed closed Core (Other) enhancement normal   invalid MetaWeblog API Support It would rock if there was a module to support the MetaWeblog API for manipulating objects. It's a relatively simple XML-RPC standard. It would, for example, allow me to use a nice iPhoto plugin to post photos to my site. (Just a good example.) adrian adam@sherman.ca   0 0 0 0 0 0
237 2005-07-30 22:26:01 2006-10-07 12:51:37 2019-06-24 00:17:47.289984 Unreviewed closed contrib.admin defect normal   invalid get_absolute_url doesn't show up right in admin I defined a get_absolute_url in a model to give '/files/something/' urls for objects. The admin shows the "view on site" link, but that link point's to /r/14/1 in my test - the view-on-site link doesn't point to the return value of the get_absolute_url method. adrian hugo <gb@bofh.ms>   0 0 0 0 0 0
246 2005-08-02 04:05:48 2006-10-07 12:39:23 2019-06-24 00:17:52.957139 Unreviewed closed Metasystem defect minor   duplicate Can't do circular ForeignKey relationships between classes Example case: * class Person belongs to a Company: ForeignKey(Company) * class Company designates a contact Person: ForeignKey(Person) However, each class requires the other to be defined first. How does one implement this? adrian matt@culturethree.com model circular foreign key 0 0 0 0 0 0
252 2005-08-02 20:27:31 2006-10-07 21:40:14 2019-06-24 00:17:56.642254 Unreviewed closed *.djangoproject.com defect normal   fixed Update shared hosting FAQ Django now definitely works on Dreamhost, others will follow. The FAQ entry entitled ''Will Django run under shared hosting (like TextDrive or Dreamhost)?'' should be updated to reference DjangoFriendlyWebHosts and the [http://wiki.dreamhost.com/index.php/Django Django on Dreamhost] instructions. anonymous Matt Croydon faq 0 0 0 0 0 0
253 2005-08-02 22:58:28 2006-10-07 13:51:57 2019-06-24 00:17:57.296435 Unreviewed closed contrib.admin defect normal   duplicate Admin add interface is looking for key that doesn't exist I'm extending tutorial and I've stumbled upon strange behaviour. I added 2 new classes: 'Answer' and 'Exercise'. When I use admin interface to add new 'Exercise' I get following error: There's been an error: {{{ Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 63, in get_response return callback(request, **param_dict) File "/usr/lib/python2.4/site-packages/django/views/admin/main.py", line 768, in add_stage new_object = manipulator.save(new_data) File "/usr/lib/python2.4/site-packages/django/utils/functional.py", line 3, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/usr/lib/python2.4/site-packages/django/core/meta/__init__.py", line 1414, in manipulator_save obj_list = DotExpandedDict(new_data.data)[rel_opts.object_name.lower()].items() KeyError: 'answer' }}} I am using development web server. New entries to 'Exercise' do get added, despite the error, I can also edit them, add 'answers ' and update them. Clearing database (mysql4) and using `init` and `install` gives the same errors. Also adding new exercises, gives always the samer error. Here is my code listing: {{{ gandalf@a1200:/home/stat/webroot/anketa/apps/polls/models$ cat polls.py from django.core import meta # Create your models here. class Poll(meta.Model): fields = ( meta.CharField('question', maxlength=200), meta.DateTimeField('pub_date', 'date published'), ) admin = meta.Admin( fields = ( (None, {'fields': ('question',)}), ('Date information', {'fields': ('pub_date',), 'classes': 'collapse'}), ), list_display = ('question', 'pub_date', 'was_published_today'), list_filter = ['pub_date'], ) def __repr__(self): return self.question def was_published_today(self): return self.pub_date.date() == datetime.… adrian gandalf@owca.info   0 0 0 0 0 0
256 2005-08-03 18:38:51 2006-10-07 20:23:16 2019-06-24 00:17:59.185123 Unreviewed closed Template system defect normal   fixed (patch) add ifequal template tag to set of default tags I'm not able to do something equivalent to: {{{ {% ifequal user.id someobject.id %} {% endifequal %} }}} with the current default template tags. I just thought it would be useful to be able to do that given we have IfNotEqual. So here's a patch that adds that functionality. adrian alastair@liquidx.net   0 0 0 0 0 0
260 2005-08-03 22:43:05 2006-10-07 16:21:15 2019-06-24 00:18:01.684238 Unreviewed closed contrib.admin defect normal   fixed ManyToMany fields need raw_id_admin Just like ForeignKeys, when there are ManyToMany relationships to objects with *many* rows, the admin can be slow to load those pieces. ManyToMany relationships should allow {{{raw_id_admin=True}}}. adrian jacob   0 0 0 0 0 0
263 2005-08-04 10:57:02 2006-10-07 14:12:04 2019-06-24 00:18:03.580229 Unreviewed closed Tools defect normal   fixed inspectdb should give hint on the need to run sqlinitialdata For a model that was built by inspectdb to work you need to execute the statements given by sqlinitialdata. Maybe inspectdb should just output a python comment in the model source that hint's on this fact, so that users don't forget to run the statements. adrian hugo <gb@bofh.ms>   0 0 0 0 0 0
272 2005-08-04 18:07:08 2006-10-07 22:41:30 2019-06-24 00:18:09.240058 Unreviewed closed contrib.admin defect normal   invalid Error while executing I am following the part 1 of the tutorial, on a Windows XP SP2 machine. I had no problems until I tried to run the command django-admin.py init --settings=myproject.settings.main The error I got: {{{ C:\myproject>django-admin.py init --settings=myproject.settings.main Traceback (most recent call last): File "C:\django_src\django\bin\django-admin.py", line 115, in ? main() File "C:\django_src\django\bin\django-admin.py", line 69, in main ACTION_MAPPING[action]() File "C:\Python24\lib\site-packages\django\core\management.py", line 289, in i nit from django.core import db, meta File "C:\Python24\lib\site-packages\django\core\db\__init__.py", line 16, in ? from django.conf.settings import DATABASE_ENGINE File "C:\Python24\lib\site-packages\django\conf\settings.py", line 34, in ? raise EnvironmentError, "Could not import %s '%s' (is it on sys.path?): %s" % (ENVIRONMENT_VARIABLE, me.SETTINGS_MODULE, e) EnvironmentError: Could not import DJANGO_SETTINGS_MODULE 'myproject.settings.ma in' (is it on sys.path?): No module named myproject.settings.main }}} I also tried to set the environment variable DJANGO_SETTINGS_MODULE but got the same error message. I am using the svn version from 4.aug.2005 adrian rodrigo74@gmail.com   0 0 0 0 0 0
284 2005-08-06 15:39:23 2006-10-07 22:02:21 2019-06-24 00:18:17.291846 Unreviewed closed *.djangoproject.com defect minor   wontfix Request for https access to the svn repository I'm getting the following error while trying to download django's source: ali@tux:~/nuevo$ svn co http://code.djangoproject.com/svn/django/trunk/ svn: REPORT request failed on '/svn/!svn/vcc/default' svn: REPORT of '/svn/!svn/vcc/default': 400 Bad Request (http://code.djangoproject.com) Other people in the irc channel checked that the repo was ok at the same time, and been able to access others svn repositories which only diff consists in using https instead of http it seems that people like me behind a web proxy are unable to checkout django using http as transport protocol Best regards, Ali jacob ali@theholidayplace.co.cu   0 0 0 0 0 0
290 2005-08-09 00:40:53 2006-10-07 13:31:40 2019-06-24 00:18:21.370458 Unreviewed closed Documentation   normal   fixed Typo in tutorial 4? Tutorial 4, below the generic views code listing: Similarly, the object_list generic view uses a template called <app_label>/<module_name>_detail. Thus, rename polls/index.html to polls/polls_list.html. <app_label>/<module_name>_detail should read <app_label>/<module_name>_list (I think) jacob Matt Croydon   0 0 0 0 0 0
291 2005-08-09 02:32:42 2006-10-07 22:50:00 2019-06-24 00:18:21.987141 Unreviewed closed contrib.admin defect normal   invalid Installation problems Hi, New to python and django(obviously) Just completed install according to documentation on this site. I am now trying to run django-admin.py startproject myproject and getting the following error. >File "django-admin.py", line 2, in ? > from django.core import management >ImportError: No module named django.core any help? Thanks adrian anonymous   0 0 0 0 0 0
300 2005-08-10 16:11:45 2006-10-07 18:08:14 2019-06-24 00:18:27.855387 Unreviewed closed Core (Other) defect normal   invalid ImportError in simple setup First, let me just say that I might be doing something wrong and that this is not a bug. But after talking to some people on IRC it seems that it should work, at least no-one said "oh, you cant do that". Reproduce what Im doing: {{{ $ django-admin.py startproject he $ export DJANGO_SETTINGS_MODULE=he.settings.main }}} Then create a file: {{{ $ cat > he/foo.py from django.utils.httpwrappers import HttpResponse def bar(request): return HttpResponse("foobar") ^D $ python -c 'import he.foo; he.foo.bar()' Traceback (most recent call last): File "<string>", line 1, in ? TypeError: bar() takes exactly 1 argument (0 given) }}} Obviously Python can find the file. Then put this into he/settings/urls/main.py: {{{ (r'^$', include('he.foo.bar')), }}} Then run "django-admin.py runserver" and point the browser to see this error: {{{ Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/django/core/handlers/base.py", line 56, in get_response callback, param_dict = resolver.resolve(path) File "/usr/lib/python2.3/site-packages/django/core/urlresolvers.py", line 64, in resolve sub_match = pattern.resolve(new_path) File "/usr/lib/python2.3/site-packages/django/core/urlresolvers.py", line 62, in resolve for pattern in self.url_patterns: File "/usr/lib/python2.3/site-packages/django/core/urlresolvers.py", line 79, in _get_url_patterns self.url_patterns = self.urlconf_module.urlpatterns File "/usr/lib/python2.3/site-packages/django/core/urlresolvers.py", line 74, in _get_urlconf_module self.urlconf_module = __import__(self.urlconf_name, '', '', ['']) ImportError: No module named bar }}} adrian henrik@holmboe.se   0 0 0 0 0 0
302 2005-08-10 21:05:33 2006-10-07 12:51:04 2019-06-24 00:18:29.137539 Unreviewed closed contrib.admin defect normal   fixed object.save() doesn't update, re-inserts Probably something to do with [462]. My model: {{{ class Post(meta.Model): fields = ( meta.MZSlugField('slug', 'slug', prepopulate_from = ('title',)), meta.CharField('title', 'title', maxlength = 255), meta.DateTimeField('datetime', 'date created'), meta.DateTimeField('modified', 'date modified'), meta.TextField('content', 'post'), meta.ManyToManyField(Tag, filter_interface = meta.HORIZONTAL), ) admin = meta.Admin( fields = ( (None, {'fields': ('title', 'slug', 'datetime', 'content', 'tags')}$ ), list_display = ('title', 'datetime', 'display_tags'), list_filter = ('datetime', 'tags'), ) ordering = ('-datetime',) def __repr__(self): return self.title def display_tags(self): return ' '.join([obj.tag for obj in self.get_tag_list()]) display_tags.short_description = 'Tags' }}} I'm doing this with the API, from the interactive interpreter. adrian Manuzhai   0 0 0 0 0 0
305 2005-08-11 03:20:14 2006-10-07 16:12:24 2019-06-24 00:18:31.286093 Unreviewed closed Database layer (models, ORM) defect normal 1.0 invalid sql code was not white space safe? Using the postgresql backend I have a model which has "albums" which only has two fields. The important field is: {{{ meta.CharField('name', maxlength = 512) }}} so I create the model fun. Now in python code I do the following: {{{ album = albums.get_object(name__exact = album_name) }}} Where album was the string "Dungeon Keeper 2" This died with the error: {{{ File "/usr/local/lib/python2.4/site-packages/django/utils/functional.py", line 3, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/usr/local/lib/python2.4/site-packages/django/core/meta/__init__.py", line 1013, in function_get_object obj_list = function_get_list(opts, klass, **kwargs) File "/usr/local/lib/python2.4/site-packages/django/core/meta/__init__.py", line 1053, in function_get_list return list(function_get_iterator(opts, klass, **kwargs)) File "/usr/local/lib/python2.4/site-packages/django/core/meta/__init__.py", line 1036, in function_get_iterator cursor.execute("SELECT " + (kwargs.get('distinct') and "DISTINCT " or "") + ",".join(select) + sql, params) File "/usr/local/lib/python2.4/site-packages/django/core/db/base.py", line 10, in execute result = self.cursor.execute(sql, params) psycopg.ProgrammingError: ERROR: syntax error at or near "Keeper" at character 123 SELECT music_albums.id,music_albums.name,music_albums.simplified_name FROM music_albums WHERE music_albums.name = Dungeon Keeper 2 }}} Now if I modified my call to be: {{{ album = albums.get_object(name__exact = "'%s'" % album_name) }}} it works. (Note the {{{" ' %s ' "}}}) thus quoting the string. I would have thought it would do sql safe quoting of my strings for me? adrian scanner@apricot.com quoting strings for 'get_object(<field>__exact = ...)' 0 0 0 0 0 0
306 2005-08-11 04:53:35 2006-10-07 21:56:19 2019-06-24 00:18:31.930202 Unreviewed closed Database layer (models, ORM) defect normal 1.0 fixed cached date time values have greater precision then ones retrieved from db causing issues A problem with dates in objects in memory vs ones being instantiated out of the database. I have a data model for a "music root" that is a directory and two datetime stamps, like so: {{{ class MusicRoot(meta.Model): fields = ( meta.CharField('directory', maxlength = 1024), meta.DateTimeField('last_scan_started', blank = True, null = True), meta.DateTimeField('last_scan_finished', blank = True, null = True), ) }}} I also have a track model that has some fields and a "last_scanner" date time field, like so: {{{ class Track(meta.Model): fields = ( meta.CharField('title', maxlength = 512), ... ... meta.DateTimeField('last_scanned', blank = True, null = True), ) }}} Now, in order to figure out if a "track" file has been removed (and thus the object should be deleted) I set "last_scan_started" on the music root to be datetime.datetime.now(). Then I walk the directory finding all files that are "tracks." When I find a track I always update the track.last_scanned field with datetime.datetime.now(). After I am done walking all the files I do this simple operation to find out which tracks are no longer in this music root: {{{ missing_tracks = tracks.get_list(last_scanned__lt = music_root.last_scan_started) }}} Now, earlier in the same function I had done: {{{ music_root.last_scan_started = datetime.datetime.now() music_root.save() }}} The problem? "missing_tracks" is _all the tracks_ in the music root. Pounded my head for a couple of minutes and then realized this: {{{ music_root.last_scan_started -> 2005-08-10 23:38:49.031080 }}} Almost all the tracks, that were filled in via fetches from the db if they were not cached (because where I had created the 'track' object was in a sub-scope) were: {{{ track.last_scanned -> 2005-08-10 23:38:49 }}} so: {{{ 2005-08-10 23:38:49 < 2005-08-10 23:38:49.031080 }}} I worked around this by doing a: {{{ music_ro… adrian scanner@apricot.com datetime precision 0 0 0 0 0 0
308 2005-08-11 14:22:48 2006-10-07 14:53:12 2019-06-24 00:18:33.192381 Unreviewed closed contrib.admin defect normal   duplicate Adding inline-edited related records during _post_save I need to add records to a child table in the _post_save and can imagine many other situations where this process would be useful. This process itself functions as expected; however, when using the admin interface where the child table is edited inline the display of the process fails. I believe the cause of the failure to be an expectation from the admin interface that the added child record would be present on the previous page when it isn't the process fails with a {{{KeyError}}}. I've made a trivial patch to catch the error and continue but I don't have a sufficiently good understanding of Django to know whether this will cause additional problems. adrian nichyoung _post_save edit_inline 0 0 0 0 0 0
309 2005-08-11 19:09:33 2006-10-07 13:27:45 2019-06-24 00:18:33.840447 Unreviewed closed contrib.admin defect major 1.0 invalid tables with 'class' in them translate to 'classs' messing up inserts I have a table called 'documentclass' and for some reason django translates that to 'documentclasss' when displaying and doing inserts. This prevents inserts from happening correctly. adrian tjones@optiosoftware.com   0 0 0 0 0 0
319 2005-08-14 15:28:17 2006-10-07 14:57:12 2019-06-24 00:18:40.217266 Unreviewed closed contrib.admin defect normal   fixed prepopulate_from attribute does not correctly handle DateTimeField types As the admin page splits DateTimeField entry into two textboxes and appends _date and _time, the JavaScript to prepopulate a field fails whilst looking for the original id_field instead of combining id_field_date and id_field_time appropriately. However, this could be considered desired behaviour. If field_date or field_time is specified, then only the time or date will be used for prepopulation. This perhaps should be made clear within the documentation? adrian anonymous prepopulate slug javascript datetime 0 0 0 0 0 0
366 2005-08-18 17:33:03 2006-10-07 15:06:09 2019-06-24 00:19:10.208885 Unreviewed closed Documentation defect normal   wontfix Document meta.LazyDate() technique Off course when you got auto_now_add=True on your DateTimeField it does not show when you add a new item. Thats not whats bugging me, but when i edit the item i want the date/time fields to show, so that i can edit them. (I know about auto_now, but thats not what i'm after) jacob anonymous   0 0 0 0 0 0
367 2005-08-18 22:36:35 2006-10-07 20:08:12 2019-06-24 00:19:10.838120 Unreviewed closed Database layer (models, ORM) defect normal   wontfix Wontfix: may be it's possible to add SQL_EXECUTE_AFTER_CONNECT setting? It is an SQL-string that will be executed after connect to server. For examle to make some 'SET ..' comands in mysql. adrian mordaha@gmail.com   0 0 0 0 0 0
385 2005-08-21 13:40:37 2006-10-07 12:39:54 2019-06-24 00:19:22.476993 Unreviewed closed Template system defect major   fixed [patch] yesno filter is broken: doesn't accept 2-value argument '''yesno''' filter throws exception, when it is used with 2-value argument: {{{ {{ mylist|length_is:"1"|yesno:"datum,data" }} }}} This path works for me: {{{ --- C:\Documents and Settings\Eugene\Local Settings\Temp\defaultfilters-HEAD.py Sun Aug 21 08:34:15 2005 +++ c:\Projects\Django\django\core\defaultfilters.py Sun Aug 21 08:27:28 2005 @@ -367,7 +367,7 @@ try: yes, no, maybe = bits except ValueError: # unpack list of wrong size (no "maybe" value provided) - yes, no, maybe = bits, bits[1] + yes, no, maybe = bits[0], bits[1], bits[1] if value is None: return maybe if value: }}} PS: Is there any simple way to pluralize non-regular nouns? Something like this would be nice to have: {{{ {{ mylist|pluralize:"datum,data" }} }}} adrian eugene@lazutkin.com   0 1 0 0 0 0
411 2005-08-23 21:06:00 2006-10-07 21:16:53 2019-06-24 00:19:39.434315 Unreviewed closed Database layer (models, ORM) defect trivial   fixed CursorDebugWrapper does not support pyformat paramstyle. According to the Python Database API Specification v2.0, the paramters provided to the cursor.execute() method can be sequences or mappings. http://www.python.org/peps/pep-0249.html Right now, the CursorDebugWrapper is converting all params to tuples before appending it to the queries list. This is causing my calls that use the pyformat paramstyle to fail during DEBUG mode. Below I removed the 'tuple()' function call which fixes my error. Of course, if there is a reason for this explicit conversion to tuple type that I do not see then a better work around would be needed. {{{ class CursorDebugWrapper: def __init__(self, cursor, db): self.cursor = cursor self.db = db def execute(self, sql, params=[]): start = time() result = self.cursor.execute(sql, params) stop = time() self.db.queries.append({ 'sql': sql % params, 'time': "%.3f" % (stop - start), }) return result }}} adrian imaurer@gmail.com   0 0 0 0 0 0
413 2005-08-24 00:31:23 2006-10-07 20:09:00 2019-06-24 00:19:40.718337 Unreviewed closed Core (Other) defect normal   fixed [patch] FileField get_<fieldname>_url returns URL with backslashes on windows I have a model with a !FileField: {{{ meta.FileField('file', upload_to='uploadDir'), }}}. On windows, when uploading the file, its path is saved in the database as 'uploadDir\filename' (with the backslash). This becomes a problem when using get_file_url() because the url then contains a backslash (in the form of: MEDIA_URL/uploadDir\filename) The patch changes get_<fieldname>_url() behavior to replace all backslashes with forward slashes before returning (specifically, {{{ using .replace('\\', '/') }}}). There was some discussion on #django about where to do the replace, here, or where the path is stored in the database, and we decided to do it just when retrieving a URL since the backslash is valid in a path until we start calling it a URL. {{{ Index: django/core/meta/__init__.py =================================================================== --- django/core/meta/__init__.py (revision 547) +++ django/core/meta/__init__.py (working copy) @@ -951,7 +951,7 @@ def method_get_file_url(field, self): if getattr(self, field.name): # value is not blank import urlparse - return urlparse.urljoin(settings.MEDIA_URL, getattr(self, field.name)) + return urlparse.urljoin(settings.MEDIA_URL, getattr(self, field.name)).replace('\\', '/') return '' def method_get_file_size(field, self): }}} adrian Adam Endicott <leftwing17@gmail.com> FileField url windows backslash 0 1 0 0 0 0
437 2005-08-30 10:25:00 2006-10-07 22:05:36 2019-06-24 00:19:56.198298 Unreviewed closed Core (Cache system) enhancement normal   duplicate [patch] In memory file cache Attached to this ticket is a implementation of in memory based file cache. I got basic idea from vampire TemplateCache and re-implemented it to make more general. Usage is simple, if you want to cache a file just call {{{ cache = get_cache('<cache name>') }}} and then {{{ file_contents = cache.load('filename') }}}. It will detect if the file is modified since last access and reload file. I'm currently using it for caching translation objects for Ticket #65. jacob nesh <nesh [at] studioquattro [dot] co [dot] yu>   0 1 0 0 0 0
446 2005-09-01 00:33:02 2006-10-07 22:36:17 2019-06-24 00:20:01.914054 Unreviewed closed contrib.admin defect normal   fixed [patch] bug in yesno filter prevents usage of 2-value form When using the yesno filter with only 2 values, it does the decomposition wrong and will set yes to a list instead of a value. this patch fixes that: {{{ #!python Index: defaultfilters.py =================================================================== --- defaultfilters.py (revision 585) +++ defaultfilters.py (working copy) @@ -368,7 +368,8 @@ try: yes, no, maybe = bits except ValueError: # unpack list of wrong size (no "maybe" value provided) - yes, no, maybe = bits, bits[1], bits[1] + yes, no = bits + maybe = no if value is None: return maybe if value: }}} adrian hugo <gb@bofh.ms>   0 1 0 0 0 0
466 2005-09-06 18:01:11 2006-10-07 22:21:59 2019-06-24 00:20:14.450593 Unreviewed closed Documentation defect major 1.0 invalid Model tutorial fails Django rev 630, Document: Writing your first Django app, part 1, http://www.djangoproject.com/documentation/tutorial1/ If you get a error on the p.add_choice() command like: SET TIME ZONE 'America/Chicago' Try adding your timezone to main.py like: TIME_ZONE='Europe/Stockholm' jacob anonymous   0 0 0 0 0 0
480 2005-09-09 20:56:25 2006-10-07 22:16:07 2019-06-24 00:20:23.387182 Unreviewed closed contrib.admin defect normal   fixed Admin interface table detail showing incorrect number of entries I'd posted a comment on this on the mailing list, but thought I should make a more formal ticket (http://groups.google.com/group/django-users/browse_thread/thread/8bc3ee0eb1b881bf) - please note: one of the issues posted here (being able to sort by the job field) has been resolved by including an ordering value in the model. However, the issue below is still outstanding. I have a table in my model as follows: --------------------------------------- {{{ class Schedule(meta.Model): id = meta.AutoField(primary_key=True) schedule = meta.CharField(maxlength=255, help_text='This takes a Cron-style format (min hour dom mon dow)') job = meta.ForeignKey(Job, db_column='jobid') timevariance = meta.IntegerField('Max Duration', default=30, help_text='The maximum amount of time, in minutes, that you expect the job to take') class META: db_table = 'schedule' admin = meta.Admin( list_display = ('schedule', 'job', 'timevariance'), ) }}} --------------------------------------- For some reason, even though there are 11 records in the database for this table the admin interface is only showing me one of them. Underneath that one entry is message text saying "11 schedules", so I know the DB API is finding them, I just don't know why it's not displaying them. Here's a dump of the schedules table: ---------------------------------------- {{{ -- -- PostgreSQL database dump -- SET client_encoding = 'UNICODE'; SET check_function_bodies = false; SET SESSION AUTHORIZATION 'postgres'; SET search_path = public, pg_catalog; -- -- TOC entry 3 (OID 18698) -- Name: schedule; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE schedule ( id serial NOT NULL, schedule character varying(255), jobid integer, timevariance integer ); -- -- Data for TOC entry 6 (OID 18698) -- Name: schedule; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY schedule (id, schedule, jobid, timevaria… adrian tom.haddon@gmail.com   0 0 0 0 0 0
481 2005-09-10 00:32:11 2006-10-07 17:59:02 2019-06-24 00:20:24.027070 Unreviewed closed Core (Other) enhancement trivial   fixed [patch] additional http status codes Full list of http status calls is added. I got tired to debug my code and see 30x codes as UNKNOWN STATUS CODE. {{{ Index: wsgi.py =================================================================== --- wsgi.py (revision 632) +++ wsgi.py (working copy) @@ -2,10 +2,53 @@ from django.utils import datastructures, httpwrappers from pprint import pformat +# +# Status code definition. +# For details see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html +# + STATUS_CODE_TEXT = { + 100: 'CONTINUE', + 101: 'SWITCHING PROTOCOLS', 200: 'OK', + 201: 'CREATED', + 202: 'ACCEPTED', + 203: 'NON-AUTHORITATIVE INFORMATION', + 204: 'NO CONTENT', + 205: 'RESET CONTENT', + 206: 'PARTIAL CONTENT', + 300: 'MULTIPLE CHOICES', + 301: 'MOVED PERMANENTLY', + 302: 'FOUND', + 303: 'SEE OTHER', + 304: 'NOT MODIFIED', + 305: 'USE PROXY', + 306: 'RESERVED', + 307: 'TEMPORARY REDIRECT', + 400: 'BAD REQUEST', + 401: 'UNAUTHORIZED', + 402: 'PAYMENT REQUIRED', + 403: 'FORBIDDEN', 404: 'NOT FOUND', + 405: 'METHOD NOT ALLOWED', + 406: 'NOT ACCEPTABLE', + 407: 'PROXY AUTHENTICATION REQUIRED', + 408: 'REQUEST TIMEOUT', + 409: 'CONFLICT', + 410: 'GONE', + 411: 'LENGTH REQUIRED', + 412: 'PRECONDITION FAILED', + 413: 'REQUEST ENTITY TOO LARGE', + 414: 'REQUEST-URI TOO LONG', + 415: 'UNSUPPORTED MEDIA TYPE', + 416: 'REQUESTED RANGE NOT SATISFIABLE', + 417: 'EXPECTATION FAILED', 500: 'INTERNAL SERVER ERROR', + 501: 'NOT IMPLEMENTED', + 502: 'BAD GATEWAY', + 503: 'SERVICE UNAVAILABLE', + 504: 'GATEWAY TIMEOUT', + 505: 'HTTP VERSION NOT SUPPORTED', } class WSGIRequest(httpwrappers.HttpRequest): }}} adrian eugene@lazutkin.com   0 1 0 0 0 0
484 2005-09-10 22:20:36 2006-10-07 14:02:04 2019-06-24 00:20:25.930914 Unreviewed closed Database layer (models, ORM) defect major   fixed FloatField with decimal_places but not max_digits causes mysql error. A FloatField that uses {{{decimal_places}}} without {{{max_digits}}} results in using {{{numeric(None, 2)}}}. This causes an error in mysql (at least.) I can see two ways to fix this: * Update the docs with this info and/or throw a helpful error message. * Set the max_digits to the maximum possible. (255-decimal_places, on mysql at least.) Note that the same thing also happens when you have {{{max_digits}}} without {{{decimal_places}}}. MWM adrian mmarshall   0 0 0 0 0 0
485 2005-09-10 23:47:02 2006-10-07 18:14:57 2019-06-24 00:20:26.543833 Unreviewed closed contrib.syndication defect normal   fixed [patch] small typo in feedgenerator.py startRssElement is used instead of writeRssElement {{{ Index: feedgenerator.py =================================================================== --- feedgenerator.py (revision 632) +++ feedgenerator.py (working copy) @@ -107,7 +107,7 @@ handler.endElement(u"channel") class RssUserland091Feed(RssFeed): - def startRssElement(self, handler): + def writeRssElement(self, handler): handler.startElement(u"rss", {u"version": u"0.91"}) def writeRssItem(self, handler, item): }}} adrian eugene@lazutkin.com   0 1 0 0 0 0
488 2005-09-12 02:43:08 2006-10-07 20:34:42 2019-06-24 00:20:28.403273 Unreviewed closed Template system defect normal   fixed [patch] removetags filter doesn't remove tags without a seperate ending tag the removetags filter incorrectly doesn't remove <br/> (possibly <img/> as well however I haven't tested). I've included (sorry I'm unsure of the correct way to create and upload a patch, svn diff includes all my mods to other files) my modified filter which works, someone better with regular expressions can probably tweak the existing ones. {{{ def removetags(value, tags): "Removes a space separated list of [X]HTML tags from the output" tags = [re.escape(tag) for tag in tags.split()] tags_re = '(%s)' % '|'.join(tags) starttag_re = re.compile('<%s(>|(\s+[^>]*>))' % tags_re) endtag_re = re.compile('</%s>' % tags_re) singletag_re = re.compile('<%s*/>' % tags_re) value = starttag_re.sub('', value) value = endtag_re.sub('', value) value = singletag_re.sub('', value) return value }}} adrian ilikeprivacy@gmail.com   0 1 0 0 0 0
497 2005-09-12 23:48:39 2006-10-07 18:21:09 2019-06-24 00:20:34.121822 Unreviewed closed Database layer (models, ORM) enhancement normal   invalid Request DB API access to the validation information in the model In the data model, there is validation information such as character field maximum length, which is used for form entry validation in the Admin interface. However, this doesn't seem to be available from the DB API for validation: e.g. Using the polls/choices example; {{{ >>> from django.models.polls import polls, choices >>> p = polls.get_object(pk=1) >>> p.question = 'x'*300 >>> p.save() Traceback (most recent call last): ... ProgrammingError: ERROR: value too long for type character varying(200) UPDATE polls_polls SET question='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxK >>> }}} It would be nice to have something like: {{{ >>> polls.is_data_valid_for_field(data='x'*300, field=question) False >>> }}} and/or {{{ >>> polls.validation_data['question'] {'max_length':200, ... } }}} Perhaps this could be integrated with the Validators interface? adrian anonymous   0 0 0 0 0 0
505 2005-09-14 09:45:32 2006-10-07 16:33:00 2019-06-24 00:20:39.206406 Unreviewed closed Template system defect normal   fixed ssi-tag should not fail silently if DEBUG is enabled I think DEBUG is intended to catch exactly these kinds of things, right? adrian Manuzhai   0 0 0 0 0 0
535 2005-09-21 23:06:33 2006-10-07 21:00:03 2019-06-24 00:20:58.695975 Unreviewed closed contrib.admin task normal   fixed Refactor admin code to clean it up Following the mail thread http://groups.google.com/group/django-developers/browse_thread/thread/0e0ee390664ba078/65e6dffff7699a22#65e6dffff7699a22 I have started to refactor the admin code to a) Make it easier to work on b) Make it clearer what the deficiencies in the meta system are for interfaces like the admin I will attach patches here. The patches do include some additional changes, eg ones I have applied from other tickets. rjwittams robert@wittams.com   0 0 0 0 0 0
537 2005-09-22 09:52:19 2006-10-07 19:59:16 2019-06-24 00:21:00.108372 Unreviewed closed contrib.admin defect normal   fixed Typo in patch committed to svn {{{ There's been an error: Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/handlers/base.py", line 64, in get_response response = callback(request, **param_dict) File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/views/admin/doc.py", line 104, in view_index view_functions = extract_views_from_urlpatterns(urlconf.urlpatterns) File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/views/admin/doc.py", line 300, in extract_views_from_urlpatterns raise TypeError, "%s does not appear to be a urlpattern object" % p TypeError: <django.core.urlresolvers.RegexURLResolver object at 0x408a84ec> does not appear to be a urlpattern object }}} A patch (also attached): {{{ Index: django/core/urlresolvers.py =================================================================== --- django/core/urlresolvers.py (revision 661) +++ django/core/urlresolvers.py (working copy) @@ -78,6 +78,10 @@ return self._urlconf_module urlconf_module = property(_get_urlconf_module) + def _get_url_patterns(self): + return self.urlconf_module.urlpatterns + url_patterns = property(_get_url_patterns) + def _resolve_special(self, view_type): callback = getattr(self.urlconf_module, 'handler%s' % view_type) mod_name, func_name = get_mod_func(callback) }}} adrian fonso   0 0 0 0 0 0
554 2005-09-25 10:20:08 2006-10-07 17:34:14 2019-06-24 00:21:11.842704 Unreviewed closed contrib.syndication defect normal   fixed RSS feeds are not valid due to missing timezone in pubdates When the RSS feed includes the pubDate tag and that is taken from a datetime field of a model, the strftime(...) stuff creates a date without timezone - that's because %Z doesn't seem to be implemented with datetime.strftime. Instead of the timezone an emtpy string is returned and so the feed validator doesn't see this feed as valid. adrian hugo <gb@bofh.ms>   0 0 0 0 0 0
557 2005-09-25 21:15:39 2006-10-07 19:08:24 2019-06-24 00:21:13.675328 Unreviewed closed contrib.admin defect normal   fixed date_hierarchy doesn't work with DateField Trying to use a DateField in the meta.Admin(date_hierarch="dateFld") yields the following exception when going to the admin list page: {{{ File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/db/typecasts.py", line 23, in typecast_timestamp d, t = s.split() }}} A simple patch to make typecast_timestamp work with just dates is: {{{ =================================================================== --- django/core/db/typecasts.py (revision 687) +++ django/core/db/typecasts.py (working copy) @@ -20,7 +20,12 @@ # "2005-07-29 15:48:00.590358-05" # "2005-07-29 09:56:00-05" if not s: return None - d, t = s.split() + flds = s.split() + d = flds[0] + if len(flds) == 1: + t = "00:00:01" # or noon? + else: + t = flds[1] # Extract timezone information, if it exists. Currently we just throw # it away, but in the future we may make use of it. if '-' in t: }}} adrian kyrrigle@gmail.com   0 0 0 0 0 0
577 2005-09-29 19:17:14 2006-10-07 23:13:20 2019-06-24 00:21:26.141494 Unreviewed closed Template system enhancement normal   wontfix Dynamic attribute lookup in templates I've written a tag for dynamic attribute lookup in templates. I bet it's useful for many Django users so here it is, hopefuly it will be included in the base code :) {{{ class GetattrNode(Node): def __init__(self, vars): self.vars = vars def render(self, context): return str(resolve_variable("%s.%s" % (self.vars[0], resolve_variable(self.vars[1], context)), context)) def do_getattr(parser, token): """ Return the value of the given attribute in the given object. This differs from the regular use of {{ object.attribute }}. In the case of {% get object attr_var %} attr_var is a variable and the actual attribute fetched from 'object' is the value of that var not it's name like in regular Django variable resolution. """ bits = token.contents.split() if len(bits) != 3: raise TemplateSyntaxError, "usage: getattr <object> <attribute>" return GetattrNode(bits[1:]) register_tag('getattr', do_getattr) }}} adrian wojtek3@brandlay.com   0 0 0 0 0 0
589 2005-10-04 01:31:54 2006-10-07 16:24:20 2019-06-24 00:21:33.672152 Unreviewed closed contrib.admin enhancement normal   fixed A patch that adds FilePathField I coded a patch that implements the FilePathField that was discussed at http://www.socialistsoftware.com/?p=12 and http://groups.google.com/group/django-developers/browse_thread/thread/e0d0bd7f303179e8/2fb7e3ff4409175a The interface works like this: {{{ fieldName = meta.FilePathField(path='/path/to/files', match='re_string', recursive=True) }}} '''path''' is the location of the files you want to choose '''match''' is a string that is put into re.compile(match) so that only filenames that match that re are included in the list '''recursive''' is a boolean which when set to True allows all the files in subdirectories of path to be included in the list '''path''' is the only required parameter. I am not sure of the correct way to submit patches so you can download it at [http://socialistsoftware.com/django/FilePathField.diff] and I have pasted it inline below. {{{ Index: trunk/django/core/meta/fields.py =================================================================== --- trunk/django/core/meta/fields.py (revision 770) +++ trunk/django/core/meta/fields.py (working copy) @@ -427,6 +427,43 @@ f = os.path.join(self.get_directory_name(), get_valid_filename(os.path.basename(filename))) return os.path.normpath(f) +class FilePathField(Field): + def __init__(self, verbose_name=None, name=None, path='', match='', recursive=False, **kwargs): + self.path = path + self.match = match + self.recursive = recursive + Field.__init__(self, verbose_name, name, **kwargs) + + def get_manipulator_fields(self, opts, manipulator, change, name_prefix='', rel=False): + if self.match != '': + import re + p = re.compile(self.match) + files = os.listdir(self.path) + theFileList = [] + if self.recursive: + for root, dirs, files in os.walk(self.path): + for f in files: + if self.match != '': + m = p.match(f) + … adrian jay@skabber.com   0 0 0 0 0 0
593 2005-10-05 12:05:45 2006-10-07 17:55:33 2019-06-24 00:21:36.149674 Unreviewed closed Database layer (models, ORM) enhancement minor   fixed [patch] Fulltext search support in Django If possible, django should provide a way of selecting fields to conduct fulltext search upon. MySQL supports this in default distribuition, PostgreSQL needs extensions, I don't know about SqLite. adrian anonymous fulltext search 0 1 0 0 0 0
594 2005-10-06 01:28:25 2006-10-07 17:17:41 2019-06-24 00:21:36.758114 Unreviewed closed Database layer (models, ORM) enhancement minor   invalid Django and Twisted Yes I've seen #172 Unfortunately it only handles the web-part and does not handle the DB part. In order to handle the DB part one would have to use twisted's adbapi, and use deferreds for processing the data from the database. This would require adding a keyword parameter to all the DB-fetching functions passing them a function to call on the returned objects. Why bother? Well I thought it could be nice to have a complete django + twisted package which would outperform apache/lighttpd/and so on. Please give me your thoughts on the idea. adrian wojtek3@brandlay.com   0 0 0 0 0 0
620 2005-10-13 10:34:14 2006-10-07 19:47:58 2019-06-24 00:21:53.070983 Unreviewed closed contrib.admin defect normal   fixed [patch] make limit_choices_to work with raw_id_admin With raw_id_admin=True, the admin UI does not limit choices as per limit_choices_to. The following patch fixes it. {{{ Index: django/conf/admin_media/js/admin/RelatedObjectLookups.js =================================================================== --- django/conf/admin_media/js/admin/RelatedObjectLookups.js (revision 851) +++ django/conf/admin_media/js/admin/RelatedObjectLookups.js (working copy) @@ -3,7 +3,13 @@ function showRelatedObjectLookupPopup(triggeringLink) { var name = triggeringLink.id.replace(/^lookup_/, ''); - var win = PrivoxyWindowOpen(triggeringLink.href + '?pop=1', name, 'height=500,width=740,resizable=yes,scrollbars=yes'); + var href + if (triggeringLink.href.search(/\?/) >= 0) { + href = triggeringLink.href + '&pop=1'; + } else { + href = triggeringLink.href + '?pop=1' + } + var win = PrivoxyWindowOpen(href, name, 'height=500,width=740,resizable=yes,scrollbars=yes'); win.focus(); return false; } Index: django/views/admin/main.py =================================================================== --- django/views/admin/main.py (revision 851) +++ django/views/admin/main.py (working copy) @@ -746,8 +746,12 @@ field_id = 'id_%s%s' % ((rel and "%s{{ forloop.counter0 }}." % name_prefix or ""), field.get_manipulator_field_names('')[0]) # raw_id_admin fields get the little lookup link next to them if use_raw_id_admin(field): - t.append(' <a href="../../../%s/%s/" class="related-lookup" id="lookup_%s" onclick="return showRelatedObjectLookupPopup(this);">' % \ - (field.rel.to.app_label, field.rel.to.module_name, field_id)) + if field.rel.limit_choices_to: + limit_choices_to = '?%s' % '&'.join(['%s=%s' % (k,v) for k,v in field.rel.limit_choices_to.items()]) + else: + limit_choices_to = '' + t.append(' <a href="../../../%s/%s/%s" class="related-lookup" id="lookup_%s" onclick="return showRelatedObjectLookupPopup(th… adrian davidschein@alumni.tufts.edu   0 1 0 0 0 0
628 2005-10-15 00:36:06 2006-10-07 22:35:46 2019-06-24 00:21:58.233770 Unreviewed closed Metasystem defect normal   fixed django should not overwrite model class docstrings django currently overwrites your model's docstring with "modulename.ModelName(arg1, arg2)" This makes it impossible to put doctests in your model class. Django shouldn't overwrite your docstring if you define one. adrian jkocherhans@mac.com   0 0 0 0 0 0
635 2005-10-17 13:19:30 2006-10-07 16:33:51 2019-06-24 00:22:02.592483 Unreviewed closed Documentation defect trivial   fixed A small tipo in docs http://www.djangoproject.com/documentation/settings/#prepend-www {{{ PREPEND_WWW Default: False Whether to prepend the "www." subdomain to URLs that don't have it. This is only used if CommonMiddleware is installed (see the middleware docs). See also '''PREPEND_WWW'''. }}} Guess there should be '''APPEND_SLASH'''? jacob anonymous   0 0 0 0 0 0
636 2005-10-17 14:22:31 2006-10-07 11:46:17 2019-06-24 00:22:03.210213 Unreviewed closed Core (Other) enhancement normal   invalid Restrict editing of records to owner or person with certain role. = Steps for owner handling = == Connect owner to permission == A model with an OwnerField() that implicitly references the user table. The OwnerField() records the creator of a record, and maps to the special role 'owner', that can be used as a permission. == Restrict editing and listing to certain role == Allow a META field that provides additional permissions to roles, including the special role 'owner'. For instance permissions = [('add','all'),(['list','edit'],'owner'),('delete','admin')] such that a all users can add a record, and they can only list and edit their own records, and only admins can delete the record. If the role 'owner' is used, the model must have an OwnerField(). adrian jhf@hex.no ownership 0 0 0 0 0 0
645 2005-10-18 21:37:02 2006-10-07 22:46:48 2019-06-24 00:22:08.886544 Unreviewed closed Core (Other) enhancement normal   fixed [patch] Replace _module_-prefix and module_constants with "class MODULE" As discussed in the thread [http://tinyurl.com/bv7fy Get rid of model modules?] on django-devel, it would be nice to get rid of the {{{_module_}}}-prefix and {{{module_constants}}}, and have module-level constants and functions in a {{{class MODULE}}} ala {{{class META}}}. adrian Sune Kirkeby <sune.kirkeby@gmail.com>   0 1 0 0 0 0
647 2005-10-19 07:38:02 2006-10-07 21:27:49 2019-06-24 00:22:10.194304 Unreviewed closed Core (Cache system) defect major   fixed [patch] cache middleware blows out when gets "unmarked" response Cache middleware expects request._cache_update_cache attribute during process_response(). It's not always the case. Notable examples are 404 and 500 errors. Attached patch fixes the problem. jacob eugene@lazutkin.com   0 1 0 0 0 0
650 2005-10-19 13:08:07 2006-10-07 21:53:25 2019-06-24 00:22:12.075752 Unreviewed closed Template system defect major   wontfix render_to_response uses Context instead DjangoContext As far as I can see render_to_response calls render_to_string which by default uses Context. Because of that all DjangoContext stuff (i.e. debug, user, ...) don't work. I can use render_to_response(..., context_instance=DjangoContext()) but that is almost same as not using render_to_response altogether. Maybe Context can be raplaced with DjangoContext in loader.py? adrian nesh <nesh [at] studioquattro [dot] co [dot] yu>   0 0 0 0 0 0
658 2005-10-20 10:19:28 2006-10-07 16:46:20 2019-06-24 00:22:17.114345 Unreviewed closed contrib.admin defect normal   fixed [patch] javascript calendar widget layout broken in IE The javascript calendar widget constructs elements dynamically but IE does not render the class styles appropriately unless explicit assignment to the className attribute is used. There is a similar problem also with the background colour for blank days. Fix attached. adrian django@kieranholland.com   0 1 0 0 0 0
667 2005-10-20 22:54:31 2006-10-07 14:19:02 2019-06-24 00:22:22.819441 Unreviewed closed Generic views enhancement normal   fixed [patch] extra_lookup_kwargs and extra_context in infodicts should accept callbacks the callback should be called with the request and the dict of the parsed urlpattern to allow dynamic creation of extra_lookup_kwargs based on url parts or request.GET stuff (for example to throw in some filtering). jacob hugo   0 1 0 0 0 0
674 2005-10-21 11:59:13 2006-10-07 12:56:14 2019-06-24 00:22:27.235095 Unreviewed closed contrib.admin defect normal   fixed ImageField display use undocumented thumbnails for change_list display I'm hunting this almost a hour :) When displayed in admin interface ImageField use some sort of thumbnail (like xxx_t120.jpg). AFAIK this is not documented anywhere. Also because thumbnail is not auto-generated I'm only got broken links in admin. First solution, probably, will be some sort of auto-generated thumbnails or something like this (no thumbs, and I'm using i18n branch): {{{ Index: /store/django/django/contrib/admin/views/main.py =================================================================== --- /store/django/django/contrib/admin/views/main.py (revision 987) +++ /store/django/django/contrib/admin/views/main.py (working copy) @@ -414,8 +414,7 @@ result_repr = '<img src="%simg/admin/icon-%s.gif" alt="%s" />' % (ADMIN_MEDIA_PREFIX, BOOLEAN_MAPPING[field_val], field_val) # ImageFields are special: Use a thumbnail. elif isinstance(f, meta.ImageField): - from django.parts.media.photos import get_thumbnail_url - result_repr = '<img src="%s" alt="%s" title="%s" />' % (get_thumbnail_url(getattr(result, 'get_%s_url' % f.name)(), '120'), field_val, field_val) + result_repr = '<img src="%s" alt="%s" title="%s" width="120" />' % (getattr(result, 'get_%s_url' % f.name)(), field_val, field_val) # FloatFields are special: Zero-pad the decimals. elif isinstance(f, meta.FloatField): if field_val is not None: }}} adrian nesh <nesh [at] studioquattro [dot] co [dot] yu>   0 0 0 0 0 0
679 2005-10-22 03:54:32 2006-10-07 21:56:27 2019-06-24 00:22:30.381783 Unreviewed closed contrib.admin defect normal   fixed "Collapse" class not processed correctly in admin interface When specifying a number of fieldsets in the meta.Admin constructor (the fields parameter), an entry of "classes": "collapse" is only correctly handled (i.e. the Javascript support is only included) for the first tuple in the list. The attached patch fixes this. adrian malcolm@pointy-stick.com   0 0 0 0 0 0
692 2005-10-25 02:30:54 2006-10-07 23:48:25 2019-06-24 00:22:38.715699 Unreviewed closed Core (Management commands) defect major   invalid TemplateSyntaxError in admin with development server I have replicated the error I [http://groups.google.com/group/django-users/browse_frm/thread/de170e44ef546518/a661d851ebfa0da8#a661d851ebfa0da8 described in this newsgroup posting] on a different machine running a different Linux distribution, so I am filing it as a bug. == Error Description == As soon as log in to the admin interface (running on the development server), I get a traceback ending in this error: {{{ File "/usr/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/template/defaulttags.py", line 627, in do_load raise TemplateSyntaxError, "'%s' is not a valid tag library" % taglib TemplateSyntaxError: 'log' is not a valid tag library }}} == Steps to Replicate == 1. Delete old django egg directory from site-packages. 1. {{{svn update}}} to current trunk (I have tried [992] on one machine and [1006] on the other. I was using ~[882] before. This means I am updating to the admin changes of #627). 1. {{{setup.py clean}}}, {{{build}}}, and {{{install}}} 1. {{{django-admin.py startproject myproject}}} 1. edit {{{myproject/settings.py}}} (use sqlite3, add admin to {{{INSTALLED_APPS}}}) 1. enable admin in {{{myproject/urls.py}}} 1. {{{cd myproject}}} 1. {{{django-admin.py startapp myapp}}} 1. {{{rm -r myapp/settings}}} 1. {{{django-admin.py init }}} 1. {{{django-admin.py createsuperuser}}} 1. {{{django-admin.py runserver}}} ''my external ip''{{{:8000 --settings='myproject.settings'}}} 1. log in to the admin site adrian danlipsitt+djangotrac@gmail.com   0 0 0 0 0 0
693 2005-10-25 10:41:22 2006-10-07 17:31:21 2019-06-24 00:22:39.355023 Unreviewed closed Metasystem enhancement normal   invalid A big improovement to FileFields It will be very cool to make a "historical" FileField on a meta-level. So, when a new file uploaded, old file will not deleted, but saved with date/version information about change. And later, we will have all the history about file changing. The document storage applications will be much easy to develop. I be able to make such FileField, but i need a hints how to do this, i think it will reflects on meta system (additioanl "history" table required in each field) adrian mordaha@gmail.com   0 0 0 0 0 0
695 2005-10-25 16:31:22 2006-10-07 13:50:06 2019-06-24 00:22:40.632777 Unreviewed closed Database layer (models, ORM) defect blocker 0.91 duplicate sqlupdate, creates sql to update the database based on an updated model file I've created a function for django-admin.py that dumps the sql that will transition an old database model (the one that is in the database currently) to a new one based an updated django model. So if you change the name of a model, or add a column, or delete a column, etc. it will output the sql to alter the database for you. And I think it's a shame that no one else has this, as it is remarkably usefull. For instance, if I have this originally: {{{ class Poll(meta.Model): question = meta.CharField(maxlength=128) responses = meta.IntegerField(default=0) }}} And I want to go to this: {{{ class Poll(meta.Model): question = meta.CharField(maxlength=128) title = meta.CharField(maxlength=128) }}} It will create the sql to drop "responses" and add "title". There are two steps in doing this. The first is to create a "transition" file. This file allows you to tweak the changes that the code thinks should be done. For instance, if you change Poll a lot, and then changed the name to Survey or something, it might think you dropped Poll and created a table called Survey. So it would create in the file: {{{ Drop("Poll") Add("Survey") }}} But you might want to change it to: {{{ Name("app_polls", "Survey") Change("Survey") }}} Which tells it that the table that was named polls, should be called "Survey" now, and also it should make all the changes to "Survey". This all goes in a file right next to your model file. If your model file was called "model.py", the transition file would be called "model.transition.py" The next step is to actually run the sqlupdate, that will analyze the transition file, and spew out the SQL to realize those changes. To perform the complete steps: 1. django-admin.py transition <app_name> 2. <check the transition file to make sure it's kosher> 3. django-admin.py sqlupdate <app_name> # which won't commit the changes 4. django-admin.py sqlupdate <app_name> | mysql -p <project_name> # which will commit the changes (in mysql) … adrian brantley (deadwisdom@gmail.com)   0 0 0 0 0 0
697 2005-10-26 11:30:07 2006-10-07 12:28:18 2019-06-24 00:22:41.941958 Unreviewed closed Generic views enhancement normal   fixed Optional object_list for archive_year The generic view archive_year does not provide an object_list. This patch allows archive_year to optionally populate object_list, when the keyword make_object_list is True. jacob jhf@hex.no   0 0 0 0 0 0
711 2005-11-01 00:27:45 2006-10-07 12:59:31 2019-06-24 00:22:50.908185 Unreviewed closed contrib.admin defect normal   duplicate ManyToManyField doesn't support "self" instead of a class name parameter. The !ManyToManyField type doesn't support using "self" as an alternative to the class name as with !ForeignKeys. adrian cygnus@cprogrammer.org   0 0 0 0 0 0
713 2005-11-01 16:37:09 2006-10-07 13:31:52 2019-06-24 00:22:52.156635 Unreviewed closed Core (Other) defect normal   duplicate sqlreset expects django admin to be installed When no django admin is installed in a project, sqlreset will still produce the deletes on the django admin log. Maybe it should check wether django.contrib.admin is in the installed apps and only output django admin log statements when the django admin is in there? adrian hugo   0 0 0 0 0 0
723 2005-11-03 22:01:13 2006-10-07 23:48:21 2019-06-24 00:22:58.575749 Unreviewed closed Documentation defect minor   fixed Document django-admin installperms The django-admin.py docs don't yet include the "installperms" option. adrian adrian   0 0 0 0 0 0
726 2005-11-04 08:15:01 2006-10-07 22:25:18 2019-06-24 00:23:00.502427 Unreviewed closed Core (Other) defect normal   fixed Redirect doesn't work on DEBUG=True I set redirect in admin interface,but it does't work on DEBUG = True. but worked on DEBUG = False adrian fat   0 0 0 0 0 0
727 2005-11-04 13:09:19 2006-10-07 12:34:40 2019-06-24 00:23:01.138565 Unreviewed closed contrib.admin defect normal   fixed [patch]: leftover %() syntax in password_reset_email.html Just two %() I missed: {{{ Index: contrib/admin/templates/registration/password_reset_email.html =================================================================== --- contrib/admin/templates/registration/password_reset_email.html (revision 1068) +++ contrib/admin/templates/registration/password_reset_email.html (working copy) @@ -2,7 +2,7 @@ {% trans "You're receiving this e-mail because you requested a password reset" %} {% trans "for your user account at %(site_name)s" %}. -{% trans "Your new password is: %(new_password)s" %} +{% blocktrans %}Your new password is: {{ new_password }}{% endblocktrans %} {% trans "Feel free to change this password by going to this page:" %} @@ -12,4 +12,4 @@ {% trans "Thanks for using our site!" %} -{% trans "The %(site_name)s team" %} +{% blocktrans %}The {{ site_name }} team{% endblocktrans %} }}} adrian hugo   0 1 0 0 0 0
732 2005-11-05 00:28:25 2006-10-07 22:18:32 2019-06-24 00:23:04.317161 Unreviewed closed Translations enhancement minor   fixed slightly update de-translation A slightly modified de-translation: changed all occurences of "Passwort" to "Kennwort" (we should decide which of one to use, and then use it throughout django :) and fixed a few typos. Should we really open a new Ticket for each and every translation update? adrian lucky@knup.de   0 0 0 0 0 0
748 2005-11-07 11:02:42 2006-10-07 18:49:39 2019-06-24 00:23:14.381404 Unreviewed closed Tools defect normal   fixed [patch] make make-messages.py a bit more careful with errors in gettext tools The current version of make-messages.py has a rather dumb error handling: if you run make-messages.py on a .po file with errors (for example duplicate IDs or syntax errors), it will throw out the error (usually in the msgmerge step) and leave you with an empty .po file - rather nasty if you just added a load of new translations. The attached patch uses os.popen3 instead of os.popen and watches stderr of the gettext utilities for output. if there is some output, it will write that to stdout and just end the make-messages.py run without overwriting the .po file. adrian hugo   0 1 0 0 0 0
759 2005-11-09 10:30:05 2006-10-07 22:17:49 2019-06-24 00:23:21.433851 Unreviewed closed Core (Other) defect normal   fixed The default 404 view hits the DB It's evil when you have a lot of load, want to use the 404 view (just to render the 404 template). One should be able to turn off the DB queries by using some settings parameter. adrian wojtek@brandlay.com   0 0 0 0 0 0
762 2005-11-10 01:02:28 2006-10-07 16:59:07 2019-06-24 00:23:23.388016 Unreviewed closed Translations enhancement normal   fixed Bengali (bn) translations Please find the attached Bengali (bn) translations. I will be happy if you include them in the Django distribution. hugo b.ghose@gnu.org.in   0 0 0 0 0 0
775 2005-11-12 14:46:40 2006-10-07 13:51:57 2019-06-24 00:23:31.539129 Unreviewed closed Translations enhancement normal   fixed Updated Bengali (bn) translations Please find attached updated Bengali (bn) translations. Thanks! hugo Baishampayan Ghose <b.ghose@gnu.org.in>   0 0 0 0 0 0
784 2005-11-14 03:44:50 2006-10-07 13:18:14 2019-06-24 00:23:37.288174 Unreviewed closed contrib.syndication defect normal   fixed Atom Feeds should use RFC3339 date/time format The Atom1Feed class is currently using the wrong date format. It uses the email format: {{{ Mon, 14 Nov 2005 03:36:03 -0000 }}} Where it should be using the [http://www.faqs.org/rfcs/rfc3339.html RFC3339] format: {{{ 2002-10-02T10:00:00-05:00 2002-10-02T15:00:00Z }}} adrian mattycakes@gmail.com atom date syndication 0 0 0 0 0 0
786 2005-11-14 04:01:57 2006-10-07 19:30:13 2019-06-24 00:23:38.556768 Unreviewed closed contrib.syndication defect normal   fixed Atom Entry "link" elements broken (should use "href" attr) Atom entries' link elements should have the links in an href attr, rather than as text-content. adrian mattycakes@gmail.com   0 0 0 0 0 0
793 2005-11-14 18:16:18 2006-10-07 23:54:39 2019-06-24 00:23:42.974173 Unreviewed closed contrib.admin enhancement normal   wontfix Prev/next buttons for objects in admin interface In some circumstances it would be useful to have previous/next links for objects in the admin site. Actually instead, if you need to browse linearly a sequence of objects, you should manually go back to the change list and click on the previous/next object, each time. This doesn't hurt if you need to browse two or three object , while the story is totally different when you need to do this operation many times (boring). adrian paolo <paolo@php3.it>   0 0 0 0 0 0
794 2005-11-14 21:10:09 2006-10-07 13:00:31 2019-06-24 00:23:43.578881 Unreviewed closed Template system defect minor   wontfix A template filter that lets the user choose pluralization method The current pluralization in the default filter adds an s if it should pluralize. While this is often good for english, it is not always, and it is generally not usefull for any other language. Therefore, I wrote a custom pluralization filter that lets the template author specify what the filter should return if it should return anything at all. Here is the diff: {{{ Index: django/core/template/defaultfilters.py =================================================================== --- django/core/template/defaultfilters.py (revision 1124) +++ django/core/template/defaultfilters.py (arbetskopia) @@ -408,6 +408,22 @@ pass return '' +def custompluralize(value, arg): + """Returns the arg if the value is not 1. Like above, but with + customizable pluralization. Good for i18n""" + try: + if int(value) != 1: + return arg + except ValueError: # invalid string that's not a number + pass + except TypeError: # value isn't a string or a number, maybe it is a list? + try: + if len(value) != 1: + return arg + except TypeError: # len() of unsized object + pass + return '' + def phone2numeric(value, _): "Takes a phone number and converts it in to its numerical equivalent" from django.utils.text import phone2numeric @@ -447,6 +463,7 @@ register_filter('make_list', make_list, False) register_filter('phone2numeric', phone2numeric, False) register_filter('pluralize', pluralize, False) +register_filter('custompluralize', custompluralize, True) register_filter('pprint', pprint, False) register_filter('removetags', removetags, True) register_filter('random', random, False) }}} adrian ozamosi@blinkenlights.se   0 0 0 0 0 0
804 2005-11-15 19:10:28 2006-10-07 15:56:02 2019-06-24 00:23:49.951862 Unreviewed closed Translations enhancement normal   fixed update slovak(sk) translate   hugo vlado@labath.org   0 0 0 0 0 0
810 2005-11-16 05:04:01 2006-10-07 23:10:31 2019-06-24 00:23:53.824871 Unreviewed closed Documentation enhancement normal   fixed serving static files documentation Trying my hand at documentation, need to edit the admonition note about using this only in development or whatever you think. jacob EABinGA   0 0 0 0 0 0
822 2005-11-17 02:45:58 2006-10-07 16:58:54 2019-06-24 00:24:01.672948 Unreviewed closed contrib.admin enhancement normal   fixed Use disclosure triangles in debug 500 error message instead of up and down arrows The up and down arrows have unclear meaning, whereas disclosure triangles are a common and comprehensible UI widget. adrian me@aaronsw.com   0 0 0 0 0 0
826 2005-11-17 13:36:35 2006-10-07 21:30:02 2019-06-24 00:24:04.185268 Unreviewed closed contrib.admin defect normal   wontfix Development server kills itself to reload, causing browser GET failures The current development server seems to use a threaded model that kills and restarts the server thread everytime the code changes. Since it takes some time to startup again, this leaves some downtime between when you hit save and when you can view the page. While such a delay is unavoidable, with this model it manifests itself as an inaccessible page as opposed to (if, e.g. CGI was used) simply a delay. This kind of annoyance is simply deadly for development, since it discourages making small changes. adrian aaronsw   0 0 0 0 0 0
833 2005-11-18 13:39:20 2006-10-07 15:34:04 2019-06-24 00:24:08.609736 Unreviewed closed Translations defect normal   fixed cs trans new_admin updated See attachement. Oh, please mark all %(count)s as plural. Eg.: "This comment was posted by a user who has posted fewer than %(count)s comments:\n" hugo radek   0 0 0 0 0 0
842 2005-11-19 03:20:05 2006-10-07 12:56:34 2019-06-24 00:24:14.317087 Unreviewed closed Core (Other) defect normal   fixed [patch] Technical 500 response broken in the presence of a local variable named "items" The vagaries of namespace overloading... jacob rjwittams   0 1 0 0 0 0
850 2005-11-20 11:29:53 2006-10-07 22:08:21 2019-06-24 00:24:19.469539 Unreviewed closed Documentation defect normal   fixed 'myproject.urls' in tutorial02.txt In tutorial02.txt, it says: {{{ * Edit your ``myproject.urls`` file and uncomment the line below }}} I think it would be clearer to say something like: {{{ * Edit your ``myproject/urls.py`` file and uncomment the line below }}} A minor quibble, but your README suggests reporting such things. jacob daniel@calamity.org.uk   0 0 0 0 0 0
856 2005-11-20 18:11:18 2006-10-07 13:02:12 2019-06-24 00:24:23.339631 Unreviewed closed Translations enhancement normal   fixed new_admin sr (Serbian) translation   hugo Nebojša Đorđević - nesh <nesh@studioquattro.co.yu>   0 0 0 0 0 0
866 2005-11-21 06:59:03 2006-10-07 15:57:59 2019-06-24 00:24:29.874171 Unreviewed closed Core (Other) defect trivial   fixed [patch] django.views.static.serve opens files in text mode django.views.static.serve opens files in text mode, which leads to corrupted binary files on Windows. adrian eugene@lazutkin.com   0 1 0 0 0 0
867 2005-11-21 12:05:56 2006-10-07 13:23:03 2019-06-24 00:24:30.520130 Unreviewed closed Database layer (models, ORM) enhancement trivial master fixed [PATCH] Add new (negation) lookup types (e.g., doesnotstartwith, doesnotcontain, etc.) This proposed patch adds new lookup types to the DB API, allowing negation of existing string-based lookups. (I asked Adrian about it in IRC last night, and he seemed open to suggestions.) I've only done this because I needed the functionality myself, but it seems to me to enhance the completeness of the DB lookup types (and I would have thought it would be a fairly common need.) Seven new lookup types are added: ''inotexact'', ''doesnotcontain''/''idoesnotcontain'', ''doesnotstartwith''/''idoesnotstartwith'', and ''doesnotendwith''/''idoesnotendwith''. The only difference between these lookup types and their normal counterparts, is that these turn into a "NOT LIKE" SQL statement, instead of a "LIKE". I'm not hugely happy with the names (particularly ''inotexact''), so if anyone has better ideas then please change them. (I know they're quite long, but the other lookup keywords seem to be chosen for gramattical correctness/readability rather than succinctness anyway.) I added ''inotexact'' to complement ''iexact'' (as a case-insensitive LIKE), but I seem to have some problems (see below.) Also, there's no need for a negation to ''exact'', since we already have ''ne''. Here's how they look in real life: {{{ >>> polls.get_list() [How much do you like Django?, What's up?, To be or not to be., What to do.] >>> polls.get_list(question__doesnotcontain='To') [How much do you like Django?, What's up?, What to do.] >>> polls.get_list(question__idoesnotcontain='To') [How much do you like Django?, What's up?] >>> polls.get_list(question__doesnotstartwith='what') [How much do you like Django?, What's up?, To be or not to be., What to do.] >>> polls.get_list(question__idoesnotstartwith='what') [How much do you like Django?, To be or not to be.] >>> polls.get_list(question__doesnotendwith='?') [To be or not to be., What to do.] }}} I wanted to add ''inotexact'' to be the complement of ''iexact'' (which should be different than ''ne'', based on case-sensitivity) but it looks like ''ne'' … adrian Drew Amato <drewamato@gmail.com>   0 0 0 0 0 0
868 2005-11-21 15:45:57 2006-10-07 23:55:10 2019-06-24 00:24:31.134389 Unreviewed closed contrib.admin defect normal   fixed broken link for download i can't follow the link for the program adrian carlospdias@uol.com.br   0 0 0 0 0 0
874 2005-11-22 09:18:39 2006-10-07 23:17:03 2019-06-24 00:24:34.986395 Unreviewed closed Generic views defect normal   fixed [patch] Always serve technical_error views as text/html The technical_error_view templates are nowhere near XHTML-compliant, so they should never be served with DEFAULT_CONTENT_TYPE, instead they should explicitly specify {{{text/html}}}. {{{ Index: django/views/debug.py =================================================================== --- django/views/debug.py (revision 571) +++ django/views/debug.py (working copy) @@ -55,7 +55,7 @@ 'settings' : settings_dict, }) - return HttpResponseServerError(t.render(c)) + return HttpResponseServerError(t.render(c), 'text/html') def technical_404_response(request, exception): """ @@ -76,7 +76,7 @@ 'request_protocol' : os.environ.get("HTTPS") == "on" and "https" or "http", 'settings' : dict([(k, getattr(settings, k)) for k in dir(settings) if k.isupper()]), }) - return HttpResponseNotFound(t.render(c)) + return HttpResponseNotFound(t.render(c), 'text/html') def _get_lines_from_file(filename, lineno, context_lines): """ }}} jacob sune.kirkeby@gmail.com   0 1 0 0 0 0
892 2005-11-24 06:39:55 2006-10-07 17:26:24 2019-06-24 00:24:46.645511 Unreviewed closed Template system defect minor   fixed Make TemplateNotFound pages look like the 404's that come of URLConf I really like the debugging info that the 404 pages give. When a template isn't found, it _feels_ like all I need to know is: 1) what template django was looking for 2) what directories it looked in. 3) ideally, whether those directories _exist_ or not (that would be a good indication of a bug) adrian David Ascher <david.ascher@gmail.com>   0 0 0 0 0 0
905 2005-11-25 06:47:06 2006-10-07 17:40:14 2019-06-24 00:24:54.914373 Unreviewed closed Core (Other) enhancement normal   wontfix [patch] Add _pre_set and _post_set hooks to models "set_thingie" methods for many-to-many related objects (as well as "set_thingie_order" and "get_thingie_order" methods) don't trigger _pre_save or _post_save. I needed these hooks so here's a small patch that adds them. {{{ Index: django/core/meta/__init__.py =================================================================== --- /home/andreas/workspace/django_src/django/core/meta/__init__.py (revision 1396) +++ /home/andreas/workspace/django_src/django/core/meta/__init__.py (working copy) @@ -924,6 +960,9 @@ # Handles setting many-to-many relationships. # Example: Poll.set_sites() def method_set_many_to_many(rel_field, self, id_list): + # Run any pre-set hooks. + if hasattr(self, '_pre_set'): + self._pre_set() current_ids = [obj.id for obj in method_get_many_to_many(rel_field, self)] ids_to_add, ids_to_delete = dict([(i, 1) for i in id_list]), [] for current_id in current_ids: @@ -956,6 +995,9 @@ delattr(self, '_%s_cache' % rel_field.name) # clear cache, if it exists except AttributeError: pass + # Run any post-set hooks. + if hasattr(self, '_post_set'): + self._post_set() return True # Handles related-object retrieval. @@ -990,6 +1032,9 @@ # Handles setting many-to-many related objects. # Example: Album.set_songs() def method_set_related_many_to_many(rel_opts, rel_field, self, id_list): + # Run any pre-set hooks. + if hasattr(self, '_pre_set'): + self._pre_set() id_list = map(int, id_list) # normalize to integers rel = rel_field.rel.to m2m_table = rel_field.get_m2m_db_table(rel_opts) @@ -1004,6 +1049,9 @@ db.db.quote_name(rel_opts.object_name.lower() + '_id')) cursor.executemany(sql, [(this_id, i) for i in id_list]) db.db.commit() + # Run any post-set hooks. + if hasattr(self, '_post_set'): + self._post_set() # ORDERING METHODS ######################### @@ -1008,6 +1056,9 @@ # ORDERING METHODS ######################### … adrian andreas@mindpicnic.com   0 1 0 0 0 0
907 2005-11-25 10:53:30 2006-10-07 21:38:08 2019-06-24 00:24:56.222475 Unreviewed closed Documentation defect normal   fixed forms.txt: new_data = place.__dict__ fails for ManyToManyFields {{{new_data = ob.__dict__}}} doesn't work for models with a ManyToManyField. jacob garthk new-admin 0 0 0 0 0 0
908 2005-11-25 11:14:34 2006-10-07 20:37:09 2019-06-24 00:24:56.844707 Unreviewed closed Metasystem defect normal   invalid writing Null instead of the default value to the database in default object manipulator I have a field definition: main_photo = meta.IntegerField('main_photo', default=0, blank=True) and when I'm using generic views, with a template without that field, django tries to write NULL to the database, whereas in my opinion it should put 0 . adrian anonymous   0 0 0 0 0 0
918 2005-11-26 04:56:48 2006-10-07 14:34:45 2019-06-24 00:25:03.079158 Unreviewed closed Translations enhancement normal   fixed update russian (ru) translation   hugo dimas@dial.com.ru   0 0 0 0 0 0
930 2005-11-27 17:54:10 2006-10-07 23:14:03 2019-06-24 00:25:10.654874 Unreviewed closed Metasystem defect normal   duplicate [patch] Leaving out ¨ordering¨ in OneToOne relationship causes bad SQL statement Using Trunk rev-1461: Given the Model Foo: {{{ from django.core import meta # Create your models here. class Bar(meta.Model): class META: admin = meta.Admin() bardata = meta.CharField(maxlength=200) def __repr__(self): return self.bardata class Baz(meta.Model): class META: admin = meta.Admin() bazdata = meta.CharField(maxlength=200) bar = meta.OneToOneField(Bar) def __repr__(self): return self.bazdata }}} When you select ¨baz¨ from the main admin interface: You are greeted by the following: {{{ OperationalError at /admin/foo/bazs/ no such column: foo_bars.id Request Method: GET Request URL: http://127.0.0.1:8080/admin/foo/bazs/ Exception Type: OperationalError Exception Value: no such column: foo_bars.id Exception Location: /usr/lib/python2.4/site-packages/Django-0.90-py2.4.egg/django/core/db/backends/sqlite3.py in execute, line 71 }}} The offending SQL statement seems to be: {{{ SELECT "foo_bazs"."bazdata","foo_bazs"."bar_id" FROM "foo_bazs" ORDER BY "foo_bars"."id" DESC }}} Explicitly including an ¨ordering¨ in the ¨baz¨ class fixes this problem, but it should work properly without one. ALSO: Upon creation of a ¨baz¨, the admin interface of ¨baz¨ shows a label of ¨ID¨ folowed by a dropdown list containing bars followed by what seems to be the PK of said bar. What is the purpose of that number? Is it supposed to be there. Additionally, once a baz is saved, the dropdown list suggests, that corresponding bar for this baz can be changed, but saving the baz with a different bar does not seem to have any effect. russellm EABinGA   0 1 0 0 0 0

Next page

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE "tickets_full" (
        id int primary key,
        created datetime,
        changetime datetime,
        last_pulled_from_trac datetime,
        stage text,
        status text,
        component text,
        type text,
        severity text,
        version text,
        resolution text,
        summary text,
        description text,
        owner text,
        reporter text,
        keywords text,
        easy boolean,
        has_patch boolean,
        needs_better_patch boolean,
        needs_tests boolean,
        needs_docs boolean,
        ui_ux boolean
    );