95 rows where "changetime" is on date 2007-01-17

View and edit SQL

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

changetime (date)

  • 2007-01-17 · 95
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
61 2005-07-18 16:17:34 2007-01-17 22:12:17 2019-06-24 00:15:55.753055 Unreviewed closed contrib.admin enhancement normal master fixed [patch] auth.User admin form shouldn't require people to edit hashes People shouldn't have to enter MD5 hashes in the password field. World Online never used the user form to create users or edit passwords, but now there's a demand for a better form. We can solve it with JavaScript. adrian adrian   0 1 0 0 0 0
65 2005-07-18 16:53:09 2007-01-17 22:12:34 2019-06-24 00:15:58.408997 Unreviewed closed contrib.admin enhancement normal   fixed [i18n] Internationalization and localisation Ability to translate at least Admin UI into another language (using gettext?) and format date / time / numbers according to locale. I am willing to do Dutch, Russian and maybe Hebrew translation :) hugo ksenia@ksenia.nl   0 0 0 0 0 0
81 2005-07-19 06:38:29 2007-01-17 22:12:17 2019-06-24 00:16:08.649183 Unreviewed closed contrib.admin defect major   fixed Setting primary_key=True on an non-integer field isn't yet supported The admin interface appears to want to keep the primary_key numerical, and so breaks if you have set a field as primary_key=True. Model: {{{ class Airfield(meta.Model): fields = ( meta.CharField('code', 'airfield code', maxlength=4, primary_key=True), meta.CharField('name', 'name', maxlength=50), ) admin = meta.Admin( fields = ( (None, {'fields': ('code', 'name')}), ), ) def __repr__(self): return self.name }}} Result from trying to add an item through the admin interface: {{{ There's been an error: Traceback (most recent call last): File "/sw/lib/python2.3/site-packages/django/core/handlers/wsgi.py", line 190, in get_response return callback(request, **param_dict) File "/sw/lib/python2.3/site-packages/django/views/admin/main.py", line 769, in add_stage log.log_action(request.user.id, opts.get_content_type_id(), getattr(new_object, opts.pk.name), repr(new_object), log.ADDITION) File "/sw/lib/python2.3/site-packages/django/models/auth.py", line 293, in _module_log_action e.save() File "/sw/lib/python2.3/site-packages/django/core/meta.py", line 57, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/sw/lib/python2.3/site-packages/django/core/meta.py", line 748, in method_save (opts.db_table, ','.join(field_names), ','.join(placeholders)), db_values) File "/sw/lib/python2.3/site-packages/django/core/db/base.py", line 10, in execute result = self.cursor.execute(sql, params) ProgrammingError: ERROR: invalid input syntax for integer: "EGKR" INSERT INTO auth_admin_log (action_time,user_id,content_type_id,object_id,object_repr,action_flag,change_message) VALUES ('2005-07-19 01:31:40',1,17,'EGKR','Redhill',1,'') }}} adrian jmb@atuin.co.uk   0 0 0 0 0 0
85 2005-07-19 13:47:36 2007-01-17 22:12:17 2019-06-24 00:16:11.208785 Unreviewed closed contrib.admin defect normal   worksforme Admin login doesn't work with Konqueror Logging into admin interface does not work for konqueror, but works for firefox. The console output of django-admin.py runserver: localhost.localdomain - - [19/Jul/2005 08:44:24] "POST /admin/ HTTP/1.1" 302 0 localhost.localdomain - - [19/Jul/2005 08:44:24] "GET /admin/ HTTP/1.1" 200 1638 The login time gets updated in database, but konqueror returns to login page. svn revision 201, Konqueror 3.4.1 adrian hruske@kiberpipa.org konqueror admin 0 0 0 0 0 0
87 2005-07-19 16:39:52 2007-01-17 22:12:17 2019-06-24 00:16:12.421287 Unreviewed closed Database layer (models, ORM) enhancement normal   duplicate [patch] Oracle database support Here's a patch for Oracle support. adrian jrhuggins@thoughtworks.com oracle database db sequence   1 0 0 0  
105 2005-07-20 09:00:38 2007-01-17 22:12:17 2019-06-24 00:16:23.788960 Unreviewed closed contrib.admin enhancement normal   fixed Make collapse class to work in two ways It is really useful to present some fieldsets collapsed in the admin interface and just with one click get them opened. It would be equally useful, once uncollapsed, to have the possibility to collapse them again. In a such way users can better organize the space on their Django admin interface. jacob paolo   0 0 0 0 0 0
122 2005-07-20 21:25:02 2007-01-17 22:12:17 2019-06-24 00:16:34.433787 Unreviewed closed Core (Other) enhancement normal   fixed [patch] Build models using fieldname=FieldClass This is a patch to make fieldname=FieldClass type model definitions possible. It is fully backwards-compatible with the fields=(...) method. The example given in the tutorial could be re-written as such: {{{ from django.core import meta class Poll(meta.Model): question = meta.CharField(maxlength=200) pub_date = meta.DateTimeField('date published') class Choice(meta.Model): ForeignKey = Poll choice = meta.CharField(maxlength=200) votes = meta.IntegerField() }}} Other ways of defining a ForeignKey: {{{ #multiple keys can be used with tuples: ForeignKey = Poll, OtherKey #options can also be used: ForeignKey = Poll, {'edit_inline':True, 'num_in_admin':3} #the attribute name is irrelevant here: anything = ForeignKey(Poll, edit_inline=True, num_in_admin=3) }}} The implementation is quite simple. (or horribly hackish, depending on how you see things.) It simply goes through all of the attributes of the class, and adds all of the instances of 'Field' to the fields list. (after updating their names with the attribute name.) It also processes the ForeignKey field, producing ForeignKeys as needed. Provisions are in place to maintain the order of the Fields. Here is the patch: {{{ Index: django/core/meta.py =================================================================== --- django/core/meta.py (revision 253) +++ django/core/meta.py (working copy) @@ -368,6 +368,40 @@ if not bases: return type.__new__(cls, name, bases, attrs) + # We must refactor the attributes around a little. All Field class instances will be given + # names (as needed) and moved to the fields list. + + attrs["fields"] = attrs.has_key("fields") and list(attrs["fields"]) or [] + + def handle_ForeignKey(obj): + if isinstance(obj, Model): + attrs["fields"].append(ForeignKey(obj)) + elif type(obj) in (list, tuple): + if isinstance(obj[0], ModelBase) and ty… adrian anonymous   0 1 0 0 0 0
180 2005-07-24 20:56:52 2007-01-17 22:12:17 2019-06-24 00:17:11.064693 Unreviewed closed Tools defect normal   fixed request.POST doesn't work in django_admin.py runserver Maybe you should warn people that only tutorial code works with it ;) adrian edgars@way.lv   0 0 0 0 0 0
211 2005-07-27 14:51:25 2007-01-17 22:12:17 2019-06-24 00:17:30.756955 Unreviewed closed Metasystem   trivial   fixed [Patch] Remove edit_inline_type / edit_inline verbosity {{{edit_inline_type}}} and {{{edit_inline}}} are redundant; {{{edit_inline_type != None}}} implies {{{edit_inline=True}}} adrian jacob   0 0 0 0 0 0
230 2005-07-30 09:54:47 2007-01-17 22:12:17 2019-06-24 00:17:42.871160 Unreviewed closed Database layer (models, ORM) defect major 1.0 fixed FloatField with MySQL Backend fails silently If I have a FloatField with a particular precision, and I submit a form that has higher precision than I specified when creating the model, it will fail silently. When I say fail silently, and error is raised but no description is passed out of the validator. An example model : {{{ meta.FloatField('latitude', max_digits=10, decimal_places=7, default=0.0), meta.FloatField('longitude', max_digits=10, decimal_places=7, default=0.0), }}} And then if I have an input that is either more than 10 digits or 7 decimal places, it will fail. I'm not sure where I could insert any rounding off near the validation model. I was thinking of doing it similar to a typecast as in date/time strings. adrian alastair@liquidx.net   0 0 0 0 0 0
238 2005-07-31 04:30:55 2007-01-17 22:12:17 2019-06-24 00:17:47.908120 Unreviewed closed Database layer (models, ORM) defect normal 1.0 fixed Database tests fail with sqlite I get the following failures when running the database tests (runtests.py) I am using SQLite3 with pysqlite2 v2.0.3 on OS X and Python 2.4 {{{ Got 12 errors: 'basic' model: API test failed ============================== Code: 'a.id' Line: 13 Expected: '1L\n' Got: '1\n' 'custom_methods' model: API test failed ======================================= Code: 'a.get_articles_from_same_day_1()' Line: 11 Expected: '[Beatles reunite]\n' Got: '[]\n' 'custom_methods' model: API test failed ======================================= Code: 'a.get_articles_from_same_day_2()' Line: 13 Expected: '[Beatles reunite]\n' Got: '[]\n' chuck:~/django/tests cthier$ python runtests.py Got 12 errors: 'basic' model: API test failed ============================== Code: 'a.id' Line: 13 Expected: '1L\n' Got: '1\n' 'custom_methods' model: API test failed ======================================= Code: 'a.get_articles_from_same_day_1()' Line: 11 Expected: '[Beatles reunite]\n' Got: '[]\n' 'custom_methods' model: API test failed ======================================= Code: 'a.get_articles_from_same_day_2()' Line: 13 Expected: '[Beatles reunite]\n' Got: '[]\n' 'custom_methods' model: API test failed ======================================= Code: 'b.get_articles_from_same_day_1()' Line: 15 Expected: '[Area man programs in Python]\n' Got: '[]\n' 'custom_methods' model: API test failed ======================================= Code: 'b.get_articles_from_same_day_2()' Line: 17 Expected: '[Area man programs in Python]\n' Got: '[]\n' 'lookup' model: API test failed =============================== Code: 'articles.get_count()' Line: 26 Expected: '4L\n' Got: u'4\n' 'lookup' model: API test failed =============================== Code: 'articles.get_count(pub_date__exact=datetime(2005, 7, 27))' Line: 28 Expected: '2L\n' Got: u'2\n' 'lookup' model: API test failed =============================== Code: "articles.get_count(headline__startswith='Blah blah')" Line:… jacob cthier@gmail.com sqlite 0 0 0 0 0 0
242 2005-08-01 01:28:37 2007-01-17 22:12:17 2019-06-24 00:17:50.422624 Unreviewed closed contrib.admin defect normal   fixed Traceback when viewing tag docs. going to /admin/doc/tags/ results in the following traceback: {{{ 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/decorators/cache.py", line 27, in _check_cache response = view_func(request, *args, **kwargs) File "/usr/lib/python2.4/site-packages/django/views/admin/doc.py", line 71, in template_tag_index return HttpResponse(t.render(c)) File "/usr/lib/python2.4/site-packages/django/core/template.py", line 116, in render return self.nodelist.render(context) File "/usr/lib/python2.4/site-packages/django/core/template.py", line 437, in render bits.append(node.render(context)) File "/usr/lib/python2.4/site-packages/django/core/template_loader.py", line 97, in render return compiled_parent.render(context) File "/usr/lib/python2.4/site-packages/django/core/template.py", line 116, in render return self.nodelist.render(context) File "/usr/lib/python2.4/site-packages/django/core/template.py", line 437, in render bits.append(node.render(context)) File "/usr/lib/python2.4/site-packages/django/core/template_loader.py", line 79, in render compiled_parent = self.get_parent(context) File "/usr/lib/python2.4/site-packages/django/core/template_loader.py", line 74, in get_parent return get_template_from_string(load_template_source(parent, self.template_dirs)) File "/usr/lib/python2.4/site-packages/django/core/template_loader.py", line 20, in get_template_from_string return template.Template(source) File "/usr/lib/python2.4/site-packages/django/core/template.py", line 107, in __init__ self.nodelist = compile_string(template_string) File "/usr/lib/python2.4/site-packages/django/core/template.py", line 122, in compile_string return parser.parse() File "/usr/lib/python2.4/site-packages/django/core/templ… jacob mmarshall   0 0 0 0 0 0
267 2005-08-04 12:56:42 2007-01-17 22:12:17 2019-06-24 00:18:06.112713 Unreviewed closed contrib.admin defect normal   fixed admin redirect when "save and continue editing" uses object.id When using the "save and continue editing" call, the code makes use of a 'id' attribute in line 769: return HttpResponseRedirect(post_url_continue % new_object.id) If the model doesn't have an 'id' attribute but uses primary_key=True on some field, this doesn't work. Either disable the "save and continue editing" button on models without a 'id' attribute or use the pk_name field. adrian hugo <gb@bofh.ms>   0 0 0 0 0 0
270 2005-08-04 14:33:49 2007-01-17 22:12:17 2019-06-24 00:18:07.985690 Unreviewed closed contrib.admin defect normal   fixed Patch: edit_inline and default on fields don't work together The empty lines in the edit_inline table (I am using the TABULAR format) don't work nicely together - the empty fields are not set to default values when I define those in the models. Either the system should use the default values when a field that can't be blank is passed in as blank or it should initialize the field to the default values (the latter being more consistent I think). At the moment you will get SQL exceptions if you don't enter data for new lines where fields are defined as NOT NULL in the database. adrian hugo <gb@bofh.ms>   0 0 0 0 0 0
327 2005-08-15 19:30:16 2007-01-17 22:12:17 2019-06-24 00:18:45.310817 Unreviewed closed Metasystem defect normal   fixed Metasystem should support more than one ManyToMany relationship with the following model: {{{ #!python class User(meta.Model): fields = ( meta.CharField('email', maxlength=200), ) class Book(meta.Model): fields = ( meta.CharField('title', maxlength=200), meta.ManyToManyField(User, rel_name="owner", related_name="owns"), meta.ManyToManyField(User, rel_name="seeker", related_name="seeks"), ) }}} I am getting only one relation exposed in the generated api: {{{ #!python >>> from django.models.testmany import * >>> u = users.User(email="asd") >>> dir(u) ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__getattribute__' , '__hash__', '__init__', '__metaclass__', '__module__', '__new__', '__reduce__' , '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__weakref__', '_meta', 'delete', 'email', 'get_owns', 'get_owns_count', 'get_owns_list', 'id', 'save', 'set_books'] >>> }}} also book gets APIs for getting books "owner" and "seeker" relationships, but there is no corresponding "set_owners" and "set_seekers" functions, only a set_users: {{{ #!python >>> b = books.Book(title="asdads") >>> dir(b) ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__getattribute__' , '__hash__', '__init__', '__metaclass__', '__module__', '__new__', '__reduce__' , '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__weakref__', '_meta', 'delete', 'get_owner_list', 'get_seeker_list', 'id', 'save', 'set_users', 'titl e'] >>> }}} I am using Python 2.3, latest django from SVN. adrian upadhyay@gmail.com   0 0 0 0 0 0
329 2005-08-15 21:12:52 2007-01-17 22:12:17 2019-06-24 00:18:46.557238 Unreviewed closed contrib.syndication defect normal   fixed RSS framework needs an easier interface GarthK came up with a cool simpler interface to rss.FeedConfiguration: http://django.pastebin.com/337395 We should use it, or something close to it. adrian jacob   0 0 0 0 0 0
337 2005-08-17 04:29:49 2007-01-17 22:12:17 2019-06-24 00:18:51.689508 Unreviewed closed Generic views defect major   fixed DateTime fields don't work in the generic views fieldname_date and fieldname_time aren't set on the data dictionary, so the form fields come up blank And similarly, jacobkm said that this also needs the server to recombine these fields back into plain old fieldname on the POST-side. jacob mlambert@gmail.com new-admin 0 0 0 0 0 0
338 2005-08-17 04:33:48 2007-01-17 22:12:17 2019-06-24 00:18:52.300438 Unreviewed closed Generic views defect normal   fixed ManyToMany fields don''t work in the generic views Given a model like: class A(meta.Model): ... class B(meta.Model): fields = ( meta.ManyToManyField(A) ) then when using a {{form.as}} in the template, the selection box (the list of all A's) is filled out correctly, but the list of A's related to B is not correctly filled out. SelectMultipleField does take in a data parameter, and appears to correctly add selected="selected" to the <option>s, but there is no data for "as" in the data dict of fields. Likely this just needs to be setup properly somewhere. Don't know if/what anything special needs to be done on the POST-submission side of things. jacob mlambert@gmail.com   0 0 0 0 0 0
349 2005-08-17 20:27:50 2007-01-17 22:12:17 2019-06-24 00:18:59.457071 Unreviewed closed contrib.admin   normal   fixed [patch] Bad styling in Admin interface Both Internet Explorer 6 and Firefox 1.0.6 (on PC) have visualization problems with Admin interface. 1) FF doesn't show default button (Save in my example). It draws it white on white making text invisible. Screenshot: http://www.lazutkin.com/ff.jpg 2) IE shows buttons but as far as I can tell while it is not shown correctly, it is visible and usable. The bigger problem is incomplete background of collapsed fieldset ("Date information" in my example). Screenshot: http://www.lazutkin.com/ie6.jpg 3) Both browsers have almost invisible text for collapsed fieldsets. See examples above. jacob eugene@lazutkin.com   0 1 0 0 0 0
374 2005-08-19 19:20:24 2007-01-17 22:12:17 2019-06-24 00:19:15.340400 Unreviewed closed contrib.admin defect major   fixed [patch] Filtering BooleanField does not work with SQLite When Django wants to filter on a bool, it passes the parameter value as 'True' or 'False', whereas SQLite expects a 1/0 or '1'/'0' or even a proper Python True/False. But the string containing 'True'/'False' is lost on it. I am not sure where to address this in the code. The sqlite adapted does not know about models, so main might be the best place for logic to look for backend mappings (which need to be added obviously.) Trivially, the following hack/patch gets it working for sqlite. {{{ Index: main.py =================================================================== --- main.py (revision 537) +++ main.py (working copy) @@ -251,7 +251,7 @@ lookup_val = request.GET.get(lookup_kwarg, None) lookup_val2 = request.GET.get(lookup_kwarg2, None) filter_template.append('<h3>By %s:</h3><ul>\n' % f.verbose_name) - for k, v in (('All', None), ('Yes', 'True'), ('No', 'False')): + for k, v in (('All', None), ('Yes', '1'), ('No', '0')): filter_template.append('<li%s><a href="%s">%s</a></li>\n' % \ (((lookup_val == v and not lookup_val2) and ' class="selected"' or ''), get_query_string(params, {lookup_kwarg: v}, [lookup_kwarg2]), k)) }}} adrian davidschein@alumni.tufts.edu sqlite, filters, booleanfield 0 1 0 0 0 0
381 2005-08-21 03:08:38 2007-01-17 22:12:17 2019-06-24 00:19:19.863868 Unreviewed closed Documentation defect normal 1.0 fixed Tutorial 1, the name of the file to modify is missing At the " Let's fix that by editing the polls model and adding a __repr__() method to both Poll and Choice:" step, the file to modify is not specifically called out and requires the user who, at this point, is pretty clueless, to search back through the tutorial to find out exactly where this code is to be inserted. The module to be modified should be specifically noted (Edit the polls/models/polls.py file). adrian ssteiner tutorial1, polls.py 0 0 0 0 0 0
383 2005-08-21 13:07:46 2007-01-17 22:12:17 2019-06-24 00:19:21.183001 Unreviewed closed Documentation defect normal 1.0 fixed Tutorial 2, 'clearing' field to signify deletion of object doesn't From Tutorial 2: " This tells Django: "When you edit a Choice on the Poll admin page, the 'choice' and 'votes' fields are required. The presence of at least one of them signifies the addition of a new Choice object, and clearing at least one of them signifies the deletion of that existing Choice object." " That's not what happens. If you empty the choice or votes field, you are instead given a red exclamation error stating that "This field is required." adrian ssteiner delete, tutorial 2 0 0 0 0 0 0
384 2005-08-21 13:18:08 2007-01-17 22:12:17 2019-06-24 00:19:21.811644 Unreviewed closed contrib.admin enhancement normal 1.0 duplicate A delete button next to 'many' in admin might be more intuitive As a follow up to my previous report #383, a delete button next to the inline edited items (in the tutorial, the Choices for a particular Poll) would be much cleaner and more intuitive than the 'leave the field blank to delete' approach. Build 541, OS X, Python 2.4.1, MySQL 4.1.12 adrian ssteiner delete, tutorial2, admin 0 0 0 0 0 0
389 2005-08-21 23:09:10 2007-01-17 22:12:34 2019-06-24 00:19:25.108517 Unreviewed closed contrib.admin enhancement normal   invalid [patch] admin interface only sorts by first ordering field I have added an ordering attribute to a model with two field names: ordering = ["crate", "card"] I find that get_list() on the model sorts by "crate", then "card", as I expect. However, when I look at the list of objects in the admin interface, it only sorts by "crate" and not both "crate" and "card". adrian volsung@mailsnare.net ordering 0 1 0 0 0 0
435 2005-08-30 08:38:43 2007-01-17 22:12:17 2019-06-24 00:19:54.908796 Unreviewed closed Core (Other) defect normal 1.0 worksforme Exception thrown out when doing do_html2python I create ad DataTimeField type filed in model file, and show it in a text box on web page. but when I invoke do_html2python before saving the changes to postgresql, a exception was thrown out "There's been an error: {{{ Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/django-1.0.0-py2.3.egg/django/core/handlers/base.py", line 64, in get_response response = callback(request, **param_dict) File "/usr/lib/python2.3/site-packages/liveweb/bo/club.py", line 68, in save club_manip.do_html2python(club_changes) File "/usr/lib/python2.3/site-packages/django-1.0.0-py2.3.egg/django/core/formfields.py", line 98, in do_html2python new_data.setlist(field.field_name, [field.__class__.html2python(None)]) File "/usr/lib/python2.3/site-packages/django-1.0.0-py2.3.egg/django/core/formfields.py", line 654, in html2python time_tuple = time.strptime(data, '%H:%M:%S') File "/usr/lib/python2.3/_strptime.py", line 423, in strptime found = format_regex.match(data_string) TypeError: expected string or buffer". }}} Seems that django look it as time field? And this only happend after updating django today(2005.8.30). adrian Leo html2python 0 0 0 0 0 0
440 2005-08-30 19:59:52 2007-01-17 22:12:17 2019-06-24 00:19:58.132047 Unreviewed closed contrib.admin defect normal   fixed [patch] maxlength incorrectly checked for international characters in utf-8 In django.core.formfields TextField.isValidLength checks length very naively: if data and self.maxlength and len(data) > self.maxlength: Since sane applications tend to use utf-8 for web output 'data' passed to this method is also in utf-8. This means that len(data) actually gives more bytes than characters for any non-ascii input. adrian Maniac@SoftwareManiacs.Org   0 1 0 0 0 0
447 2005-09-01 06:55:42 2007-01-17 22:12:17 2019-06-24 00:20:02.566134 Unreviewed closed contrib.syndication enhancement normal   fixed [PATCH] Add pubdate elements to RSS feeds. The attached patch adds a get_pubdate_cb to the RSS feed configuration that allows the resulting feed to have pubdate elements. adrian benno@jeamland.net   0 0 0 0 0 0
451 2005-09-02 02:49:04 2007-01-17 22:12:17 2019-06-24 00:20:05.074481 Unreviewed closed Database layer (models, ORM) defect normal 1.1 invalid There should be OneToManyField support We can use OneToOne, ManyToOne, ManyToMany, it will be nicer if we can use OneToMany. adrian leo@exoweb.net Field 0 0 0 0 0 0
452 2005-09-02 02:52:22 2007-01-17 22:12:17 2019-06-24 00:20:05.699179 Unreviewed closed Metasystem defect normal   fixed Two ManyToManyFields to the same object should give that other object two API methods, not one I create two m2mfields which reference to the same class, such as this: {{{ class Name(Model): name = CharField (maxlength=50) def __repr__(self): return self.name class People(Model): first_name = ManyToManyField (Name) last_name = ManyToManyField (Name) def __repr__(self): return self.first_name }}} I get two tables in DB: app_peoples_first_name and app_peoples_last_name And i also get three apis: set_first_name, set_last_name and get_name_list while i think there should be two gets here: get_first_name_list and get_last_name_list. adrian leo@exoweb.net   0 0 0 0 0 0
463 2005-09-06 06:37:45 2007-01-17 22:12:17 2019-06-24 00:20:12.597866 Unreviewed closed Core (Other) defect major   duplicate [patch] new mysql.DatabaseWrapper - solving multiple MySQL problems This patch solves a problem of multiple errors while hosting Django app with FastCGI and MySQL. I was running it for 24 hours without any problems. Some highlights: 1) Django uses the same connection for all threads. It breaks MySQL leading to numerous random CR_SERVER_GONE_ERROR and CR_SERVER_LOST errors. Every independently talking entity should have its own connection. I've implemented mysql.!DatabaseWrapper using dictionary to keep one connection per thread. 2) During request for new connection, old connections are examined. If thread is gone, its connection is closed and garbage-collected. 3) MySQL connection can time-out depending on MySQL server settings. The standard practice is to ping() stored connections before use. My implementation does it for every retrieved connection. Some potential problems: 1) I rename threads, which request connections, to make them unique. If some other code relies on thread names, it may be broken. 2) 24 hour testing is not enough for production quality code. Changes are very small and compact. They can be verified manually. But still it is not a full blown system test under different hosting scenarios. 3) Please take a look at the code and verify that it is optimal --- my python experience is limited, I could implement something in sub-optimal way. The patch: {{{ Index: mysql.py =================================================================== --- mysql.py (revision 629) +++ mysql.py (working copy) @@ -11,6 +11,9 @@ from MySQLdb.constants import FIELD_TYPE import types +import thread, threading +from sets import Set + DatabaseError = Database.DatabaseError django_conversions = conversions.copy() @@ -23,32 +26,78 @@ class DatabaseWrapper: def __init__(self): - self.connection = None + self.connections = {} + self.threads = Set() + self.lock = thread.allocate_lock() self.queries = [] + + def _get_connection(self): + self.lock.acquire() + try:… adrian eugene@lazutkin.com   0 1 0 0 0 0
469 2005-09-07 13:00:00 2007-01-17 22:12:17 2019-06-24 00:20:16.308645 Unreviewed closed contrib.admin defect normal   fixed Admin changelist assumes ForeignKey related object has ordering set Here follows a small part of the model I use in conjunction with a mysql database. I haven't switched anything, so my tables are created as MyISAM tables. (Sadly, I also need them to be MyISAMs.) As the foreign key "emulation" of Django works fine for my application so far, I just think I can stick to it even if that sounds like horror to real database guys. :) But my problem is, when I hit the order "button" in the admin interface list view of the agencies table, I get the following Python stack trace. Do be more precise, this only happens when I try toorder the list using a field, that I referenced by a ForeignKey. Is this a bug or what I am doing wrong? {{{ There's been an error: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 64, in get_response response = callback(request, **param_dict) File "/usr/lib/python2.4/site-packages/django/views/admin/main.py", line 134, in change_list lookup_order_field = '%s.%s' % (f.rel.to.db_table, f.rel.to.ordering[0]) IndexError: list index out of range }}} ==== MODEL Excerpt ==== {{{ class Agencytype(meta.Model): name = meta.CharField(maxlength=32) creation_date = meta.DateTimeField(auto_now_add=True) last_modified = meta.DateTimeField(auto_now=True) def __repr__(self): return self.name class META: admin = meta.Admin( list_display = ( "name", "creation_date", "last_modified" ) ) class Agency(meta.Model): name = meta.CharField(maxlength=32) type = meta.ForeignKey(Agencytype) creation_date = meta.DateTimeField(auto_now_add=True) last_modified = meta.DateTimeField(auto_now=True) def __repr__(self): return self.name class META: unique_together = (("name", "type"),) admin = meta.Admin( list_display = ( … adrian oliver.andrich@gmail.com   0 0 0 0 0 0
472 2005-09-07 19:29:05 2007-01-17 22:12:17 2019-06-24 00:20:18.239134 Unreviewed closed Documentation defect normal   fixed ImageField description should include link to pitfall or FAQ In http://www.djangoproject.com/documentation/model_api/ , the ImageField description should add a link to either http://www.djangoproject.com/documentation/faq/#how-do-i-use-image-and-file-fields or http://code.djangoproject.com/wiki/DataModelPitfalls . jacob GomoX <gomo AT datafull DOT com>   0 0 0 0 0 0
501 2005-09-14 03:03:10 2007-01-17 22:12:17 2019-06-24 00:20:36.682377 Unreviewed closed contrib.syndication enhancement minor 0.90 fixed {{ block.super }} returns value of the most remote ancestor {{ block.super }} always returns value of the most remote ancestor. Example: Template A: {{{ {% block abc %}A{% endblock %} }}} Template B: {{{ {% extends "A" %} {% block abc %}{{ block.super }}B{% endblock %} }}} Template C: {{{ {% extends "B" %} {% block abc %}{{ block.super }}C{% endblock %} }}} Template A will be rendered as "A", B as "AB", C as '''"AC"'''. I assume the original intention was to implement a stack of parents, so C would be rendered as "ABC". At least it is documented that way. template_loader.py doesn't implement stacking order for blocks. Instead it defines two member variables in BlockNode: nodelist, which holds current nodes, and original_node_list, which holds nodes of the farthest ancestor. adrian eugene@lazutkin.com   0 0 0 0 0 0
510 2005-09-14 16:29:24 2007-01-17 22:12:17 2019-06-24 00:20:42.411849 Unreviewed closed contrib.admin enhancement major   fixed [patch] Defend admin against CSRF attacks Django's admin pages are curently vulnerable to CSRF attacks, as described here: http://www.squarefree.com/securitytips/web-developers.html#CSRF All POST forms in the admin should contain a hidden field with a shared secret that can be used to confirm the origin of the form. adrian Simon Willison   0 1 0 0 0 0
512 2005-09-14 19:02:19 2007-01-17 22:12:17 2019-06-24 00:20:43.683699 Unreviewed closed contrib.admin defect normal   fixed Admin list_filter doesn't work for BooleanField with MySQL If list_filter is used on a boolean field it always shows all records which has field=False whatever i select "yes" or "no". "All" does work. I was able to reproduce this bug in the admin/auth/users view. When using postgresql on the same machine the filter works as expected. If you need more informations let me know. This is with mysql-server 4.1.12-1ubuntu1 python2.4-mysqldb 1.2.1c3-1ubuntu1 adrian django@arne.gellhaus.de   0 0 0 0 0 0
514 2005-09-15 03:39:53 2007-01-17 22:12:17 2019-06-24 00:20:44.947156 Unreviewed closed contrib.admin defect normal 1.0 fixed [patch] Traceback in admin when adding an object containing a OneToOneField. Working with objects that have a OneToOneField in the admin works fine when you click on "change" and then select one from the list. However, if you click on "Add", saving the object results in a traceback similar to this (with the rel_name of 'node'): {{{ There's been an error: Traceback (most recent call last): <snip> File "/usr/lib/python2.4/site-packages/django/core/meta/fields.py", line 40, in manipulator_validator_unique old_obj = opts.get_model_module().get_object(**{'%s__exact' % f.name: field_data}) <snip> TypeError: got unexpected keyword argument 'node__exact' }}} A trivial patch solves the problem: {{{ Index: django_src/django/core/meta/fields.py =================================================================== --- django_src/django/core/meta/fields.py (revision 642) +++ django_src/django/core/meta/fields.py (working copy) @@ -37,7 +37,7 @@ def manipulator_validator_unique(f, opts, self, field_data, all_data): "Validates that the value is unique for this field." try: - old_obj = opts.get_model_module().get_object(**{'%s__exact' % f.name: field_data}) + old_obj = opts.get_model_module().get_object(**{'%s__id__exact' % f.name: field_data}) except ObjectDoesNotExist: return if hasattr(self, 'original_object') and getattr(self.original_object, opts.pk.column) == getattr(old_obj, opts.pk.column): }}} MWM adrian mmarshall   0 1 0 0 0 0
527 2005-09-19 13:26:31 2007-01-17 22:12:17 2019-06-24 00:20:53.405751 Unreviewed closed Metasystem defect critical   fixed OneToOne relations are broken since new model style released {{{ #================================================================================ # Document #================================================================================ class Document(meta.Model): #MAIN FIELDS doc_date = meta.DateField('date') doc_subj = meta.CharField('subj', maxlength=250) doc_text = meta.TextField('text', maxlength=250, blank=True) #================================================================================ # Letter #================================================================================ class Letter(meta.Model): #IS LETTER document = meta.OneToOneField(Document) doc_number = meta.CharField('doc number', maxlength=20) # from and to ForeignKeys were skipped #================================================================================ # Order #================================================================================ class Order(meta.Model): #IS ORDER letter = meta.OneToOneField(Letter) order_date_plan = meta.DateField('order date plan') order_date_fakt = meta.DateField('order date fakt', blank=True, null=True) }}} Document can be simple or Letter, and Document that is Letter can be an Order or not. This example works fine with old model syntax. With a new-style model syntax any relations between Letter - Order are fail. Document - Letter relation works fine. {{{ >>> from django.models.main import * >>> d = documents.get_object(pk=21) >>> l = letters.get_object(pk=21) >>> o = orders.get_object(pk=21) >>> d.get_letter() Letter 21 >>> l.get_document() Document 21 }}} OK Now try Letter - Order {{{ >>> l.get_order() Traceback (most recent call last): File "<stdin>", line 1, in ? File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\utils\functi onal.py", line 3, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.item s())) File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\meta\__ … adrian mordaha   0 0 0 0 0 0
529 2005-09-19 16:46:12 2007-01-17 22:12:17 2019-06-24 00:20:54.661179 Unreviewed closed Contrib apps enhancement critical   fixed Add support for GenericForeignKey sopel had the idea of a {{{GenericForeignKey}}}, which would abstract the concept of "content_type_id" and "object_id". Basically, it'd be a way to relate an object to "one of several types of objects." For example, we currently have this in the {{{Comment}}} model: {{{ #!python class Comment(meta.Model): # ... content_type = meta.ForeignKey(core.ContentType) object_id = meta.IntegerField() }}} That could be replaced with this: {{{ #!python class Comment(meta.Model): # ... content_object = meta.GenericForeignKey() }}} With that, {{{Comment}}} objects would get an automatic {{{get_content_object()}}} method, which would return whatever object was related, regardless of its type. This is a messy problem, so we'd have to figure out a couple of loose ends: * Does every other object in the system get a {{{get_comment_list}}} method? * Do we enforce referential integrity, so that, for example, all the appropriate comments would be deleted if a story was deleted? adrian adrian rthml tab space editor js 0 0 0 0 0 0
558 2005-09-26 05:00:10 2007-01-17 22:12:17 2019-06-24 00:21:14.308479 Unreviewed closed Core (Management commands) defect major magic-removal fixed jnefpnev Subclassed modules should get their own {{{module_name}}}, calculated from their class name. They currently use the {{{module_name}}} from the parent class, which is a bug. adrian adrian jnefpnev 0 0 0 0 0 0
573 2005-09-29 00:26:51 2007-01-17 22:12:17 2019-06-24 00:21:23.629767 Unreviewed closed contrib.admin enhancement normal   fixed [patch] add plus sign to ManyToMany fields in admin This patch adds the "add-another" button to ManyToMany fields as well as ManyToOne. Makes life a tad easier :) {{{ Index: django/views/admin/main.py =================================================================== --- django/views/admin/main.py (revision 712) +++ django/views/admin/main.py (working copy) @@ -752,7 +752,7 @@ # fields with relationships to editable objects get an "add another" link, # but only if the field doesn't have raw_admin ('cause in that case they get # the "add" button in the popup) - elif field.rel and isinstance(field.rel, meta.ManyToOne) and field.rel.to.admin: + elif field.rel and isinstance(field.rel, meta.ManyToOne) or isinstance(field.rel, meta.ManyToMany) and field.rel.to.admin: t.append('{%% if perms.%s.%s %%}' % (field.rel.to.app_label, field.rel.to.get_add_permission())) t.append(' <a href="../../../%s/%s/add/" class="add-another" id="add_%s" onclick="return showAddAnotherPopup(this);">' % \ (field.rel.to.app_label, field.rel.to.module_name, field_id)) }}} adrian hp@syntomax.com   0 1 0 0 0 0
581 2005-09-30 14:00:09 2007-01-17 22:12:17 2019-06-24 00:21:28.684026 Unreviewed closed contrib.syndication enhancement minor   invalid RSS framework needs unit tests SSIA jacob jacob   0 0 0 0 0 0
584 2005-10-02 16:48:10 2007-01-17 22:12:17 2019-06-24 00:21:30.543496 Unreviewed closed Metasystem defect major   duplicate [patch] fix many-to-many with non-default pks. I found that many to many fields do not work when the primary keys of the objects are not default. As I'm working in the new-admin branch and this is an obvious fix, I thought I'd point it up here so it can be applied to trunk. {{{ def method_set_related_many_to_many(rel_opts, rel_field, self, id_list): id_list = map(int, id_list) # normalize to integers rel = rel_field.rel.to m2m_table = rel_field.get_m2m_db_table(rel_opts) this_id = getattr(self, self._meta.pk.column) cursor = db.db.cursor() delete_stmt = "DELETE FROM %s WHERE %s = %%s" % (m2m_table, rel.pk.column) cursor.execute(delete_stmt, [this_id]) insert_stmt = "INSERT INTO %s (%s, %s) VALUES (%%s, %%s)" % (m2m_table, rel.pk.column, rel_opts.pk.column) cursor.executemany(insert_stmt, [(this_id, i) for i in id_list]) db.db.commit() }}} adrian rjwittams   0 1 0 0 0 0
669 2005-10-20 23:11:12 2007-01-17 22:12:17 2019-06-24 00:22:24.081457 Unreviewed closed Metasystem defect minor 0.91 fixed site table there is currently no way to edit the site table from the admin gui. I also have a question if this table would be better as a setting in the settings file, and if it should be a URL prefix, not just a domain name. the reasoning is as follows: 1. you would be having a single app running in product/state/dev environments all with different hostnames (possibly different site-ids) 2. it is 'another' thing to remember when you change your hostname that your site runs on. 3. some sites would be hosted 'inside' a domain.. ie.. you could have one application running as http://foobar.example.com/blah and another seperate one on http://foobar.example.com/zxy the current site table doesn't allow for this. (or even redirecting to foobar.example.com I think) another option would be to use the 'host:' header on the incoming request, and being able to just use that. having this as the 'default' option would be the one offering the least surprise. I would think adrian ian@holsman.net   0 0 0 0 0 0
738 2005-11-06 17:49:51 2007-01-17 22:12:17 2019-06-24 00:23:08.078716 Unreviewed closed Translations defect normal 1.0 fixed cs translation slightly modified Cleaned up plural forms and a few fuzzy strings. I am all +10 to have commit rights to put modified translations into the subv. rep. I am not sure about .mo files, though. adrian radek svarz   0 0 0 0 0 0
739 2005-11-06 18:09:38 2007-01-17 22:12:17 2019-06-24 00:23:08.704626 Unreviewed closed Documentation task normal 1.0 fixed tutorial and docs translations I believe that next step in i18n is to have and maintain tutorial translations. I don't know, what are the sources of tutorial texts (website? .txt files?) But I think that we should provide both forms translated. In the filesystem we could use locale code therefore I propose following structure in /django/docs: ./en all current files in english ./cs some translated files in czech ./de some translated files in german ... I am not sure about the djangoproject website yet (so it's up to you), but it would surely prove the framework to be i18n friendly. jacob radek <translate@svarz.cz>   0 0 0 0 0 0
740 2005-11-06 21:00:52 2007-01-17 22:12:17 2019-06-24 00:23:09.360312 Unreviewed closed Core (Other) defect major 1.0 fixed translation middleware not working on win xp In translation.py there is used split('/') for splitting path. This does not work on Win systems. Patch: {{{ Index: C:/Python24/Lib/site-packages/django/utils/translation.py =================================================================== --- C:/Python24/Lib/site-packages/django/utils/translation.py (revision 1092) +++ C:/Python24/Lib/site-packages/django/utils/translation.py (working copy) @@ -338,7 +338,7 @@ # filename, because otherwise we might incorrectly # report de_DE if we only have de available, but # did find de_DE because of language normalization - lang = langfile[len(globalpath):].split('/')[1] + lang = langfile[len(globalpath):].split(os.path.sep)[1] _accepted[accept] = lang return lang }}} Btw. I have found use of split('/') in anothers files aswell: c:\Python24\Lib\site-packages\django\middleware\common.py c:\Python24\Lib\site-packages\django\parts\media\photos.py c:\Python24\Lib\site-packages\django\views\static.py adrian radek <translate@svarz.cz>   0 0 0 0 0 0
742 2005-11-06 23:12:56 2007-01-17 22:12:17 2019-06-24 00:23:10.599500 Unreviewed closed Core (Other) defect major 1.0 fixed history raises error in datetime while using non english language I slightly polished dateformat.py, which was the reason of rasing error in Admin/history, when using different locale settings. Patch: {{{ Index: C:/Python24/Lib/site-packages/django/utils/dateformat.py =================================================================== --- C:/Python24/Lib/site-packages/django/utils/dateformat.py (revision 1092) +++ C:/Python24/Lib/site-packages/django/utils/dateformat.py (working copy) @@ -14,6 +14,7 @@ from django.utils.dates import MONTHS, MONTHS_AP, WEEKDAYS from django.utils.tzinfo import LocalTimezone from calendar import isleap +from calendar import monthrange import re, time re_formatchars = re.compile(r'(?<!\\)([aABdDfFgGhHiIjlLmMnNOPrsStTUwWyYzZ])') @@ -124,10 +125,6 @@ def I(self): "'1' if Daylight Savings Time, '0' otherwise." - raise NotImplementedError - - def I(self): - "'1' if Daylight Savings Time, '0' otherwise." if self.timezone.dst(self.data): return '1' else: @@ -185,7 +182,8 @@ def t(self): "Number of days in the given month; i.e. '28' to '31'" - raise NotImplementedError + num = monthrange(self.data.year, self.data.month)[1] + return '%02d' % num def T(self): "Time zone of this machine; e.g. 'EST' or 'MDT'" }}} adrian radek <translate@svarz.cz>   0 0 0 0 0 0
801 2005-11-15 14:55:41 2007-01-17 22:12:17 2019-06-24 00:23:48.061243 Unreviewed closed contrib.comments defect normal   invalid contrib.comments seems a bit "unready" There are parts in django.contrib.comments that just don't look like it's fully coded. One thing that springs to mind is the support for extra_kwargs in the CommentListNode class, which is missing any way of passing this from the DoCommentList function - you can't create any extra_kwargs. Another is the approved and is_public bools that are avaialable, but never tested (I think at least the is_public should be taken into account with the get_comment_count and get_comment_list tags). Then there is the fact that the CommentListNode class allows extra_kwargs, but the CommentCountNode doesn't - so even if the tags would allow to pass additional keyword arguments for lookup, the list would respect them, while the count wouldn't. Maybe this should be fleshed out a bit more before 1.0 ;-) adrian hugo   0 0 0 0 0 0
883 2005-11-23 11:45:12 2007-01-17 22:12:17 2019-06-24 00:24:40.776424 Unreviewed closed Template system defect major master duplicate Problems with international date handling The code: {{{ {% load i18n %} {% blocktrans with object.pub_date|date:_("DATETIME_FORMAT") as date %}Published on {{ date }}{% endblocktrans %} }}} Spits out: {{{ AttributeError at /category/xml/ 'str' object has no attribute 'day' Request Method: GET Request URL: http://localhost/category/xml/ Exception Type: AttributeError Exception Value: 'str' object has no attribute 'day' Exception Location: C:\Dev\Python24\lib\site-packages\django\utils\dateformat.py in d, line 114 }}} Trace snip: {{{ ... C:\Dev\Python24\lib\site-packages\django\utils\dateformat.py in d 107. self.data = dt 108. self.timezone = getattr(dt, 'tzinfo', None) 109. if hasattr(self.data, 'hour') and not self.timezone: 110. self.timezone = LocalTimezone(dt) 111. 112. def d(self): 113. "Day of the month, 2 digits with leading zeros; i.e. '01' to '31'" 114. return '%02d' % self.data.day #Here we get the error 115. 116. def D(self): 117. "Day of the week, textual, 3 letters; e.g. 'Fri'" 118. return WEEKDAYS[self.data.weekday()][0:3] 119. 120. def F(self): }}} I was able to reproduce the error with '''LANGUAGE_CODE''' set to 'sr', 'en' and 'de'. adrian Petar Marić <petar.maric@gmail.com> translation date time i18n 0 0 0 0 0 0
884 2005-11-23 11:48:33 2007-01-17 22:12:17 2019-06-24 00:24:41.422103 Unreviewed closed Template system defect major master worksforme Problems with international date handling The code: {{{ {% load i18n %} {% blocktrans with object.pub_date|date:_("DATETIME_FORMAT") as date %}Published on {{ date }}{% endblocktrans %} }}} Spits out: {{{ AttributeError at /category/xml/ 'str' object has no attribute 'day' Request Method: GET Request URL: http://localhost/category/xml/ Exception Type: AttributeError Exception Value: 'str' object has no attribute 'day' Exception Location: C:\Dev\Python24\lib\site-packages\django\utils\dateformat.py in d, line 114 }}} Trace snip: {{{ ... C:\Dev\Python24\lib\site-packages\django\utils\dateformat.py in d 107. self.data = dt 108. self.timezone = getattr(dt, 'tzinfo', None) 109. if hasattr(self.data, 'hour') and not self.timezone: 110. self.timezone = LocalTimezone(dt) 111. 112. def d(self): 113. "Day of the month, 2 digits with leading zeros; i.e. '01' to '31'" 114. return '%02d' % self.data.day #Here we get the error 115. 116. def D(self): 117. "Day of the week, textual, 3 letters; e.g. 'Fri'" 118. return WEEKDAYS[self.data.weekday()][0:3] 119. 120. def F(self): }}} I was able to reproduce the error with '''LANGUAGE_CODE''' set to 'sr', 'en' and 'de'. adrian Petar Marić <petar.maric@gmail.com> translation date time i18n 0 0 0 0 0 0
1022 2005-12-07 22:56:04 2007-01-17 22:12:17 2019-06-24 00:26:08.586325 Unreviewed closed Generic views task normal   fixed [patch]Bug in the admin when deleting models with OneToOne There's a typo in the code, this fixes it. {{{ =================================================================== --- django/contrib/admin/views/main.py (revision 1565) +++ django/contrib/admin/views/main.py (working copy) @@ -564,7 +564,7 @@ except ObjectDoesNotExist: pass else: - if rel_opts.admin: + if related.opts.admin: p = '%s.%s' % (related.opts.app_label, related.opts.get_delete_permission()) if not user.has_perm(p): perms_needed.add(related.opts.verbose_name) }}} adrian Eric Moritz   0 1 0 0 0 0
1082 2005-12-19 06:43:09 2007-01-17 22:12:17 2019-06-24 00:26:46.381791 Unreviewed closed Database layer (models, ORM) defect normal magic-removal fixed magic-removal branch: SQLite does not support ALTER TABLE n ADD CONSTRAINT [http://www.sqlite.org/omitted.html SQLite does not support ALTER TABLE n ADD CONSTRAINT ...], which seems to have appeared in the magic-removal branch. This causes {{{django-admin.py install}}} to fail. adrian anonymous sqlite magic-removal 0 0 0 0 0 0
1144 2005-12-30 20:01:10 2007-01-17 22:12:17 2019-06-24 00:27:25.561522 Unreviewed closed contrib.admin defect normal master fixed [patch] admin page assumes black default font color The grey from buttons are shown here with white fontcolor which is impossible to read on light grey button colors. This is because I use white font on dark background theme. If a background color is set, a font color sould also be set, assuming a default value is always wrong :) adrian django@poelzi.org   0 1 0 0 0 0
1219 2006-01-13 19:41:19 2007-01-17 22:12:17 2019-06-24 00:28:13.305505 Unreviewed closed Database layer (models, ORM) defect normal   fixed There's no way to bulk delete a set of objects [http://groups.googlegroups.com/group/django-users/browse_thread/thread/492dded0550ed742/f8f8d957abec6951#f8f8d957abec6951 Ned Batchelder wrote to django-users]: {{{ > I'm used to writing SQL statements like: > > delete from app_things where type = 'foo'; > > to delete a number of objects at once. I don't see a way to do this > type of delete in Django. I was hoping for something like: > > things.delete(type__exact='foo') > > Certainly I could do this: > > for t in things.get_list(type__exact='foo'): > t.delete() > > but this incurs a lot more database activity. }}} russellm jacobkm   0 0 0 0 0 0
1237 2006-01-17 09:25:43 2007-01-17 22:12:17 2019-06-24 00:28:24.686989 Unreviewed closed Database layer (models, ORM) enhancement normal   duplicate [patch]thread safety connection pool for all backend Django uses the same connection for all threads. It breaks any database when using transaction or in multithread web server. this patch is implemented to avoid it. like ticket [463] but for all. - use AutoReleaseCursor return connection object to pool when cursor deleted. - use connections dict protect threaded active connection. - db backend must implement a get_check_sql function to provide a sql which can check a connection's health. ado_mssql: {{{ def get_check_sql(): return "select top 1 1 from sysfiles" }}} oracle: {{{ def get_check_sql(): return "select 1 from dual"; }}} other.... sorry for my very very poor english. adrian junzhang.jn@gmail.com connection pool db 0 1 0 0 0 0
1294 2006-01-30 03:39:39 2007-01-17 22:12:34 2019-06-24 00:29:01.067142 Unreviewed closed Testing framework enhancement blocker new-admin invalid RSS framework doesn't pick up item_author_name Code: {{{ #!python class LatestFeed(Feed): title = 'Chat feed title' link = 'http://www.example.com' description = 'Chat feed' def get_object(self, bits): if len(bits) != 1: raise ObjectDoesNotExist return chats.get_object(name__exact=bits[0]) def items(self, obj): return messages.get_list(chatname__exact=obj.name, order_by=('-timestamp',), limit=50) def item_pubdate(self, item): return item.timestamp def item_author_name(self, item): return item.from_dispname }}} output: {{{ <item> <title>title is fine here</title> <link>http://the_link_is_fine.com</link> <description>here's some text</description> <pubDate>Fri, 27 Jan 2006 15:15:58 -0000</pubDate> <guid>http://the_link_is_fine.com</guid> </item> }}} no trace of author in the output??? adrian jaanus@jaanuskase.com   0 0 0 0 0 0
1321 2006-02-03 04:55:11 2007-01-17 22:12:17 2019-06-24 00:29:18.317467 Unreviewed closed Core (Other) task major   fixed Modularised Django Django is the most ass kicking webframework ever created. So why not share knowledge and modules? There is a [http://groups.google.com/group/django-developers/browse_thread/thread/5b590b5487e500c1/fda86c62eeb06251#fda86c62eeb06251 discussion] on django-developers about split out the template engine and the ORM System. I personally like the idea but how should this work? 1. these module must not read DJANGO_SETTINGS_MODULE and other dependencies 2. they shouldn't require a download of the whole django framework 3. when used in django there shouldn't be too many (none) changes which might break backwards compatibility The problem will be the last point in combination with the first two :-) adrian Armin Ronacher <armin.ronacher@active-4.com>   0 0 0 0 0 0
1385 2006-02-22 22:37:58 2007-01-17 22:12:17 2019-06-24 00:29:59.299815 Unreviewed closed Template system defect normal master fixed [PATCH] allow timesince filter to work with datetime.date objects The timesince filter currently throws an AttributeError when applied to a {{{ datetime.date }}} object: {{{ 'defaultfilters' module: API test raised an exception ===================================================== Code: 'timesince(datetime.date.today() - datetime.timedelta(1))' Line: 232 Exception: File "/Users/mcroydon/django/django_src.trunk/tests/doctest.py", line 1243, in __run compileflags, 1) in test.globs File "<doctest defaultfilters[76]>", line 1, in ? timesince(datetime.date.today() - datetime.timedelta(1)) File "/Users/mcroydon/django/django_src.trunk/django/core/template/defaultfilters.py", line 343, in timesince return timesince(value) File "/Users/mcroydon/django/django_src.trunk/django/utils/timesince.py", line 22, in timesince if d.tzinfo: AttributeError: 'datetime.date' object has no attribute 'tzinfo' }}} The patch includes a test to confirm this behavior. The test passes after applying this patch. adrian matt   0 0 0 0 0 0
1387 2006-02-23 07:52:45 2007-01-17 22:12:17 2019-06-24 00:30:00.589231 Unreviewed closed contrib.syndication defect major new-admin fixed some xml parsing errors in firefox I've noticed a few problems with pages that won't render due to having some invalid XML. Here's a patch fixing 2 of them: {{{ Index: django/contrib/admin/templates/admin/change_form.html =================================================================== --- django/contrib/admin/templates/admin/change_form.html (revision 2368) +++ django/contrib/admin/templates/admin/change_form.html (working copy) @@ -21,7 +21,7 @@ </ul> {% endif %}{% endif %} <form {{ bound_manipulator.form_enc_attrib }} action="{{ form_url }}" method="post">{% block form_top %}{% endblock %} -{% if is_popup %}<input type="hidden" name="_popup" value="1">{% endif %} +{% if is_popup %}<input type="hidden" name="_popup" value="1"/>{% endif %} {% if bound_manipulator.save_on_top %}{% submit_row bound_manipulator %}{% endif %} {% if form.error_dict %} <p class="errornote"> Index: django/contrib/admin/templates/admin_doc/bookmarklets.html =================================================================== --- django/contrib/admin/templates/admin_doc/bookmarklets.html (revision 2368) +++ django/contrib/admin/templates/admin_doc/bookmarklets.html (working copy) @@ -16,7 +16,7 @@ {% endblocktrans %} <div id="content-main"> - <h3><a href="javascript:(function(){if(typeof ActiveXObject!='undefined'){x=new ActiveXObject('Microsoft.XMLHTTP')}else if(typeof XMLHttpRequest!='undefined'){x=new XMLHttpRequest()}else{return;}x.open('HEAD',location.href,false);x.send(null);try{view=x.getResponseHeader('x-view');}catch(e){alert('No view found for this page');return;}if(view=="undefined"){alert("No view found for this page");}document.location='{{ admin_url }}doc/views/'+view+'/';})()">{% trans "Documentation for this page" %}</a></h3> + <h3><a href="javascript:(function(){if(typeof ActiveXObject!='undefined'){x=new ActiveXObject('Microsoft.XMLHTTP')}else if(typeof XMLHttpRequest!='undefined'){x=new XMLHttpRequest()}else{return;}x.open('HEAD',location.href,false);x.send(null);try{view=x.getResponseHe… adrian vineet   0 0 0 0 0 0
1402 2006-02-26 13:49:25 2007-01-17 22:12:17 2019-06-24 00:30:10.182103 Unreviewed closed contrib.admin defect normal master duplicate In the admin edit_inline stops prepopulate_from working for slug fields. When a field is edited inline the javascript that is meant to automatically fill out the slug field doesn't work. adrian anonymous   0 0 0 0 0 0
1437 2006-03-01 23:02:01 2007-01-17 22:12:17 2019-06-24 00:30:32.442732 Unreviewed closed Metasystem defect normal magic-removal invalid [patch] Allow models to live outside models.py In current magic-removal, you get exceptions if you want to place a model outside of the models.py module (e.g. in a subpackage) (to be specific, the check that the model is in INSTALLED_APPS throws an exception). The attached patch fixes this by allowing 'module' to be specified as a 'Meta' option. Previously using 'app_label' would fix it. By specifying 'module' instead, you won't need 'app_label' (in the usual case at least). Meta.module should be the fully qualified module name of the models file e.g. 'myproj.myapp.models', and you also need to import your model classes into {{{models.py}}} or {{{models/__init__.py}}}. It looks like this: {{{some_random_file.py}}}: {{{ class Foo(models.Model): # fields etc class Meta: module = 'myapp.myproj.models' }}} {{{myapp/myproj/models.py}}} or {{{myapp/myproj/models/__init__.py}}}: {{{ from some_random_file import Foo }}} I think that's relatively clean. It only requires one line extra per model than what you would usually do i.e. the 'module' option in 'Meta'. adrian lukeplant   0 1 0 0 0 0
1578 2006-04-03 16:04:35 2007-01-17 22:12:34 2019-06-24 00:32:01.806808 Unreviewed closed Template system enhancement major   fixed [patch] validation for missing core=True in ForeignKey relations wrong If you have a Foreign Key relation with edit_inline=False, manage.py validate complains if you don't have a core=True in the related model, like this: {{{ email.nextrech: At least one field in Nextrech should have core=True, because it's being edited inline by tarifkunde.Tarifkunde. }}} It shouldn't: No edit_inline, no core=True needed. The original version of get_validation_error did not check edit_inline at all, that was the whole problem. adrian mir@noris.de validation edit_inline 0 1 0 0 0 0
1619 2006-04-11 15:17:43 2007-01-17 22:12:17 2019-06-24 00:32:27.730044 Unreviewed closed Generic views defect major   worksforme FileField upload broken in generic views create_update.py is missing following lines in two places after "new_data = request.POST.copy()" {{{ opts = mod.Klass._meta if opts.has_field_type(meta.FileField): new_data.update(request.FILES) }}} jacob Hegemon FileField upload generic views 0 0 0 0 0 0
1816 2006-05-09 07:45:35 2007-01-17 22:12:17 2019-06-24 00:34:33.731763 Unreviewed closed contrib.admin defect major magic-removal fixed [patch] magic-removal using deprecated attribute in db/models/manipulators.py line 218 In admin page, error occurs as: AttributeError at /admin/apt/apt_property/2/ 'Apt_Unit' object has no attribute 'set_feature' Request Method: POST Request URL: http://localhost:8000/admin/apt/apt_property/2/ Exception Type: AttributeError Exception Value: 'Apt_Unit' object has no attribute 'set_feature' Exception Location: C:\Program Files\Python24\lib\site-packages\django\db\models\manipulators.py in save, line 218 adrian coconutstudio@yahoo.com   0 1 0 0 0 0
1847 2006-05-12 05:29:34 2007-01-17 22:12:17 2019-06-24 00:34:53.867711 Unreviewed closed contrib.admin enhancement normal   wontfix Multi-level inline editing It would be good to have multi-level inline editing. So lets say for example someone wanted to have a Quiz that contained many questions which itself contained many choices (for answers). Instead of having an admin section for Quiz and another for Questions, then a third for Choices, an admin could instead just have an admin section for Quizzes with multi-level inline editing for questions and choices to those questions. adrian yannick.lynfatt@gmail.com multi-level inline editing, admin 0 0 0 0 0 0
1990 2006-05-24 19:06:08 2007-01-17 22:12:17 2019-06-24 00:36:24.922227 Unreviewed closed Database layer (models, ORM) enhancement major   fixed [patch] Oracle support in latest trunk Based on Jason Higgins' Oracle support he added in request #87 for the 0.91 release, I have provided an oracle backend for the latest Django trunk (magic removal). Attached is the patch file (for changes made to existing django source), and a zip file containing the oracle backend directory (just unzip into the db/backends directory of the django code base). None of the changes made in the existing code affect the other database backends. I just created the patch (revision 2977). adrian tzellman ORACLE 0 1 0 0 0 0
1991 2006-05-24 19:13:50 2007-01-17 22:12:17 2019-06-24 00:36:25.567946 Unreviewed closed contrib.admin enhancement blocker master fixed User accounts with is_active My thought on how to fix this is to change this line in {{{django.contrib.auth.forms.isValidUser}}} from this: {{{ self.user_cache = User.objects.get(username=field_data) }}} to this: {{{ self.user_cache = User.objects.filter(is_active=True).get(username=field_data) }}} Or add a second {{{Manager}}} to {{{django.contrib.auth.models}}} : {{{ class ActiveUser(models.Manager): def get_query_set(self): return super(ActiveUser, self).get_query_set().filter(is_active=True) }}} and add these two lines to {{{django.contrib.auth.models.Article}}} : {{{ objects = models.Manager() published = ActiveUser() }}} and instead of the line above for {{{isValidUser}}}, put this: {{{ self.user_cache = ActiveUser.objects.get(username=field_data) }}} Don't forget to do: {{{from django.contrib.auth.users.models import ActiveUser}}} adrian dave@rightround.com auth 0 0 0 0 0 0
2030 2006-05-29 10:36:11 2007-01-17 22:12:17 2019-06-24 00:36:49.921133 Unreviewed closed Core (Other) defect normal master wontfix When hitting a problem with an upload the DEBUG screen will display full file contents Currently when you are testing file uploads and you hit a problem you will get a DEBUG screen which will have your FileField data in the debugging information. The only downside is that if you have a file of, say, 5 MB, the DEBUG screen will show all 5 MB of that data in the appropriate dict value for the FileField key. This is not what you would want to see because it in general will slow your browser down considerably. Perhaps this can be stripped/masked out before dumping into the DEBUG screen. adrian asmodai@in-nomine.org upload 0 0 0 0 0 0
2058 2006-06-01 09:29:44 2007-01-17 22:12:17 2019-06-24 00:37:07.553871 Unreviewed closed contrib.admin enhancement normal master duplicate Add read only permissions to views and fields to admin interface It would be nice to add read only permissions for every model. Then you could give certain users or groups the possibility to view an object in the admin interface without being able to change or delete it. One could just replace all input fields in a form by the value they have. Another nice to have, is the possibility to make certain fields read only to users of the admin interface. E.g. a creation timestamp would be nice to see when you edit an object, but you are not allowed to edit it. adrian Rudolph   0 0 0 0 0 0
2059 2006-06-01 15:03:21 2007-01-17 22:12:17 2019-06-24 00:37:08.186340 Unreviewed closed Core (Management commands) enhancement trivial new-admin duplicate attempting to edit_inline an object with a unique field yields TypeError from django.db import models class Address(models.Model): street1 = models.CharField(maxlength=50) def __str__(self): return self.street1 class Admin: search_fields = ['street1'] class Dog(models.Model): address = models.ForeignKey(Address,edit_inline=models.TABULAR) # use the following line and it works fine # name = models.CharField(maxlength=20,core=True) # use the following line with SVN update revision code 3045 to get the following exception name = models.CharField(maxlength=20,unique=True,core=True) # Exception Value: Cannot resolve keyword 'name' into field # Exception Location: /usr/lib/python2.4/site-packages/django/db/models/query.py in lookup_inner, line 800 def __str__(self): return self.name # May (or may not) relate to ticket # 565 adrian gJigsaw@gMail.Com edit_inline unique TypeError 0 0 0 0 0 0
2409 2006-07-24 09:22:57 2007-01-17 22:12:17 2019-06-24 00:40:52.371416 Unreviewed closed contrib.admin enhancement normal master wontfix Call model methods on object from admin interface It would be really nice if you could add buttons to the admin interface of an object. A click on the button calls the corresponding model method: {{{ class Subscriber(models.Model): name = models.CharField('name', maxlength=40) def send_invoice(self): """Sends invoice by e-mail to subscriber.""" pass class Admin: actions = (('send_invoice', _('Send invoice')),) }}} This would create a button with the text 'Send invoice' in the admin interface of the object. The "actions" syntax should probably also allow passing arguments to the method. adrian Rudolph   0 0 0 0 0 0
2424 2006-07-26 08:59:38 2007-01-17 22:12:17 2019-06-24 00:41:01.888125 Unreviewed closed Metasystem defect normal magic-removal duplicate Django_admin will report errors when try to save objects, where another object, which has a many_to_many field, is edit_inlined = Descriptions = * Django_admin will report errors when try to save objects, where another object, which has a many_to_many field, is edit_inlined = This is my model = {{{ #!python Class A: .... Class B: field = ManyToManyField(ClassC); a = ForeignKey(A, edit_inline=meta.STACKED) }}} == Reproduce steps == * Then when I try to create a A object in django_admin, it will report errors as 'set_field' not exist.. = Django codes related = == django/db/models/manipulator.py == * line 217 {{{ #!python for f in related.opts.many_to_many: if child_follow.get(f.name, None) and not f.rel.edit_inline: was_changed = getattr(new_rel_obj, 'set_%s' % f.name)(rel_new_data[f.attname]) if self.change and was_changed: self.fields_changed.append('%s for %s "%s"' % (f.verbose_name, related.opts.verbose_name, }}} jacob chengqi@exoweb.net   0 0 0 0 0 0
2426 2006-07-26 11:08:40 2007-01-17 23:38:43 2019-06-24 00:41:03.225889 Unreviewed closed Validators defect normal   duplicate validators.isValidANSIDate("2006-02-31",_) does not rise ValidationError Built-in re-based validator does not catch invalid day-month combinations. Subsequent call to do_html2python force the value to None raising exception on the database level if the field is NOT NULL. Of cause one can add trivial custom validator for this check, but the better place is 'isValidANSIDate', because "2006-02-31" is really not a valid ANSI date. adrian m465@mail.ru   0 0 0 0 0 0
2435 2006-07-27 11:23:10 2007-01-17 22:12:17 2019-06-24 00:41:09.051630 Unreviewed closed Documentation defect minor   fixed Wording errors in Tutorial 4 A couple of comments. First, when you say: {{{ Similarly, the object_list generic view uses a template called <app name>/<module name>_list.html. Thus, rename poll/index.html to polls/poll_list.html. }}} The second sentance is wrong, you have to rename "polls/index.html" Also, when you say "Previous versions of this tutorial" in the generic views section, it sounds like you mean the versions published for the 0.90 & 0.91 releases. Shouldn't this be "Previous Parts"? jacob nicholas@aquarionics.com   0 0 0 0 0 0
2461 2006-07-31 19:44:28 2007-01-17 22:12:17 2019-06-24 00:41:25.589428 Unreviewed closed Core (Management commands) enhancement minor master wontfix [patch] manage.py: Add support for IP, IP:PORT, or PORT command-line arguments These two files (iputils.py and iputils.diff) add support for IP, IP:PORT, or PORT command-line arguments to '''manage.py''', so that {{{ manage.py runserver [optional port number, or ipaddr:port] }}} becomes {{{ manage.py runserver [optional ip address, optional port number, or ipaddr:port] }}} adrian jvargas -a-t- acm -*- o r g ip address utils 0 1 0 0 0 0
2624 2006-08-30 12:08:53 2007-01-17 22:12:17 2019-06-24 00:43:09.370157 Unreviewed closed Contrib apps defect trivial master fixed Doc string misleading in contrib.auth Permission model. I was looking through the code in contrib.auth, and the last sentence in the doc string for the permission model seems misleading. It reads: "Three basic permissions -- add, create and delete -- are automatically created for each Django model." Shouldn't that be: "Three basic permissions -- add, '''change''' and delete -- are automatically created for each Django model." Note the emphasis. adrian anonymous   0 0 0 0 0 0
2716 2006-09-13 14:10:13 2007-01-17 22:12:17 2019-06-24 00:44:08.858431 Unreviewed closed Database layer (models, ORM) enhancement normal 0.95 duplicate german "umlaut"-letters in slugfields could be better Hi, when slugfields are generated from german textfields it would result in '''much nicer slugs''' if the umlauts where written '''in the following way''' (currently umlauts are just cut away): ü (= the html &uuml;) -> ue ö (= the html &ouml;) -> oe ä (= the html &auml;) -> ae ß (= the html &szlig;)-> sz same with capital letters! The resulting slugfield could still be read in german! cu Dorian adrian dorian.santner@gmx.net umlaut slugfield 0 0 0 0 0 0
2854 2006-10-02 04:32:18 2007-01-17 22:12:17 2019-06-24 00:45:35.312981 Unreviewed closed Documentation defect normal   fixed docs/tutorial02.txt instruction needs calrification = docs/turorial02.txt = == Needs clarification == Right now this part of the file reads like this: {{ By default, ``TEMPLATE_DIRS`` is empty. So, let's add a line to it, to tell Django where our templates live:: TEMPLATE_DIRS = ( "/home/mytemplates", # Change this to your own directory. ) }} IMHO it should change to this, to be consistent and clear: {{ By default, ``TEMPLATE_DIRS`` is empty. So, let's add a line to it, to tell Django where our templates live:: TEMPLATE_DIRS = ( "/home/'''''your_username'''''/mytemplates", # Change this to your own directory. ) }} Thank you + Great work, thanks for django. Ivan somebody bonovoxmofo@gmail.com documentation tutorial 0 0 0 0 0 0
2863 2006-10-03 06:10:44 2007-01-17 22:12:17 2019-06-24 00:45:41.045852 Unreviewed closed Documentation defect normal 0.95 fixed docs/tutorial03.txt missing code ?? On docs/tutorial03.txt you are talking about limit the list of polls to five, but since you introduce render_to_response() you forgot to include that piece of code. {{ from django.shortcuts import render_to_response from mysite.polls.models import Poll def index(request): latest_poll_list = Poll.objects.all().order_by('-pub_date') return render_to_response('polls/index.html', {'latest_poll_list': latest_poll_list}) }} It should be {{ from django.shortcuts import render_to_response from mysite.polls.models import Poll def index(request): latest_poll_list = Poll.objects.all().order_by('-pub_date')'''[:5]''' return render_to_response('polls/index.html', {'latest_poll_list': latest_poll_list}) }} Thanks. somebody bonovoxmofo@gmail.com   0 0 0 0 0 0
2872 2006-10-04 16:32:53 2007-01-17 22:12:17 2019-06-24 00:45:46.612626 Unreviewed closed Core (Other) defect normal master fixed syncdb gives "TypeError: not enough arguments for format string" following revisions 3887-3864 A recent revision (probably in range 3887-3864) appears to have broken syncdb when there is initial SQL data to load. He's some sample output : ./manage.py syncdb Creating table auth_message ... You just installed Django's auth system, which means you don't have any superusers defined. Would you like to create one now? (yes/no): no Traceback (most recent call last): File "./manage.py", line 11, in ? execute_manager(settings) File "/usr/lib/python2.4/site-packages/django/core/management.py", line 1439, in execute_manager execute_from_command_line(action_mapping, argv) File "/usr/lib/python2.4/site-packages/django/core/management.py", line 1347, in execute_from_command_line action_mapping[action](int(options.verbosity), options.interactive) File "/usr/lib/python2.4/site-packages/django/core/management.py", line 514, in syncdb print "Installing initial data for %s.%s model" % model._meta.object_name TypeError: not enough arguments for format string russellm matthew@cuneiformsoftware.com syncdb 0 0 0 0 0 0
2915 2006-10-16 11:32:37 2007-01-17 22:12:17 2019-06-24 00:46:13.964654 Unreviewed closed Contrib apps defect trivial master fixed [patch] Typo in django.contrib.auth.views.password_reset On [http://code.djangoproject.com/browser/django/trunk/django/contrib/auth/forms.py#L84 line 84 of django.contrib.auth.forms.py], 'account' is misspelled 'acount'. adrian matt.riggott@gmail.com   0 1 0 0 0 0
2926 2006-10-18 03:15:19 2007-01-17 22:12:17 2019-06-24 00:46:20.928130 Unreviewed closed Core (Other) enhancement normal 0.95 wontfix [patch] Custom FormField attributes FormField objects don't allow users to add their own custom attributes. Modified the abstract FormField class to also require the attribute_dict property. This property allows users to define their own attributes to render. For XHTML compliance, output is property="value". Therefore, if you want readonly attribute it'll have to output as readonly="readonly": {{{ { 'readonly':'readonly' } }}} Usage example: {{{ attributes = { 'onclick':'javascript:alert(\'running\');', 'tabindex':'1', 'title':'This is a title!', } self.fields = ( forms.TextField(field_name="fieldName", is_required=False, length=10, attribute_dict=attributes), forms.TextField(field_name="otherField", is_required=False, length=10) ) }}} Shouldn't break your existing manipulators. adrian Winston Lee <lee.winston@gmail.com> FormField attributes 0 1 0 0 0 0
2934 2006-10-19 23:51:59 2007-01-17 22:12:17 2019-06-24 00:46:26.110227 Unreviewed closed Validators enhancement normal 0.95 fixed [patch] validators.isExistingURL is frequently wrong The existing isExistingURL validator uses urllib2's default user agent string, which is commonly rejected by servers. Similarly, the validator fails if a 301 or 302 is returned, though a 401 is accepted as passing. I think it's better to claim to support all sorts of responses, allow a configurable user agent (via settings) and accept 301,302 as valid. As a philosophical issue, we could perhaps loop on 301,302, calling it a failure after a certain number of tries, but then you might fall into a cookied tarpit which is valid, but requires a cookie store. Semi-aside, hey, [http://bitworking.org/projects/httplib2/ httplib2] is nice. Sorry, no patch; I'm on 0.91 and can't easily diff w/ trunk. Even so, here's my local isExistingURL: {{{ def isExistingURL(field_data, all_data): import urllib2 try: headers = { "Accept" : "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5", "Accept-Language" : "en-us,en;q=0.5", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Connection" : "close", "User-Agent":URL_FETCH_USER_AGENT } req = urllib2.Request(field_data,None, headers) u = urllib2.urlopen(req) except ValueError: raise ValidationError, _("Invalid URL: %s") % field_data except urllib2.HTTPError, e: # 401s are valid; they just mean authorization is required. # 301 and 302 are redirects; they just mean look somewhere else. if str(e.code) not in ('401','301','302'): raise ValidationError, _("The URL %s is a broken link.") % field_data except: # urllib2.URLError, httplib.InvalidURL, etc. raise ValidationError, _("The URL %s is a broken link.") % field_data }}} adrian jdunck@gmail.com   0 1 0 0 0 0
2940 2006-10-20 14:39:34 2007-01-17 22:12:17 2019-06-24 00:46:29.985459 Unreviewed closed Documentation defect minor master fixed [patch] settings.MANAGERS does not default to settings.ADMINS The [http://www.djangoproject.com/documentation/settings/#managers settings documentation] notes that {{{MANAGERS}}} defaults to {{{ADMINS}}}. Alas, this isn't true. So what actually happens? Well, in [http://code.djangoproject.com/browser/django/trunk/django/conf/global_settings.py django.conf.global_settings], {{{MANAGERS}}} is set to equal {{{ADMINS}}} — an empty tuple. But when {{{ADMINS}}} is set in a project's settings file {{{MANAGERS}}} remains an empty tuple. There are two solutions. The first, and by far simplest, is to change the documentation to note that {{{MANAGERS}}} defaults to an empty tuple. The second is to modify the code in [http://code.djangoproject.com/browser/django/trunk/django/conf/__init__.py django.conf] to make a special case of {{{MANAGERS}}} (and perhaps other settings) so that it is changed to equal the project's {{{settings.ADMINS}}} if empty. I'll attach the first solution as a patch. That wasn't the easiest thing to explain, but I hope it makes sense. jacob matt.riggott@gmail.com   0 1 0 0 0 0
2974 2006-11-01 20:45:13 2007-01-17 22:12:17 2019-06-24 00:46:51.514748 Unreviewed closed Translations defect normal master fixed Translation for pt-BR language files had some errors. The pt-BR (Brazilian Portuguese) translation files had some typos and errors. Also some translations were not done. Here follows both files. hugo Carlos Eduardo <carlosedp@gmail.com> translation 0 0 0 0 0 0
3074 2006-11-28 04:30:16 2007-01-17 22:12:17 2019-06-24 00:47:55.634217 Unreviewed closed Database layer (models, ORM) defect normal 0.95 worksforme [bug] OneToOneField referencing a different app does not always register a Reverse Lookup. !OneToOneField does not register a Reverse Lookup when the relation references a different application. See the example below. == Create project, application, and models == '''/project/appone/models.py''' {{{ from django.db import models class Foo(models.Model): w = models.CharField(maxlength=20) class Bar(models.Model): x = models.CharField(maxlength=10) y = models.ManyToManyField(Foo) }}} '''/project/apptwo/models.py''' {{{ from django.db import models from project.appone.models import Bar class Baz(models.Model): bar = models.OneToOneField(Bar) }}} == Setup test data == * Add appone and apptwo to the INSTALLED_APPLICATIONS * Run python manage.py syncdb * Run python manage.py shell {{{ >>> from appone.models import * >>> from apptwo.models import * >>> a = Foo() >>> a.w = '1' >>> a.save() >>> b = Bar() >>> b.x = '2' >>> b.save() >>> b.y = [a] >>> c = Baz() >>> c.bar = b >>> c.save() }}} * Next exit the shell environment to simulate a fresh environment * run python manage.py shell '''This doesn't work''' {{{ >>> from appone.models import Bar >>> d = Bar.objects.all()[0] >>> d.baz Traceback (most recent call last): File "<console>", line 1, in ? AttributeError: 'Bar' object has no attribute 'baz' }}} '''This works''' {{{ >>> from appone.models import Bar >>> d = Bar.objects.get(pk=1) >>> d.baz }}} adrian nowell strite   0 0 0 0 0 0
3080 2006-11-29 16:40:53 2007-01-17 22:12:17 2019-06-24 00:47:59.506302 Unreviewed closed Core (Other) defect normal master fixed [bug] delete_cookie method imporoperly sets the domain parameter in django/http/!__init!__.py In django/http/!__init!__.py the delete_cookie method improperly sets the domain parameter to the path parameter. Below is a patch that corrects the oversight. {{{ Index: django/http/__init__.py =================================================================== --- django/http/__init__.py (revision 4126) +++ django/http/__init__.py (working copy) @@ -208,7 +208,7 @@ if path is not None: self.cookies[key]['path'] = path if domain is not None: - self.cookies[key]['domain'] = path + self.cookies[key]['domain'] = domain self.cookies[key]['expires'] = 0 self.cookies[key]['max-age'] = 0 }}} adrian nowell strite   0 0 0 0 0 0
3086 2006-12-01 13:44:51 2007-01-17 22:12:17 2019-06-24 00:48:08.429871 Unreviewed closed Database layer (models, ORM) enhancement normal 0.95 duplicate Encoding of special characters from the database to HTML output == Rendering special characters to HTML == If there are (HTML-)special characters in the database (like &), they will put to the HTML output as they are, which results in invalid HTML code. Django should be recode these characters to valid HTML codes, like & -> &amp; adrian manfred.morgner@gmx.net Rendering 0 0 0 0 0 0
3115 2006-12-08 17:51:56 2007-01-17 22:12:17 2019-06-24 00:48:26.831303 Unreviewed closed Database layer (models, ORM) defect major master fixed Postgresql backend should convert Unicode input to bytestrings ORM fails in PostgreSQL when you filter with unicode strings. For example: {{{ >>> from django.contrib.auth.models import User >>> User.objects.filter(username=u'admin') ... ProgrammingError: ERROR: column "admin" does not exist SELECT "auth_user"."id","auth_user"."username","auth_user"."first_name","auth_user"."last_name","auth_user"."email","auth_user"."password","auth_user"."is_staff","auth_user"."is_active","auth_user"."is_superuser","auth_user"."last_login","auth_user"."date_joined" FROM "auth_user" WHERE ("auth_user"."username" = admin) ORDER BY "auth_user"."username" ASC }}} The problem is on psycopg library, here are an example: {{{ >>> from django.db import connection >>> cursor = connection.cursor() >>> cursor.execute('SELECT * from auth_user WHERE username = %s', [u'admin']) ... ProgrammingError: ERROR: column "admin" does not exist SELECT * from auth_user WHERE username = admin }}} Ok, it's true... it's not a django error, but for example, in newforms all is unicode... ¿what we do? ¿Use psycopg2? ¿convert all unicodes to ascii in lookups? ¿convert all params on postgresql?. Call is made on ''django/db/models/query.py'', on this sentences: {{{ cursor = connection.cursor() select, sql, params = self._get_sql_clause() cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params) }}} adrian Manuel Saelices <msaelices@yaco.es>   0 0 0 0 0 0
3158 2006-12-18 14:29:25 2007-01-17 22:12:17 2019-06-24 00:48:54.339275 Unreviewed closed Documentation defect critical master worksforme Outdated documentation/tutorial1 "Let's look at what startproject created:..." Doc says: {{{ Let's look at what startproject created: mysite/ __init__.py manage.py settings.py urls.py }}} Doc should say: {{{ Let's look at what startproject created: mysite | manage.py | settings.py | urls.py | __init__.py | +---apps | __init__.py | \---settings | admin.py | main.py | __init__.py | \---urls admin.py main.py __init__.py .. and explanation .. }}} jacob anonymous tutorial1 startproject settings directory subdir 0 0 0 0 0 0
3164 2006-12-18 16:57:21 2007-01-17 22:12:17 2019-06-24 00:48:58.356307 Unreviewed closed Testing framework defect normal master fixed [patch] "basic" model tests assume ORDER BY id As discussed on [http://groups.google.com/group/django-developers/browse_thread/thread/82547cf772d00567/# django-dev], the tests/modeltests/basic/models.py contains doctests that OR together other query sets, then expect the results to be in a deterministic order, apparently by id. But no ordering is specified in the model, so the tests are passing only by luck (and they fail against the Oracle backend). We need a patch to add ordering = ("-pub_date",) and to alter the relevant tests to match that ordering. adrian Matt Boersma <mboersma@arraybiopharma.com> oracle, ordering 0 1 0 0 0 0
3171 2006-12-20 05:25:41 2007-01-17 23:51:13 2019-06-24 00:49:02.800358 Unreviewed closed Template system enhancement normal master invalid [patch] Support for dynamic values in inclusion_tag template name The inclusion_tag doesn't support dynamic values in the template name, which I found I needed in several places when creating custom template tags. Initially I just wrote my own helper function but it was so similar to inclusion_tag I thought I would post a patch here in case it was useful. A simple example of how I'm using this for a generic "filtered" list (similar to the admin ChangeList) with different templates for different lists: {{{ def filters(fl): return {'fl': fl} filters = register.inclusion_tag('%s/filters.html', inclusion_params=('fl.template_path',))(filters) }}} Each item in inclusion_params is resolved and then all are passed as a tuple into the template_name string to generate the final template filename. Note that the "fl" item in inclusion_params variable refers to the "fl" parameter to the filters function, not to some arbitrary "fl" variables inside the template context. adrian nick@intv.com.au   0 1 0 0 0 0
3177 2006-12-21 18:53:55 2007-01-17 22:12:34 2019-06-24 00:49:06.637461 Unreviewed closed Generic views defect critical magic-removal invalid None Thanks! None Coder@mail.com None 0 0 0 0 0 0
3178 2006-12-21 18:55:50 2007-01-17 22:12:34 2019-06-24 00:49:07.245545 Unreviewed closed Generic views defect critical magic-removal invalid None Thanks! None Coder@mail.com None 0 0 0 0 0 0
3264 2007-01-09 17:22:12 2007-01-17 22:12:17 2019-06-24 00:50:01.558417 Unreviewed closed Generic views defect normal master duplicate [patch] object_list in archive_year view always contains items in ascending order When the keyword make_object_list is True (see #697), object_list contains items in ascending order and 'ordering' option in class Meta has no effect. adrian paolo <paolo@php3.it> archive_year object_list order ordering 0 1 0 0 0 0

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
    );