tickets
32,817 rows sorted by owner
This data as json, CSV (advanced)
Suggested facets: easy, has_patch, needs_better_patch, needs_tests, changetime (date), last_pulled_from_trac (date)
created (date) >30 ✖
- 2007-09-14 50
- 2008-09-01 45
- 2008-09-08 45
- 2008-08-27 44
- 2008-09-03 42
- 2008-08-29 39
- 2008-08-28 36
- 2005-07-20 34
- 2008-08-26 34
- 2008-09-02 32
- 2011-06-09 32
- 2008-08-19 31
- 2008-01-28 30
- 2005-07-13 29
- 2008-08-13 29
- 2008-08-11 28
- 2008-08-20 28
- 2008-07-22 27
- 2008-08-14 27
- 2008-08-15 27
- 2005-07-18 26
- 2008-07-19 26
- 2008-08-12 26
- 2008-09-04 26
- 2008-09-10 26
- 2007-12-01 25
- 2011-09-09 24
- 2007-09-10 23
- 2008-07-29 23
- 2008-08-09 23
- …
type 9 ✖
- Bug 9,287
- Cleanup/optimization 4,901
- New feature 3,607
- defect 2,064
- Uncategorized 1,799
- enhancement 925
- task 53
- bug / defect 1
- défaut 1
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
250 | 2005-08-02 18:07:20 | 2007-03-26 10:42:03 | 2022-03-06 03:20:12.277630 | Unreviewed | closed | Metasystem | enhancement | normal | duplicate | Metasystem needs a BinaryField | The DB cache backend (see #4) is going to require a BinaryField field type. It should probably be considered "for internal use only" and not given an admin interface. | jacob | 0 | 0 | 0 | 0 | 0 | 0 | |||
373 | 2005-08-19 18:15:29 | 2022-02-16 07:05:20 | 2022-03-06 03:20:32.803818 | Accepted | new | Database layer (models, ORM) | New feature | Normal | dev | Add support for multiple-column primary keys | In the interest of being able to use Django as an admin interface for ''any'' db schema, it really should support multiple column primary keys. Currently, you can "fake" it by declaring one of the keys to be primary in Django and adding a unique constraint to the model. You'd have to do without the auto-generated SQL that Django gives you, but if you're smart enough to know how and why to use multiple primary keys, you can probably write the schema by hand. Still, this is less than ideal. This is likely to be very difficult. | jacob | database | 0 | 0 | 0 | 0 | 0 | 0 | ||
1028 | 2005-12-08 10:12:51 | 2020-04-28 17:26:30 | 2022-03-06 03:22:16.729670 | Accepted | new | contrib.syndication | New feature | Normal | dev | High-level feed framework should make more feed elements available | Currently, certain RSS and Atom elements can be populated only by making use of the "low-level" feed framework; this is particularly annoying in the case of certain common items such as the RSS category element. Ideally, all valid elements could be populated by use of the high-level framework, but in practice perhaps it would be best simply to determine which elements are needed in the most common use cases, and provide access to them. One possible implementation would be to extend the high-level framework's use of the template system; instead of providing templates for the title and description elements, perhaps the high-level framework could allow specification of a template for the complete item element. For example, a publisher who wished to list the categories to which items belong would be able to include this in the template for items in an RSS feed: {{{ {% for category in obj.get_category_list %} <category>{{ category }}</category> {% endfor %} }}} | ubernostrum | djangocon | 0 | 1 | 1 | 0 | 1 | 0 | ||
1044 | 2005-12-12 11:06:02 | 2008-08-01 15:56:12 | 2022-03-06 03:22:19.012680 | Accepted | closed | contrib.admin | defect | normal | newforms-admin | fixed | Bug in admin panel | With the model below adding a client in the admin panel fails with: {{{ AttributeError at /admin/crm/clients/add/ 'list' object has no attribute 'setdefault' Request Method: POST Request URL: http://localhost:8000/admin/crm/clients/add/ Exception Type: AttributeError Exception Value: 'list' object has no attribute 'setdefault' Exception Location: /opt/adminpanel/django/utils/datastructures.py in __init__, line 182 176. """ 177. def __init__(self, key_to_list_mapping): 178. for k, v in key_to_list_mapping.items(): 179. current = self 180. bits = k.split('.') 181. for bit in bits[:-1]: 182. current = current.setdefault(bit, {}) ... 183. # Now assign value to current position 184. try: 185. current[bits[-1]] = v 186. except TypeError: # Special-case if current isn't a dict. 187. current = {bits[-1]: v} }}} {{{ class Client(meta.Model): name = meta.CharField(maxlength = 32) email = meta.EmailField() contact = meta.TextField(maxlength = 1024) added = meta.DateField(auto_now_add = True) class META: admin = meta.Admin( list_display = ['name', 'email'], ) def __repr__(self): return self.name STATUSES = ( (1, 'Nowy'), (5, 'Czeka na decyzje (wewn)'), (10, 'Czeka na decyzje (zewn)'), (15, 'Obsluzony'), ) class Contact(meta.Model): client = meta.ForeignKey(Client, edit_inline=meta.STACKED, num_in_admin=1) status = meta.IntegerField(choices = STATUSES) description = meta.TextField(core = True) added = meta.DateField(auto_now_add = True) file = meta.FileField(upload_to = MEDIA_ROOT, blank = True) class META: admin = meta.Admin( list_select_related = True, list_display = ('client', 'status', 'description', 'get_link'), list_filter = ('client', 'status' ), ordering = ('status', ), search_fields = ('description', )) def get_link(self): from … | wojtek@brandlay.com | nfa-fixed | 0 | 0 | 0 | 1 | 0 | 0 | |
1327 | 2006-02-04 12:13:16 | 2012-05-06 21:34:52 | 2022-03-06 03:23:03.338690 | Accepted | closed | *.djangoproject.com | New feature | Normal | fixed | Support nightly-build download | Django's evolution is keep walking, getting the lastest code must use subversion. Supporting nightly-build download could be more user-friendly. | xyb <xieyanbo@gmail.com> | svn nightly snapshot sprintsept14 | 0 | 1 | 0 | 0 | 0 | 0 | ||
2417 | 2006-07-24 23:17:20 | 2013-05-29 07:58:25 | 2022-03-06 03:25:57.189026 | Ready for checkin | closed | Database layer (models, ORM) | New feature | Normal | dev | fixed | Support for binary type fields (aka: bytea in postgres and VARBINARY in mysql) | I have a need of having fields that store small blips of binary information. In general this works fine with the CharField, however it will not work for all such fields. For example a datum that is just the NUL character, or a series of NUL characters. With postgres at least: "Character strings disallow zero octets," These are not things like images or other such large amounts of data. They are typically fairly short (10 to 200 bytes). For my purposes I created a small patch that adds a new field type that basically is a CharField except it uses the binary type on postgres and mysql. Does the django project plan on supporting a binary type field, if so should I post my patch for this? | scanner@nominum.com | 0 | 1 | 0 | 0 | 0 | 0 | ||
2539 | 2006-08-13 04:09:44 | 2013-06-13 11:36:09 | 2022-03-06 03:26:19.077726 | Accepted | new | Template system | New feature | Normal | Custom tags and filters can be restricted by namespace | How to use namespace? For example, {{{ {% load example %} {% example.testtag %} }}} And I think if the namespace can be optional is better. I don't know if it's useful, but sometimes I read others projects, and as I reading the template, I don't know which tag is in which file. So find the correct tag definition file is somewhat diffcult. If I can add namespace in the front of a custom tag name, it'll be easy to locate the source file. The maillist discussion thread is [http://groups.google.com/group/django-developers/browse_frm/thread/2b5a4a31f0349d27/b92c96a8dccc214b#b92c96a8dccc214b HERE] | limodou@gmail.com | djangocon | 0 | 1 | 1 | 1 | 1 | 0 | |||
3148 | 2006-12-16 01:01:11 | 2014-07-11 20:10:49 | 2022-03-06 03:27:56.126880 | Accepted | closed | Database layer (models, ORM) | New feature | Normal | dev | wontfix | Add getters and setters to model fields | Whenever you have two distinct ways to update a variable, you introduce the opportunity to have bugs. This becomes increasingly true as the system grows in size. It is often the case that when changing one field on an object, you want to be able to automatically run code of some kind; this is the same basic motivation behind the "property" builtin in Python. However, the obvious way of doing that in Django doesn't work: {{{ class Something(models.Model): field = models.BooleanField(...) ... def set_field(self, value): # do something field = property(set_field) }}} The second field overrides the first, and in the process of constructing the model Django never gets a chance to see the models.BooleanField. This patch adds a 'getter' and 'setter' attribute to all fields, which takes a string of a method to call when a field is retrieved or set. It turns out that it is fairly easy to add a property to the class during Django's initialization, at which point it has already retrieved the field information. This example from the enclosed tests shows the basics of its usage: {{{ class GetSet(models.Model): has_getter = models.CharField(maxlength=20, getter='simple_getter') has_setter = models.CharField(maxlength=20, setter='simple_setter') has_both = models.CharField(maxlength=20, getter='simple_getter', setter='updater') updated_length_field = models.IntegerField(default=0) def simple_getter(self, value): return value + "_getter" def simple_setter(self, value): return value + "_setter" def updater(self, value): self.updated_length_field = len(value) return value }}} This defines a getter on {{{has_getter}}} that returns a filtered value from the DB, a setter on {{{has_setter}}} that processes the value to add "_setter" to it in all cases, and on {{{has_both}}} we see a setter than implements the use case of updating another field when a property is set. (As is … | jerf@jerf.org | 0 | 1 | 1 | 0 | 1 | 0 | ||
3254 | 2007-01-08 19:12:47 | 2021-11-16 08:54:39 | 2022-03-06 03:28:14.095030 | Accepted | new | Database layer (models, ORM) | New feature | Normal | full text search support for postgres, oracle and mssql | I didn't like it was missing. oracle, mssql : add a !FulltextIndex for the Fields postgresql: for each !FulltextField add a extra tsvector Field named like `"%(fieldname)_tsv"` Problems with sqlite fts: * they stated a match statement may only be used once in a query * it needs a very specific syntax to search multiple fields * i have no idea how to get that into the ORM | Ronny Pfannschmidt | oracle fulltext search postgresql postgres mysql | 0 | 0 | 0 | 0 | 0 | 0 | |||
3508 | 2007-02-16 01:57:40 | 2010-09-10 19:24:25 | 2022-03-06 03:28:53.786299 | Ready for checkin | closed | Core (Other) | dev | fixed | MergeDict needs more descriptive return values from __str__ and __repr__ | Since MergeDict is a subclass of object, it inherits the default __str__ and __repr__ methods. The default methods are very generic and not as useful as they could be, especially when you're trying to inspect objects. I'm submitting a patch that gives a detailed representation of the instance data when you run str(myMergeDict) and returns an "eval-able" value when you run repr(myMergeDict). | thebanana | 0 | 1 | 0 | 1 | 0 | 0 | ||||
3511 | 2007-02-16 20:15:02 | 2007-12-12 22:59:37 | 2022-03-06 03:28:54.246663 | Ready for checkin | closed | Database layer (models, ORM) | dev | fixed | use a MultipleObjectsReturned exception instead of assert statement in QuerySet.get() | discussion: http://groups.google.com/group/django-developers/browse_thread/thread/685c52d252173bf4/# | Gary Wilson <gary.wilson@gmail.com> | sprintsept14 sprintdec01 | 0 | 1 | 0 | 0 | 0 | 0 | |||
3583 | 2007-02-26 19:23:21 | 2010-10-08 19:38:51 | 2022-03-06 03:29:06.104918 | Accepted | closed | Contrib apps | dev | wontfix | cookie-based modpython / apache authentication | The modpython authentication handler described in http://www.djangoproject.com/documentation/apache_auth/ is great but it uses HTTP authentication. This is not exactly transparent: to see protected static content from within a protected django site the user will have to log in TWICE, once for the django bits, and once for the static bits. In general there are problems with mixing authentication types: security, logging out, etc. I'm pretty sure it should not be too hard to write an authentication handler (hooking into PythonAuthenHandler) which looks for the session / authentication cookie instead of using HTTP authentication. I'd do it myself but it has been a long time since I have written apache / modpython modules, so if anyone out there is an expert some help would be much appreciated. | midfield <midfield@gmail.com> | authentication modpython apache | 0 | 1 | 0 | 0 | 0 | 0 | |||
3639 | 2007-03-02 23:08:19 | 2011-09-28 16:12:16 | 2022-03-06 03:29:16.751444 | Ready for checkin | closed | Generic views | dev | fixed | use newforms in generic create_update view | in order to make newforms available to the generic create_update view (as it is [http://www.djangobook.com/en/beta/chapter09/#cn320 planned], i suppose), i modified the create_update.py to make use of newforms. i have not found any discussion on this, which will definitely have to take place, but as of already using it myself, i hope it can be useful for others and maybe be the base for the final change. existing templates will probably still work but might break. i'm not sure what the {{{new_data = request.POST.copy()}}} (2x) was exactly intended to prevent, so i left them in place; maybe they are not necessary any more. | webograph <webograph@eml.cc> | newforms | 0 | 1 | 0 | 0 | 0 | 0 | |||
4140 | 2007-04-24 08:51:38 | 2015-11-24 19:16:43 | 2022-03-06 03:30:34.906027 | Accepted | new | Core (Management commands) | Bug | Normal | dev | oracle: manage.py syncdb fails with ORA-06552 when a fieldname is a keyword | calling "manage.py syncdb log" with my log model on an empty Oracle database yields the following exception {{{ Traceback (most recent call last): File "./manage.py", line 11, in ? execute_manager(settings) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management.py", line 1730, in execute_manager execute_from_command_line(action_mapping, argv) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management.py", line 1627, in execute_from_command_line action_mapping[action](int(options.verbosity), options.interactive) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management.py", line 573, in syncdb cursor.execute(statement) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/db/backends/util.py", line 13, in execute return self.cursor.execute(sql, params) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/db/backends/oracle/base.py", line 104, in execute return Database.Cursor.execute(self, query, params) cx_Oracle.DatabaseError: ORA-06552: PL/SQL: Compilation unit analysis terminated ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed }}} the model myapp/log/models.py is simple and causes no problem in MySQL, I attached it to this ticket. a subsequent, second run of manage py syncdb goes without error. | frank.hoffsummer@gmail.com | oracle Oracle | 0 | 0 | 0 | 0 | 0 | 0 | ||
4317 | 2007-05-16 20:12:10 | 2007-09-16 03:11:12 | 2022-03-06 03:31:06.048275 | Accepted | closed | Forms | dev | duplicate | Fix compress() in SplitDateTimeField | If a !SplitDateTimeField is not required, and one or both of the date/time fields is None, then datetime.datetime.combine() raises an exception within the compress() method. The current test "if data_list:" (shown below) will only fail if passed an empty list/tuple. If data_list is a non-empty list containing a None value (because one or both of the date/time fields are blank), then the "if data_list:" test still passes, and datetime.datetime.combine() raises an exception. Snippet from compress() method of !SplitDateTimeField class: {{{ if data_list: return datetime.datetime.combine(*data_list) }}} Given this model: {{{ from django.db import models class Foo(models.Model): date = models.DateTimeField(blank=True, null=True) }}} Here is an example: {{{ >>> from scinet.test.models import Foo >>> from django import newforms as forms >>> Form = forms.form_for_model(Foo) >>> Form.base_fields['date'] = forms.fields.SplitDateTimeField(required=False, widget=forms.widgets.SplitDateTimeWidget) >>> f = Form({'date_0': None, 'date_1': None}) >>> f.errors Traceback (most recent call last): File "<console>", line 1, in ? File "/usr/lib/python2.4/site-packages/django/newforms/forms.py", line 93, in _errors self.full_clean() File "/usr/lib/python2.4/site-packages/django/newforms/forms.py", line 187, in full_clean value = field.clean(value) File "/usr/lib/python2.4/site-packages/django/newforms/fields.py", line 473, in clean return self.compress(clean_data) File "/usr/lib/python2.4/site-packages/django/newforms/fields.py", line 493, in compress return datetime.datetime.combine(*data_list) TypeError: combine() argument 1 must be datetime.date, not None }}} I've attached a patch that checks data_list for empty values, verifies that (in the case of non-required fields) either both are blank or both are non-blank, and raises an exception otherwise. | ctdecci@sandia.gov | 0 | 1 | 0 | 1 | 0 | 0 | ||||
4528 | 2007-06-11 08:54:18 | 2012-01-18 21:06:03 | 2022-03-06 03:31:42.135490 | Accepted | closed | Core (Management commands) | New feature | Normal | dev | wontfix | Add DATABASE_PRE_SYNCDB to settings | DATABASE_PRE_SYNCDB is a way of letting users execute SQL before tables are created (for instance through syncdb). The main reason for this is users which don't have control over their db - in practise, no rights to set default modes (which has been brought up [http://code.djangoproject.com/ticket/347 earlier]). This would allow users to set the "correct" charset and storage engine for his/her tables. Another useful feature is that django now has the possibility to create a database.[[BR]] Here's a "real world" example: {{{ #!python DATABASE_PRE_SYNCDB = ( "CREATE DATABASE IF NOT EXISTS %s" % DATABASE_NAME, "SET storage_engine=INNODB", ) }}} Alternative approaches to this has been suggested, such as: * Alter tables ''after'' the table has been created (refs: wiki:AlterModelOnSyncDB) * Export SQL, modify and import manually I personally think this implementation is cleaner and allows greater flexibility. | Johan Bergström <bugs@bergstroem.nu> | database_pre_syncdb sql syncdb | 1 | 1 | 0 | 0 | 0 | 0 | |
4796 | 2007-07-08 01:05:12 | 2012-09-13 18:22:54 | 2022-03-06 03:32:37.974974 | Accepted | closed | Core (Other) | Uncategorized | Normal | dev | fixed | force_unicode error | Hi, I am using the newforms-admin branch from SVN (revision 5632) under apache 2.0.54, flup SVN (revision 2354) and Python 2.4.1. I have a webapp that uses custom admin sites via {{{myadmin = admin.AdminSite()}}} and {{{myadmin.register(...)}}} If I access the admin site via the django internal development server, everything works. If I use fcgi the admin pages work only if I am an anonymous user (in that case I am redirected to the login screen, then to the admin pages and all is good). If I use fcgi and I am already logged in, accessing the admin pages gives this error: {{{ TypeError at /tips/admin/ coercing to Unicode: need string or buffer, __proxy__ found Request Method: GET Request URL: http://www.peertraveller.com/tips/admin/ Exception Type: TypeError Exception Value: coercing to Unicode: need string or buffer, __proxy__ found Exception Location: /home/fpierfed/lib/python2.4/site-packages/django/utils/encoding.py in force_unicode, line 38 Python Executable: /home/fpierfed/bin/python Python Version: 2.4.1 }}} | fpierfed@gmail.com | fcgi unicode __proxy__ databrowse | 0 | 1 | 0 | 0 | 0 | 0 | |
4976 | 2007-07-26 06:56:54 | 2010-12-21 15:16:05 | 2022-03-06 03:33:07.068239 | Ready for checkin | closed | Contrib apps | dev | fixed | The contrib.humanize templatetags fail when given None. | Calling django.contrib.humanize.templatetags.ordinal(None) raises an uncaught TypeError when casting None to an int. The patch simply adds an exception handler for a TypeError, which behaves like the ValueError handler (returning the original arg untouched.) The module lacked doctests, so I didn't add an ordinal(None) test. | anonymous | 0 | 1 | 0 | 0 | 0 | 0 | ||||
5147 | 2007-08-13 12:39:55 | 2013-11-20 16:51:19 | 2022-03-06 03:33:39.798373 | Accepted | new | Internationalization | Bug | Normal | dev | Translation inconsistency for Hungarian language (entry - entries) | I'm building a site right now for a Hungarian customer, so I had to revise the Hungarian translation, and also review the UI bits. There is a small inconsistency I've found, which is pretty important for the Hungarian language (I don't know if this is an issue for other languages, too). So there is a verbose_name and a verbose_name_plural field in the Meta class of a model. The verbose_name_plural field is used in two different contexts: once you can see it in the admin homepage (let's say "Entries" - the same applies to the permissions list), and you see it on the listing page ("2 entries"). The problem is that these two words are the same in English, but not in Hungarian. Remaining at our example: the homepage should say "Bejegyzések" (plural form), and the listing should say "2 bejegyzés" (we don't use the plural form after counts). I hope you can fix the issue. A possible fix: use the verbose_name_plural on the listing page, and introduce a descriptive_name (or something similar) field for the admin index/permissions list. | Szilveszter Farkas <szilveszter.farkas@gmail.com> | i18n hu pl inconsistency i18n-nofix | 0 | 0 | 0 | 0 | 0 | 0 | ||
5160 | 2007-08-15 08:31:32 | 2012-01-08 19:23:57 | 2022-03-06 03:33:41.723018 | Accepted | closed | Database layer (models, ORM) | New feature | Normal | dev | fixed | get_FIELD_url should return a valid URL with spaces escaped | Some of my RSS feeds aren't validating because calling {{{get_FIELD_url}}} for an {{{ImageField}}} isn't escaping spaces in the filename. A simple patch is attached which uses {{{urllib.quote}}} to fix this problem. | Esaj | get_FIELD_url escape urllib.quote | 0 | 1 | 0 | 0 | 0 | 0 | |
5261 | 2007-08-26 03:55:17 | 2008-04-27 02:50:16 | 2022-03-06 03:33:56.892713 | Accepted | closed | Database layer (models, ORM) | dev | fixed | exclude on an empty Q object results in invalid SQL | This is a minor corner case, but as it results in invalid SQL, I figured it should be fixed. sqlite3: {{{ >>> Proposal.objects.exclude(Q()) Traceback (most recent call last): File "<console>", line 1, in <module> File ".\django\db\models\query.py", line 107, in __repr__ return repr(self._get_data()) File ".\django\db\models\query.py", line 480, in _get_data self._result_cache = list(self.iterator()) File ".\django\db\models\query.py", line 188, in iterator cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params) File ".\django\db\backends\util.py", line 19, in execute return self.cursor.execute(sql, params) File ".\django\db\backends\sqlite3\base.py", line 94, in execute return Database.Cursor.execute(self, query, params) OperationalError: near ")": syntax error >>> }}} postgresql: {{{ >>> Proposal.objects.exclude(Q()) Traceback (most recent call last): File "<console>", line 1, in <module> File ".\django\db\models\query.py", line 107, in __repr__ return repr(self._get_data()) File ".\django\db\models\query.py", line 480, in _get_data self._result_cache = list(self.iterator()) File ".\django\db\models\query.py", line 188, in iterator cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params) File ".\django\db\backends\util.py", line 19, in execute return self.cursor.execute(sql, params) ProgrammingError: syntax error at or near ")" LINE 1: ...l"."updated" FROM "propmgr_proposal" WHERE ((NOT ())) ORDER ... ^ >>> }}} | django@dougma,com | exclude Q, qs-rf-fixed | 0 | 0 | 0 | 0 | 0 | 0 | |||
5474 | 2007-09-14 21:10:49 | 2008-01-31 22:51:23 | 2022-03-06 03:34:29.580333 | Accepted | closed | Documentation | dev | fixed | docs/shortcuts.txt needs improvement | docs/shortcuts.txt is simply a stub at the moment. It needs: * Examples for {{{get_object_or_404()}}} and {{{get_list_or_404()}}} * Appropriate crosslinks to other Django documentation (e.g., the DB API and template system) | adrian | sprintsept14 | 0 | 1 | 0 | 0 | 0 | 0 | |||
5515 | 2007-09-16 18:44:24 | 2010-09-10 18:06:57 | 2022-03-06 03:34:35.699877 | Design decision needed | closed | Contrib apps | dev | duplicate | Custom Permission Denied Pages | CSFR Middleware has hard-encoded error page in `_ERROR_MSG` string. It should be located in a separate template -- just like Http500 or Http404 error pages are. | Piotr Lewandowski <django@icomputing.biz> | 0 | 1 | 0 | 0 | 0 | 0 | ||||
5663 | 2007-10-02 12:38:11 | 2010-06-03 18:18:58 | 2022-03-06 03:35:03.278537 | Accepted | closed | Contrib apps | dev | wontfix | markdown 1.6b unicodedecodeerror | Using markdown version 1.6b, the markdown filter in contrib.markup shows a unicode error. It seems the markdown function uses unicode now, because it works when leaving out the smart_str() conversion. | Koen Biermans <koen.biermans@werk.belgie.be> | markdown | 0 | 1 | 0 | 0 | 0 | 0 | |||
5685 | 2007-10-04 19:07:37 | 2014-06-07 17:17:49 | 2022-03-06 03:35:07.034440 | Accepted | closed | Core (Other) | New feature | Normal | dev | fixed | [patch] Add ability to perform pre-runtime setup before executing code | Django should allow developers to elegantly inject functionality prior to general code execution. This is useful if something needs to happen ''before'' models are loaded (register as a ```class_prepared``` listener). Malcolm indicated that he is aware of other cases where this could be useful. This issue has been discussed briefly on django-users. [http://groups.google.com/group/django-users/browse_thread/thread/2f395d5b50086aea/] | __hawkeye__ | 0 | 0 | 0 | 1 | 1 | 0 | ||
5743 | 2007-10-12 08:14:42 | 2007-12-02 15:27:44 | 2022-03-06 03:35:16.095358 | Ready for checkin | closed | Core (Other) | dev | fixed | Django breaks Python 2.5's help() | If you have Django installed for Python 2.5, the internal help system breaks up. To reproduce just open the normal shell (not through manage.py), type "help()" and "modules". Setting DJANGO_SETTINGS_MODULE works around this, but shouldn't be required for vanilla shell. Also 2.4 works just fine (don't have 2.3 anymore). Both 0.96 and HEAD have the same symptoms. | anonymous | 0 | 1 | 0 | 0 | 0 | 0 | ||||
5768 | 2007-10-17 10:44:17 | 2010-11-21 02:28:25 | 2022-03-06 03:35:20.088033 | Ready for checkin | closed | Database layer (models, ORM) | dev | fixed | Allow QuerySet.values() to return values spanning joins (for multi-valued relations) | I'd like to write: {{{ class Tag(models.Model): name = models.CharField(maxlength=50) class Thing(models.Model): tags = models.ManyToManyKey(Tag) Thing.objects.filter(tags__name).values('tags.name').distinct() }}} My use case is slightly more complicated (I use django-tagging and the GenericRelation does not make things simpler). Of course I could do it manually with a loop, but it is necessary to have a queryset for some things, such as using a generic view. | anonymous <tobutaz+bugs@gmail.com> | values, values_list, one-to-many, many-to-many reverse | 0 | 1 | 0 | 0 | 0 | 0 | |||
5797 | 2007-10-22 21:15:11 | 2018-05-21 15:10:32 | 2022-03-06 03:35:24.751783 | Accepted | new | HTTP handling | Bug | Normal | dev | decorator_from_middleware can cause middleware hooks to run out of correct order. | cache_page, gzip_page, and conditional_page all use decorator_from_middleware. decorator_from_middleware wraps the view function to simulate middleware being run on a per-view basis. Here's the interesting bit: {{{ def _wrapped_view(request, *args, **kwargs): if hasattr(middleware, 'process_request'): result = middleware.process_request(request) if result is not None: return result if hasattr(middleware, 'process_view'): result = middleware.process_view(request, view_func, *args, **kwargs) if result is not None: return result try: response = view_func(request, *args, **kwargs) except Exception, e: if hasattr(middleware, 'process_exception'): result = middleware.process_exception(request, e) if result is not None: return result raise if hasattr(middleware, 'process_response'): result = middleware.process_response(request, response) if result is not None: return result return response }}} The problem is that middleware's order is important. Suppose two middleware decorators, A and B, are applied to the same view. The normal flow of middleware processing would be: A.process_request, B.process_request, A.process_view, B.process_view, view, B.process_response, A.process_response. The flow of the *decorated execution* is this: A.process_request, A.process_view, B.process_request, B.process_view, view, B.process_response, A.process_response. This is not yet a real-world issue as far as I know, but seems to be a lurking problem. I think the only reason it hasn't surfaced is that view decorators are fairly uncommon. I don't see a simple way to fix this. | jdunck | cache middleware decorator gzip conditional http | 0 | 1 | 1 | 0 | 0 | 0 | ||
5843 | 2007-10-31 00:51:39 | 2012-01-09 08:47:18 | 2022-03-06 03:35:32.031293 | Accepted | closed | Documentation | Uncategorized | Normal | dev | fixed | Newforms > Provide example of how to do Form.clean_fieldname() and Form.clean() | It would be helpful to show an example of how to implement your own clean_fieldname() and clean() methods for subclassed forms. (N.B. An example of how to clean a subclassed field IS shown - ie field.clean(self, value)) Presumably cleaning should be done by using the .data attribute of forms, although .data doesn't appear to be documented. | anonymous | newforms | 0 | 1 | 0 | 0 | 0 | 0 | |
5899 | 2007-11-08 14:08:08 | 2021-11-23 11:47:07 | 2022-03-06 03:35:41.012357 | Accepted | new | contrib.admin | New feature | Normal | newforms-admin | Allow admin fieldsets to be collapsible but not initially collapsed | I want to use the collapse feature of the admin, but not have the field initially collapsed, so I made this little patch. It adds a "collapsible" class that does just that. It also patches the documentation. | Ionut Ciocirlan <ionut.ciocirlan@gmail.com> | admin fieldset collapsed collapsible nfa-someday | 0 | 1 | 0 | 1 | 0 | 1 | ||
5929 | 2007-11-12 23:00:59 | 2018-11-04 13:12:29 | 2022-03-06 03:35:46.980308 | Accepted | new | Database layer (models, ORM) | New feature | Normal | dev | Allow Fields to use multiple db columns (complex datatypes) | Currently it seems that it is not possible to have complex db filds. For example: [https://dev.leipzig.freifunk.net/trac/browser/ffsomething/branches/generic/apps/management/models.py Implementation of a IP model] which actually should be a field type not a model. The implementation is not clean, because foreign key lookups for example do not work. The model maps for example: {{{ NetworkAddress.objects.filter(ip__in="192.168.0.10/16") }}} into a complex query for a ip resisting in a network range. Due the fact that model fields can only map to one db column, many complex data types can't be implemented. For example a ipv6 ip address which is a 128 bit value can't be handled by most db implementations of integer fields, so it has to be expanded to multiple columns plus a additional netmask column. Using varchar doesn't work because there is no way to search for network ranges or IPs in ranges, etc... I think a field should be able to implement lookup mappings which can be overridden to implement complex datatypes as well as use multiple db fields. | poelzi | 0 | 0 | 0 | 0 | 0 | 0 | |||
5943 | 2007-11-14 22:42:38 | 2011-09-28 16:12:16 | 2022-03-06 03:35:49.282177 | Accepted | closed | Core (Management commands) | dev | fixed | django-admin.py should work like manage.py if --setting option is provided | Right now, app-provided commands aren't included, startproject is still available, and startapp uses the current directory rather than the project directory. The attached patch makes django-admin.py command --settings=blah work just like manage.py invoked on the same project. | toddobryan | 0 | 1 | 0 | 0 | 1 | 0 | ||||
6016 | 2007-11-22 18:25:37 | 2008-03-08 11:23:23 | 2022-03-06 03:36:00.795905 | Accepted | closed | contrib.admin | dev | invalid | Admin crash when deleting an object | I get this error: {{{ DjangoUnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128). You passed in DjangoUnicodeDecodeError('ascii', '\xc2\xbfProbando una pregunta? -> ', 0, 1, 'ordinal not in range(128)') (<class 'django.utils.encoding.DjangoUnicodeDecodeError'>) }}} when I try to delete an object from the admin zone. The character ¿ breaks it. More info. Model: {{{ #!python class Encuesta( models.Model ): ... pregunta = models.CharField( max_length=255 ) def __unicode__( self ): return self.pregunta ... }}} Thanks | aribao@gmail.com | unicode delete | 0 | 0 | 0 | 0 | 0 | 0 | |||
6148 | 2007-12-07 00:27:32 | 2021-10-07 08:40:35 | 2022-03-06 03:36:21.749085 | Accepted | new | Database layer (models, ORM) | New feature | Normal | dev | Add generic support for database schemas | There is frequently a need for Django to access data from tables in other schemas; this is especially true when building Django apps on top of legacy databases. Currently, the proposed solution is to add support for the {{{set search_path}}} command (#1051) via custom initialization sql (#6064). This is a good solution for PostgreSQL users, but it will not solve the problem in Oracle, which has no analogue of {{{set search_path}}}. Solving the problem in a generic way will require adding a per-app or per-model db_schema option, in order to issue SQL queries using the syntax {{{"schema_name"."table_name"}}}. This may also require more advanced introspection (at least in Oracle) to determine whether the table already exists when running management commands. A current workaround in Oracle is to manually create private synonyms inside the Django schema, referencing the necessary tables from other schemas. However, the management commands do not currently recognize the existence of synonyms via introspection. Additionally, the synonym solution may not be sufficiently generic in the long term. | ikelly | oracle postgresql mysql schemas | 0 | 1 | 1 | 0 | 0 | 0 | ||
6201 | 2007-12-13 09:53:09 | 2008-06-26 04:54:11 | 2022-03-06 03:36:30.060220 | Ready for checkin | closed | Template system | dev | fixed | Improved cache tag to allow timeout to be a template variable | from ticket:1065 Somehow the idea of having cache time spread all over the place seems a bit cluttering especially if you use the tag more frequently throughout templates. Having the timeout in a single variable is helpful. The patch allows the timeout to be a template variable and also adds some extra tests. | zz <zodizz@gmail.com> | template caching | 0 | 1 | 0 | 0 | 0 | 0 | |||
6382 | 2008-01-15 10:30:57 | 2008-03-18 20:58:39 | 2022-03-06 03:36:59.557277 | Accepted | closed | Documentation | dev | fixed | Document request.urlconf | There are already a couple of project out there that use different subdomains by patching request.urlconf. I don't know what's the plan but I think that should be documented. | mitsuhiko | 0 | 0 | 0 | 0 | 0 | 0 | ||||
6544 | 2008-02-04 12:14:31 | 2013-09-22 09:03:53 | 2022-03-06 03:37:24.850611 | Accepted | closed | Template system | Bug | Normal | dev | wontfix | Regression with new templates extends checks | SVN r7084 breaks existing templates when a comment node is the first element in a template. So templates of the form {{{ {% comment %}bla{% endcomment %} {% extends ... %} }}} will throw a syntax error with the new behaviour. I suggest allowing comments before the extends tag. | Bastian Kleineidam <calvin@debian.org> | 0 | 1 | 1 | 1 | 1 | 0 | ||
6618 | 2008-02-17 16:39:27 | 2010-01-28 13:46:18 | 2022-03-06 03:37:35.926182 | Accepted | closed | contrib.syndication | dev | fixed | Make use of templates in feeds.py optional | When creating a feed you have to specify title, description and link for each item. For the link this is really easy by overriding the item_link method, which is called for every item. {{{ def item_link(self, obj): return '/feed/'+str(obj.id) }}} However for the description and title fields you have to create two template files which in most cases will consist of only a single line of code("{{ obj.foo }}"). IMHO this is extremely ugly - it would be much nicer if you could just overide one method similar to item_link: {{{ def item_title(self, obj): return obj.header def item_description(self, obj): return obj.teaser }}} | christoph.neuroth@gmx.net | 0 | 1 | 0 | 0 | 0 | 0 | ||||
6646 | 2008-02-22 19:17:42 | 2014-08-31 19:32:56 | 2022-03-06 03:37:39.724551 | Accepted | closed | Template system | Bug | Normal | dev | wontfix | included template blocks are not being overridden by parent template. | When including a template into a parent template, the child-template's blocks are not overridden by the parent. For example: base.html: {{{ {% if is_satchmo %} {% include "satchmo_base.html" %} {% else %} {% include "journal_base.html" %} {% endif %} }}} journal_base.html contains the following block: {{{ {% block content%}{% endblock %} }}} view_template.html extends base.html (with the context variable is_satchmo == False). view_template.html contains {% block content%}{% endblock %} which should filled with data from the view's context variable. If I rename journal_base.html to base.html - everything works fine - but when I use the version of base.html that relies on the include tag, {% block content %} doesn't get overridden. The documentation says that context vairables are available to included templates, so not being able to override blocks seems like a bug. | anonymous | include, extends, block | 0 | 1 | 0 | 0 | 1 | 0 | |
6702 | 2008-03-03 12:07:44 | 2013-04-10 20:03:47 | 2022-03-06 03:37:47.595027 | Accepted | closed | Forms | Cleanup/optimization | Normal | dev | wontfix | ModelForm: assert given instance is instance of model | Hi, this assert statement can help to find bugs early. Patch attached. | guettli | 0 | 1 | 1 | 0 | 1 | 0 | ||
6750 | 2008-03-10 20:11:53 | 2011-03-03 10:01:29 | 2022-03-06 03:37:54.407014 | Design decision needed | closed | contrib.admin | newforms-admin | fixed | Invalid xhtml in AdminFileWidget (target="_blank") | As requested in #5695, here is the fix for the invalid xhtml in the AdminFileWidget. It's just a target="_blank" replaced by the javascript open.window(). May be I could develop another patch changing string variables by a dictionay to make the code clearer. | garcia_marc | admin invalid xhtml AdminFileWidget nfa-someday | 0 | 1 | 0 | 0 | 0 | 0 | |||
6773 | 2008-03-14 19:42:48 | 2011-11-01 15:26:06 | 2022-03-06 03:37:57.605453 | Design decision needed | closed | Core (Serialization) | Cleanup/optimization | Normal | 1.3 | needsinfo | Confusing error when ForeignKey lookup fails while serializing | I got a confusing error when running {{{manage.py dumpdata}}}: {{{ Error: Unable to serialize database: }}} Turns out that a {{{ForeignKey}}} had been marked {{{blank=True}}} but not {{{null=True}}}. The error message gave no hint as to even which model to look in; the real exception lay hidden behind two levels of error handlers. Maybe serializers should pass on exceptions? | kcarnold | dumpdata exception | 0 | 0 | 0 | 1 | 1 | 0 | |
7076 | 2008-04-24 12:06:54 | 2011-09-28 16:12:17 | 2022-03-06 03:38:39.654794 | Accepted | closed | Database layer (models, ORM) | dev | fixed | qs.exclude(something=123) should not exclude objects with something=None | {{{ from django.db import models class A(models.Model): str = models.CharField(null=True, blank=True, max_length=20) def __unicode__(self): return self.str or 'None' }}} {{{ In [1]: from test import models In [2]: a = models.A.objects.create(str='a') In [3]: b = models.A.objects.create(str=None) In [4]: models.A.objects.exclude(str='a') Out[4]: [] In [5]: models.A.objects.filter(str__isnull=True).exclude(str='a') Out[5]: [] In [6]: models.A.objects.all() Out[6]: [<A: a>, <A: None>] }}} Expected output: {{{ Out[4]: [<A: None>] Out[5]: [<A: None>] }}} Tested with trunk & queryset-refactor. | Thomas Steinacher <tom@eggdrop.ch> | qsrf-cleanup | 0 | 1 | 1 | 1 | 1 | 0 | |||
7257 | 2008-05-18 15:44:31 | 2011-09-28 16:12:16 | 2022-03-06 03:39:09.197192 | Ready for checkin | closed | Contrib apps | dev | duplicate | Flatpage view returns 404 unless url contains trailing slash | The admin interface for flatpages instructs user to use a trailing slash for the flatpage url. However, if an attempt to access the flatpage without the trailing slash is made, a 404 error is returned instead of the flatpage. | sean | flatpages | 0 | 1 | 0 | 0 | 0 | 0 | |||
7404 | 2008-06-10 09:53:39 | 2011-09-28 16:12:17 | 2022-03-06 03:39:32.363861 | Design decision needed | closed | contrib.auth | dev | wontfix | Add last_login and date_created to User's admin list | A small patch addin 'date_joined', 'last_login' to list_display and list_filter of the User model - it's useful when you have to check how many new users you got from new ads etc. | riklaunim@gmail.com | 0 | 1 | 0 | 0 | 0 | 0 | ||||
7431 | 2008-06-12 01:33:18 | 2010-11-17 20:30:45 | 2022-03-06 03:39:36.587159 | Accepted | closed | contrib.auth | dev | fixed | change import pwd library for import os in createsuperuser | the file createsuperuser.py (rev 7590) is using the pwd method to detect default user. while this is good alternative on Unix based systems, this library (pwd) is not included on the windows version of python. [[BR]] my suggestion is to change this: {{{ try: import pwd except ImportError: default_username = '' else: default_username = pwd.getpwuid(os.getuid())[0].replace(' ', '').lower() }}} [[BR]] with [[BR]] {{{ default_username = os.path.expanduser("~").replace(' ', '').lower().split(os.sep)[-1] }}} [[BR]] or something similar, in order to get a windows compartible method too. | httpdss | 0 | 1 | 0 | 0 | 0 | 0 | ||||
7482 | 2008-06-17 14:55:10 | 2008-06-26 05:21:30 | 2022-03-06 03:39:45.014198 | Accepted | closed | Documentation | dev | fixed | Wording in model documentation | URL: http://www.djangoproject.com/documentation/model-api/ Under the Relationships (Many-to-one relationships), look for the ForeignKey optional arguments. The first optional argument (edit_inline) contains a description that reads: "If not False, this related object is edited..." I've seen "If not False" in documentation before but to me, it reminds me of "if not not true". Would "If True, this related object is edited..." sound/read better? Sorry if I'm just splitting hairs here. | cbmeeks <cbmeeks@gmail.com> | 0 | 0 | 0 | 0 | 0 | 0 | ||||
7507 | 2008-06-19 18:37:28 | 2009-02-08 16:11:38 | 2022-03-06 03:39:49.294469 | Accepted | closed | contrib.auth | newforms-admin | duplicate | contrib.auth login form shouldn't limit username to 30 chars | That's only relevant if you're using the `User` model, and the form shouldn't be so tightly coupled with that since alternate auth backends can be used. (I for one am encountering this as a problem). | SmileyChris | 0 | 1 | 0 | 0 | 0 | 0 | ||||
7519 | 2008-06-21 10:35:57 | 2011-09-28 16:12:17 | 2022-03-06 03:39:51.355642 | Unreviewed | closed | contrib.auth | newforms-admin | fixed | Bad testing hack in newforms-admin tests | [http://code.djangoproject.com/browser/django/branches/newforms-admin/django/contrib/auth/tests/forms.py#L23] That workaround should be removed when #7514 's solution gets merged to nfa. I'm just opening the ticket to remember this ;) | telenieko | 0 | 0 | 0 | 0 | 0 | 0 | ||||
7556 | 2008-06-27 15:32:35 | 2021-12-31 06:39:42 | 2022-03-06 03:39:56.720336 | Accepted | new | Core (Management commands) | Bug | Normal | dev | inspectdb fails in MySql if a table references a table outside the current schema | If a table contains a foreign key that refers to another table that sits outside the schema, that index includes a '.' in the table name. Suppose our current schema is `schema1`: {{{ CREATE TABLE `T1` ( `ACID` int(8) unsigned NOT NULL, `SITE` varchar(8) character set latin1 default NULL, CONSTRAINT `FK_T1_SITE` FOREIGN KEY (`SITE`) REFERENCES `schema2`.`site` (`SITE`) ) }}} For this situation, inspectdb will return something similar to this: {{{ _mysql_exceptions.ProgrammingError: (1146, "Table 'schema1.site' doesn't exist") }}} So it tries to use `schema1.site` as the table to introspect instead of the appropriate `schema2`.`site` Notice it not only needs to use the schema as part of the table name, but also not quote the '.'. Also, introspection.py was not pulling the schema name and just assuming the current schema, which for most cases is right, but in this case causes issues for legacy databases. | brockweaver | mysql foreign key schema inspectdb | 0 | 1 | 0 | 1 | 0 | 0 | ||
7558 | 2008-06-27 16:40:52 | 2011-09-28 16:12:17 | 2022-03-06 03:39:56.996771 | Ready for checkin | closed | contrib.auth | dev | fixed | svn:ignore properties missing | I've found that svn:ignore properties are missing for *.pyc at least on next directories: django/contrib/auth/management django/contrib/auth/management/commands | garcia_marc | svn | 0 | 0 | 0 | 0 | 0 | 0 | |||
7567 | 2008-06-29 15:35:28 | 2009-03-26 16:45:59 | 2022-03-06 03:39:58.221070 | Unreviewed | closed | contrib.auth | 0.96 | fixed | modpython.authenhandler does not work | I follow the document <Authenticating against Django’s user database from Apache> but django always return apache.HTTP_UNAUTHORIZED.[[BR]] At source C:\Python24\Lib\site-packages\django\contrib\auth\handlers\modpython.py, modpython does not work on my pc box(winxp, apache 2.0, mod_python 3.3.1). req.user always return null.[[BR]] mod_python said req.get_basic_auth_pw() must called before using req.user. My solution is, add {{{ req.get_basic_auth_pw() }}} at line 30 before {{{ kwargs = {'username': req.user, 'is_active': True} }}} | dannychen | mod_python | 0 | 0 | 0 | 0 | 0 | 0 | |||
7577 | 2008-06-30 19:10:53 | 2008-06-30 20:07:12 | 2022-03-06 03:39:59.746180 | Unreviewed | closed | contrib.auth | dev | invalid | Small change to not display login page for logged users | File django.contrib.auth.views {{{ def login(request, template_name='registration/login.html', redirect_field_name=REDIRECT_FIELD_NAME): "Displays the login form and handles the login action." manipulator = AuthenticationForm() redirect_to = request.REQUEST.get(redirect_field_name, '') if request.user.is_authenticated() or request.POST: # Light security check -- make sure redirect_to isn't garbage. if not redirect_to or '//' in redirect_to or ' ' in redirect_to: from django.conf import settings redirect_to = settings.LOGIN_REDIRECT_URL if request.user.is_authenticated(): return HttpResponseRedirect(redirect_to) if request.POST: errors = manipulator.get_validation_errors(request.POST) if not errors: from django.contrib.auth import login login(request, manipulator.get_user()) if request.session.test_cookie_worked(): request.session.delete_test_cookie() return HttpResponseRedirect(redirect_to) else: errors = {} ... }}} | Fido | 0 | 0 | 0 | 0 | 0 | 0 | ||||
7584 | 2008-07-01 11:26:51 | 2009-01-08 08:49:54 | 2022-03-06 03:40:00.841030 | Unreviewed | closed | contrib.auth | dev | invalid | AUTH_PROFILE_MODULE should be able to provide some default profile | Currently if there are users without a profile in the database django raises an DoesNotExist-exception. This exception has to be cought everywhere some application wants to access the profile, which leads to a lot of duplicate code...at least if you use the profile a lot inside your project. This could easily be fixed by adding some way to auto-create a default profile if necessary and possible. One suggestion might be defining some API that could be called, for example: * The model (or model-manager) provides some method, that could be called if the profile does not exist * Otherwise the DoesNotException gets raised like before I propose changing User.get_profile() so it supports such an API. Patch using model._default_manager.create_default_profile() follows. | David Danier <goliath.mailinglist@gmx.de> | 0 | 1 | 0 | 0 | 0 | 0 | ||||
7592 | 2008-07-01 20:08:52 | 2008-07-01 20:14:52 | 2022-03-06 03:40:02.013933 | Unreviewed | closed | contrib.auth | dev | wontfix | get_or_create for User | Shouldn't there be a get_or_create_profile() function for User to go along with get_profile() ? | MihaiD | get_or_create profile | 0 | 0 | 0 | 0 | 0 | 0 | |||
7623 | 2008-07-03 15:23:26 | 2021-07-31 03:29:24 | 2022-03-06 03:40:06.805816 | Accepted | new | Database layer (models, ORM) | New feature | Normal | dev | Multi-table inheritance: Add the ability create child instance from existing parent | As it exists now, multi-table inheritance does not allow for the creation of a child model instance that inherits from an existing parent model instance. For example: Parent Class- {{{ class Place(models.Model): name = models.CharField(max_length=50) address = models.TextField(max_length=150) }}} Child Classes- {{{ class Restaurant(Place): place = models.OneToOneField(Place, parent_link=True) cuisine = models.CharField(max_length=75) rating = models.IntegerField() class Bar(Place): parent = models.OneToOneField(Place, parent_link=True) happy_hour = models.BooleanField() beers_on_tap = models.ManyToManyField("Beers", null=True, blank=True) }}} Sample Use-case- When the system is first deployed, a restaurant instance is created. Later, the restaurant adds a bar to increase revenue, and we now want to create a Bar model instance for the parent Place for the restaurant. I would propose the following interface for doing so: {{{ parentPlace = Restaurant.objects.get(name__iexact="Bob's Place").parent barInstance = Bar(parent=parentPlace, happy_hour=True) }}} However, if you attempt to create an instance in this manner now, you receive a DatabaseIntegrityError, saying that a Place object with that id already exists. | brooks.travis@gmail.com | model-inheritance, multi-table-inheritance | 0 | 1 | 1 | 1 | 0 | 0 | ||
7657 | 2008-07-07 12:55:58 | 2011-09-28 16:12:16 | 2022-03-06 03:40:12.060037 | Unreviewed | closed | contrib.auth | newforms-admin | invalid | newforms-admin: django/contrib/auth/decorators.py should be using wraps | http://code.djangoproject.com/browser/django/branches/newforms-admin/django/contrib/auth/decorators.py wraps and update_wrapper are imported but not used. This is probably going to break things further down the line e.g. URL reversing which can get confused by decorators. | simon | 0 | 0 | 0 | 0 | 0 | 0 | ||||
7732 | 2008-07-12 14:30:08 | 2019-05-15 15:41:02 | 2022-03-06 03:40:23.387297 | Accepted | new | Database layer (models, ORM) | New feature | Normal | dev | Oracle Backend with SessionPool | This new backend uses Oracle session pool to improve database performance in threaded environment. Overall speedup for large amounts of small queries is 2-3 times. | halturin | yandex-sprint oracle session pool | 0 | 1 | 1 | 1 | 1 | 0 | ||
7756 | 2008-07-15 12:32:19 | 2008-07-19 00:28:49 | 2022-03-06 03:40:28.503994 | Unreviewed | closed | contrib.auth | dev | duplicate | contrib.auth dependency on contrib.admin | Commit #7808 introduced contrib.auth dependency on contrib.admin. It appears if you included django.contrib.auth in INSTALLED_APPS and didn't include django.contrib.admin. If you will try to run tests (manage.py test), you will see 2 test errors: {{{ ====================================================================== ERROR: Email is sent if a valid email address is provided for password reset ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\Python\django-trunk\django\contrib\auth\tests.py", line 73, in test_email_found response = self.client.post('/password_reset/', {'email': 'staffmember@example.com'}) File "D:\Python\django-trunk\django\test\client.py", line 286, in post return self.request(**r) File "D:\Python\django-trunk\django\core\handlers\base.py", line 86, in get_response response = callback(request, *callback_args, **callback_kwargs) File "D:\Python\django-trunk\django\contrib\auth\views.py", line 80, in password_reset form.save(email_template_name=email_template_name) File "D:\Python\django-trunk\django\contrib\auth\forms.py", line 99, in save t = loader.get_template(email_template_name) File "D:\Python\django-trunk\django\template\loader.py", line 80, in get_template source, origin = find_template_source(template_name) File "D:\Python\django-trunk\django\template\loader.py", line 73, in find_template_source raise TemplateDoesNotExist, name TemplateDoesNotExist: registration/password_reset_email.html ====================================================================== ERROR: Error is raised if the provided email address isn't currently registered ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\Python\django-trunk\django\contrib\auth\tests.py", line 65, in test_email_not_found response = self.client.get('/password_reset/') File "D:\Python\django-trunk\django\test\client.py", line 266, in ge… | nail.xx | admin dependency test | 0 | 0 | 0 | 0 | 0 | 0 | |||
7778 | 2008-07-16 08:15:49 | 2009-02-25 19:51:44 | 2022-03-06 03:40:31.880752 | Accepted | closed | Core (Other) | dev | fixed | Model subclasses cannot be deleted if a nullable foreign key relates to a model that relates back | We use model subclasses in our application and we have come across a situation where Django gets confused when it tries to delete a model object and its related items. Our model contains a class that refers to a base/subclass model with a foreign key, and the base/subclass model in refers back to this class in turn. The example below should make this clearer. Let's say we are interested in celebrities, which are categorised into subclasses including the TV Chef celebrity subclass. Celebrities can have multiple fans, but a celebrity can have only one "greatest" fan. {{{ class Celebrity(models.Model): name = models.CharField("Name", max_length=20) greatest_fan = models.ForeignKey("Fan", null=True, unique=True) class TvChef(Celebrity): pass class Fan(models.Model): fan_of = models.ForeignKey(Celebrity) }}} With these model relationships, Django will be unable to delete the !TvChef subclass if it has multiple related Fans. If you run the test program below, it will try to nullify a non-existent column in the !TvChef database table. {{{ from subclass_deletion.models import * c1 = Celebrity.objects.create(name="Madonna") c2 = Celebrity.objects.create(name="The Queen") c3 = TvChef.objects.create(name="Huey") f1 = Fan.objects.create(fan_of=c3) f2 = Fan.objects.create(fan_of=c3) c3.greatest_fan = f1 c3.save() # You cannot delete the TvChef subclass, it fails with the error: # OperationalError: no such column: greatest_fan_id # This error occurs when it tries to run the SQL (sqlite3): # UPDATE "subclass_deletion_tvchef" SET "greatest_fan_id" = NULL WHERE "celebrity_ptr_id" IN (3) c3.delete() }}} The attached patch performs a sanity-check before Django attempts to clear related fields, and will avoid doing so if it cannot find the expected column name in the class that is the "to" destination. | James Murty | foreign key | 0 | 1 | 1 | 0 | 0 | 0 | |||
7786 | 2008-07-16 20:58:25 | 2011-09-28 16:12:17 | 2022-03-06 03:40:32.855404 | Accepted | closed | Database layer (models, ORM) | dev | fixed | queries test failure on Python 2.3 | Running the test suite on Python 2.3, I get a test failure in the queries regression test: {{{ D:\u\kmt\django\trunk\tests>d:\bin\Python2.3.5\python.exe runtests.py --settings=testsettings queries ====================================================================== FAIL: Doctest: regressiontests.queries.models.__test__.API_TESTS ---------------------------------------------------------------------- Traceback (most recent call last): File "d:\u\kmt\django\trunk\django\test\_doctest.py", line 2180, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for regressiontests.queries.models.__test__.API_TESTS File "D:\u\kmt\django\trunk\tests\regressiontests\queries\models.py", line unknown line number, in API_TESTS ---------------------------------------------------------------------- File "D:\u\kmt\django\trunk\tests\regressiontests\queries\models.py", line ?, in regressiontests.queries.models.__test__.API_TESTS Failed example: LoopX.objects.all() Expected: Traceback (most recent call last): ... FieldError: Infinite loop caused by ordering. Got: [] ---------------------------------------------------------------------- File "D:\u\kmt\django\trunk\tests\regressiontests\queries\models.py", line ?, in regressiontests.queries.models.__test__.API_TESTS Failed example: LoopZ.objects.all() Expected: Traceback (most recent call last): ... FieldError: Infinite loop caused by ordering. Got: [] ---------------------------------------------------------------------- Ran 1 test in 0.591s FAILED (failures=1) }}} I believe it's caused by this Python bug: http://bugs.python.org/issue1242657 which caused exceptions raised by !__len!__ to be silently swallowed. A traceback from when the exception is successfully raised: {{{ >>> LoopX.objects.all() Traceback (most recent call last): File "<console>", line 1, in <module> File "d:\u\kmt\django\trunk\django\db\models\query.… | Karen Tracey <kmtracey@gmail.com> | 0 | 0 | 0 | 0 | 0 | 0 | ||||
7804 | 2008-07-18 01:27:12 | 2008-08-23 01:10:47 | 2022-03-06 03:40:35.502666 | Design decision needed | closed | Forms | dev | invalid | newforms.fields.UploadedFile Invalid Deprecation warning. | I'm not sure if anyone has noticed this yet, but in [7814], newforms.fields.UploadedFile.content was changed to newforms.fields.UploadedFile.data without being listed on BackwardsIncompatibleChanges or raising a deprecation warning. However the [7859] change has a deprecation warning for the UploadedFile.data attribute, which was only in there for 45 revisions. It would be nice to also have a deprecation warning for UploadedFile.content. http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Uploa... http://code.djangoproject.com/changeset/7814 http://code.djangoproject.com/changeset/7859 | CollinAnderson | 2070-fix | 0 | 0 | 0 | 0 | 0 | 0 | |||
7830 | 2008-07-19 05:58:45 | 2011-09-28 16:12:16 | 2022-03-06 03:40:40.012862 | Accepted | closed | Uncategorized | dev | fixed | removal of some deprecated features for 1.0 | Attached is a patch that removes: * "simple" cache backend * `ObjectPaginator` * `edit_inline_type` argument for `ForeignKey` fields * QOperator, QNot, QAnd and QOr * maxlength argument Along with mentions of them in the docs. Note, the following should also be removed (if applying the patch doesn't do it): * django/utils/maxlength.py * tests/regressiontests/maxlength/ | gwilson | 0 | 0 | 0 | 0 | 0 | 0 | ||||
7851 | 2008-07-20 11:39:24 | 2008-08-14 23:14:48 | 2022-03-06 03:40:43.734856 | Unreviewed | closed | contrib.auth | dev | worksforme | In admin console getting: "You don't have permission to edit anything" | In admin console getting: "You don't have permission to edit anything" OS: Mac Os X ver 10.4 (tiger) and Windows XP SP2. python version: 2.5.2 (macports) 2.5.2 on Windows also. django version: (0, 97, 'pre'). using db sqlite3. Just checked out form SVN. I'm getting "You don't have permission to edit anything" when logging in admin application, I'm logged in successfully but I'm not able to edit anything. From sqlite command line I can see the account in auth_user table. In my XP box this was working with no problem with a previous version, I just SVN co to see if it was happening also in another OS. I tried creating another superuser account, but the problem remains. | eka | 0 | 0 | 0 | 0 | 0 | 0 | ||||
7891 | 2008-07-22 13:03:28 | 2008-07-22 14:29:02 | 2022-03-06 03:40:50.729467 | Unreviewed | closed | contrib.auth | dev | worksforme | Auth Test Suite not always valid | Hello, the PasswordReset TestCase is not always valid, specifically the: {{{ def test_email_not_found(self): "Error is raised if the provided email address isn't currently registered" response = self.client.get('/password_reset/') self.assertEquals(response.status_code, 200) response = self.client.post('/password_reset/', {'email': 'not_a_real_email@email.com'}) self.assertContains(response, "That e-mail address doesn't have an associated user account") self.assertEquals(len(mail.outbox), 0) }}} In my case, the url /password_reset/ doesn't exist. | tolano | testcase test authentication email not found | 0 | 0 | 0 | 0 | 0 | 0 | |||
7905 | 2008-07-22 23:48:36 | 2011-09-28 16:12:16 | 2022-03-06 03:40:53.088708 | Ready for checkin | closed | Documentation | dev | fixed | document raw_id_fields option in InlineModelAdmin | A quick patch to document this option. {{{ Index: docs/admin.txt =================================================================== --- docs/admin.txt (revision 8051) +++ docs/admin.txt (working copy) @@ -569,6 +569,17 @@ .. _max_num in formsets: ../modelforms/#limiting-the-number-of-objects-editable +``raw_id_fields`` +~~~~~~~~~~~~~~~~~ + +By default, Django's admin uses a select-box interface (<select>) for +fields that are ``ForeignKey``. Sometimes you don't want to incur the +overhead of having to select all the related instances to display in the +drop-down. + +``raw_id_fields`` is a list of fields you would like to change +into a ``Input`` widget for the primary key. + ``template`` ~~~~~~~~~~~~ }}} | Matthew Flanagan <mattimustang@gmail.com> | 0 | 1 | 0 | 0 | 0 | 0 | ||||
7921 | 2008-07-23 17:26:28 | 2011-09-28 16:12:16 | 2022-03-06 03:40:55.752244 | Ready for checkin | closed | Uncategorized | dev | fixed | Tests that use 8-bit bytestrings fail on Python 2.6/sqlite3 | Running the test suite on Python 2.6 beta2 we get several failures with this sqlite3 complaint: {{{ return Database.Cursor.execute(self, query, params) ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings. }}} Checking out the first couple so far they are due to tests that are indeed using bytestrings, not unicode strings, as arguments, for example: http://code.djangoproject.com/browser/django/trunk/tests/modeltests/custom_pk/models.py#L107 has: >>> emp = Employee(employee_code='jaźń') Shouldn't that be: >>> emp = Employee(employee_code=u'jaźń') ? Changing it like so makes the test succeed on 2.6b2 and has no apparent ill-effects on 2.3/2.5. But I'm a little surprised this hasn't caused a problem before, so I fear I'm missing something here? Should these calls be changed to use `u''` or is there something else that should be done to make them work on 2.6? | Karen Tracey <kmtracey@gmail.com> | python26 | 0 | 1 | 0 | 0 | 0 | 0 | |||
7934 | 2008-07-24 12:20:07 | 2008-07-25 14:02:19 | 2022-03-06 03:40:58.267365 | Unreviewed | closed | GIS | gis | wontfix | adding "nearest_to" search to geodjango | based on paulsmith's djangocodesnippet 190. | lkcl | nearest_to queryset | 0 | 1 | 0 | 0 | 1 | 0 | |||
7952 | 2008-07-25 05:48:19 | 2010-09-11 04:22:16 | 2022-03-06 03:41:01.249708 | Design decision needed | closed | contrib.auth | dev | fixed | Auth messages should accept a label parameter | If one wants to differenciate an user message created with auth to an user, this *one* should be able to. Like, request.user.message_set.create(label="warning", message="Do not poke your nose!") Label could/should be optional. Or something like that. So, the developer would be able to color the output message easyly. This seems like a useful and simple ticket. | italomaia | message, user, coloring | 0 | 0 | 0 | 0 | 0 | 0 | |||
7989 | 2008-07-27 13:42:50 | 2012-09-22 08:13:42 | 2022-03-06 03:41:06.725543 | Design decision needed | closed | contrib.auth | Uncategorized | Normal | dev | duplicate | Logout view should require POST request | This ticket assumes that the mantra "GET and HEAD methods SHOULD NOT have the significance of taking an action other than retrieval" is to be taken seriously and applied consistently. See for example ticket #3651. The documentation on authentication suggests a logout view that takes a GET request ('How to log a user out'). Additionally, the django.contrib.auth.views.logout generic view accepts a GET request. This seems to go against the above principle, as it changes the internal state of the application. Please consider a change for logout similar to the patch from ticket #3651. I am willing to do it myself if this ticket is accepted. | jcassee | authentication | 0 | 0 | 0 | 0 | 0 | 0 | |
8052 | 2008-07-31 05:55:38 | 2011-10-10 15:07:30 | 2022-03-06 03:41:15.517274 | Accepted | closed | contrib.admin | Bug | Normal | dev | fixed | Password Change Forms overrides userlinks | Password change form explicitly sets {{{ {% block userlinks %} }}} which is preventing custom templates from showing through for that portion of the page. ie: I have a template called admin/base_site.html which includes the {% block userlinks %} but does not have the documentation link. However on the change password form, the old format (with the Documentation hyperlink), is showing up instead. A quick flick through the admin templates shows this may be redundant and removing the line fixes it. SVN 8151 | mikeblake | 0 | 1 | 1 | 0 | 0 | 0 | ||
8085 | 2008-08-01 21:35:45 | 2013-11-09 03:17:34 | 2022-03-06 03:41:20.157378 | Someday/Maybe | closed | Core (Management commands) | Bug | Normal | dev | needsinfo | call_command('runserver') executes management command twice. | When you use runserver in a management command, it executes the code in the management command twice. This is cited in the testserver management command: {{{ 32 # Run the development server. Turn off auto-reloading because it causes 33 # a strange error -- it causes this handle() method to be called 34 # multiple times. 35 shutdown_message = '\nServer stopped.\nNote that the test database, %r, has not been deleted. You can explore it on your own.' % db_name 36 call_command('runserver', addrport=addrport, shutdown_message=shutdown_message, use_reloader=False) }}} I ran into this as well, and I'm just putting it in here so hopefully someone sees it and fixes it. | ericholscher | 0 | 0 | 0 | 0 | 0 | 0 | ||
8182 | 2008-08-09 07:33:40 | 2011-09-28 16:12:16 | 2022-03-06 03:41:34.691349 | Unreviewed | closed | contrib.auth | dev | fixed | infinite loop iterating over context_processors.PermWrapper | The template code below will cause an infinite memory-eating loop if context_processors.auth is enabled. My main issue with that is that it was incredibly hard to debug for me, when I passed my own 'perms' queryset to a template. So here's a (temporary) patch, to make it at least immediately fail. {{{ {% for perm in perms %} {% endfor %} }}} | Uz | 0 | 1 | 0 | 0 | 0 | 0 | ||||
8208 | 2008-08-10 15:37:20 | 2011-09-28 16:12:17 | 2022-03-06 03:41:39.161277 | Accepted | closed | File uploads/storage | dev | wontfix | ImageField does not set width/height_field using 'actual' file | As mentioned in [http://groups.google.com/group/django-developers/browse_thread/thread/1d6f859b99dbf701 django-developers], `models.ImageField` (actually `ImageFieldFile.save`) updates width/height_field using the 'original' (typically uploaded) file, not the one that gets saved. This means that if you don't save the same file as the one being uploaded (because you have resized it), width and height are incorrect. The code to set width/height is in `ImageFieldFile.save`, and happens before the file is saved. I'm attaching a patch which moves this code below the save call and uses the final file to find the dimensions. I don't know much about Django internals so it might need polishing, then again, it really just moves some code down a few lines and changes one function call. | vicvicvic | 0 | 1 | 1 | 0 | 1 | 0 | ||||
8216 | 2008-08-10 20:13:40 | 2008-08-11 02:44:04 | 2022-03-06 03:41:40.404385 | Unreviewed | closed | contrib.auth | dev | duplicate | Fix redirect on sucessful password_reset_confirm | Currently the redirect points to "''../done/''". The "''password/reset/done/''" template says "''We've e-mailed you instructions...''". This is for after the password reset request. The redirect should point to "''password/reset/complete/''", see below: ---- {{{ # Change: return HttpResponseRedirect("../done/") # to: return HttpResponseRedirect('%scomplete/' % request.path) }}} | joshuajonah <josh@joshuajonah.com> | password_reset_confirm, password_reset_complete | 0 | 0 | 0 | 0 | 0 | 0 | |||
8248 | 2008-08-12 03:46:06 | 2009-02-25 19:51:44 | 2022-03-06 03:41:45.211828 | Accepted | closed | Core (Other) | dev | fixed | Built-in python function, help(), does not work on models with ForeignKey fields | If a model refers to a Site model, the help() function stops working, meaning functions, docstrings, etc don't print. To reproduce: {{{ $ django-admin.py startproject myproj $ ./manage.py shell >>> from django.contrib.sites.models import Site >>> help(Site) }}} This will return correct functions, docstrings, etc... Now create an app: {{{ $ ./manage.py startapp myapp }}} Create a model: {{{ from django.db import models from django.contrib.sites.models import Site class MyModel(models.Model): name = models.CharField(max_length=50) site = models.ForeignKey(Site) }}} Now try to view help for this either MyModel or Site: {{{ $ ./manage.py shell >>> from myapp.models import MyModel >>> from django.contrib.sites.models import Site >>> help(MyModel) >>> help(Site) }}} Both calls will only show something similar to: {{{ Help on class MyModel in module myproj.myapp.models: MyModel = <class 'myproj.myapp.models.MyModel'> (END) }}} Tested on SVN 8204 and 8313 - same results | lingrlongr | help ForeignKey foreign key | 0 | 0 | 0 | 0 | 0 | 0 | |||
8329 | 2008-08-15 01:39:48 | 2011-12-22 22:17:13 | 2022-03-06 03:41:57.926726 | Accepted | closed | Core (Management commands) | New feature | Normal | dev | fixed | django shouldn't delete the startproject command | but put a warning in it's place | IanHolsman | 0 | 1 | 1 | 1 | 0 | 0 | ||
8369 | 2008-08-16 19:44:48 | 2011-09-28 16:12:17 | 2022-03-06 03:42:04.720392 | Accepted | closed | Contrib apps | dev | worksforme | syncdb fails with the auth application | I run python manage.py syncdb -v on a new database and it fails. I'm running python 2.5, PostgreSql 8.3 and use Pycopg2 Version 2.0.7 The error I see follows: {{{ Running post-sync handlers for application auth Traceback (most recent call last): File "manage.py", line 11, in <module> execute_manager(settings) File "/Library/Python/2.5/site-packages/django/core/management/__init__.py", line 334, in execute_manager utility.execute() File "/Library/Python/2.5/site-packages/django/core/management/__init__.py", line 295, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Library/Python/2.5/site-packages/django/core/management/base.py", line 77, in run_from_argv self.execute(*args, **options.__dict__) File "/Library/Python/2.5/site-packages/django/core/management/base.py", line 96, in execute output = self.handle(*args, **options) File "/Library/Python/2.5/site-packages/django/core/management/base.py", line 178, in handle return self.handle_noargs(**options) File "/Library/Python/2.5/site-packages/django/core/management/commands/syncdb.py", line 101, in handle_noargs emit_post_sync_signal(created_models, verbosity, interactive) File "/Library/Python/2.5/site-packages/django/core/management/sql.py", line 205, in emit_post_sync_signal interactive=interactive) File "/Library/Python/2.5/site-packages/django/dispatch/dispatcher.py", line 132, in send response = receiver(signal=self, sender=sender, **named) File "/Library/Python/2.5/site-packages/django/contrib/auth/management/__init__.py", line 25, in create_permissions ctype = ContentType.objects.get_for_model(klass) File "/Library/Python/2.5/site-packages/django/contrib/contenttypes/models.py", line 28, in get_for_model defaults = {'name': smart_unicode(opts.verbose_name_raw)}, File "/Library/Python/2.5/site-packages/django/db/models/manager.py", line 84, in get_or_create return self.get_query_set().get_or_create(**kwargs) File "/Library/Pyth… | kellygmiller | auth syncdb | 0 | 0 | 0 | 0 | 0 | 0 | |||
8402 | 2008-08-18 23:59:30 | 2011-09-28 16:12:17 | 2022-03-06 03:42:10.207454 | Accepted | closed | Contrib apps | dev | fixed | Password change form still assumes oldforms variables | This is a `django.contrib.auth` bug, but the relevant template is "django/contrib/admin/templates/registrations/password_change_form.html": this template uses the oldforms-style `html_error_list` instead of `.errors` to display error messsages. The reason this isn't a simple trivial change is because a test should actually be written to test that form and ensure the problem doesn't occur again. To do that: * put a new unittest class in `django.contrib.auth.tests.views` * modify `django.contrib.auth.tests.__init__` to include the class * hook up a `/login/` URL in `django.contrib.auth.urls`, since you can't change the password without logging in. * work out a password for the testuser in the fixture data and update the fixture data's password hash. Then '''document''' what this password is for other test users somehow (in the fixture directory maybe?). It might be possible to guess the current password; I haven't tried. But just creating the hash for a know password (e.g. "test" would be fine. * At least test that trying to change a password and failing displays the error messages. | mtredinnick | aug22sprint | 0 | 0 | 0 | 0 | 0 | 0 | |||
8647 | 2008-08-28 15:57:25 | 2011-09-12 18:59:09 | 2022-03-06 03:42:48.279234 | Design decision needed | closed | contrib.auth | New feature | Normal | dev | duplicate | Add support for user password encryption algorithm selection | User class in django/contrib/auth/models supports crypt algorithm in decoding password but not in the set_password method (see line 175). User password encryption algorithm should have a default but also but also configurable in project settings. Project settings SECRET_KEY should be used in the encryption since all the data needed for brute force cracking are available in a db dump | sammyrulez | password encryption | 0 | 1 | 0 | 1 | 0 | 0 | |
8717 | 2008-08-30 19:08:30 | 2008-10-06 08:11:08 | 2022-03-06 03:42:59.462479 | Unreviewed | closed | Documentation | dev | wontfix | Slight change to installation guide | In the installation guide for the SVN piece, you mention the use of PYTHONPATH. Why not go ahead and mention that instead of creating symlinks to the svn django bin location, just add the path to the user's PATH variable in their .bashrc:[[BR]] [[BR]] i.e.[[BR]] [[BR]] PYTHONPATH=/home/blackhatrob/source/svn/django_trunk:$PYTHONPATH[[BR]] PATH=/home/blackhatrob/source/svn/django_trunk/django/bin:$PATH[[BR]] export PYTHONPATH PATH[[BR]] [[BR]] This way, you do not need any elevated privileges to download and develop django projects. | blackhatrob | 0 | 0 | 0 | 0 | 0 | 0 | ||||
8728 | 2008-08-31 14:58:43 | 2011-09-28 16:12:17 | 2022-03-06 03:43:01.109579 | Accepted | closed | Documentation | dev | fixed | Broken links in new documentation | On the Sphinx TODO list (http://docs.djangoproject.com/en/dev/internals/documentation/#todo) there's a request to run {{{make linkcheck}}}. I did this, it found several malformed links; I ignored redirected links (there are a lot) and instead concentrated on fixing the broken links. The attached patch changes the following links: * link to OR lookup examples; replaced with link to the OR lookup doctests in SVN repository. * link to Email Header Injection description; '404 not found', replaced with another link to a description of this subject. * link to SolidDB; URL has changed, updated the link. | richardb | 0 | 1 | 0 | 0 | 0 | 0 | ||||
8729 | 2008-08-31 15:58:21 | 2013-03-11 20:43:28 | 2022-03-06 03:43:01.241966 | Accepted | closed | contrib.comments | New feature | Normal | dev | wontfix | django.contrib.comments feed should allow filtering based on ContentType and object instance. | A common use-case for syndicating comments is to provide a feed of comments attached to a specific object (say, a blog post with ID 42). This patch allows the comment feed to be filtered based on ContentType and object instance, like so: '''Comments filtered by ContentType:''' /feeds/comments/<app>.<model>/ Provides a feed of all public comments attached to the specified ContentType. For example, the URL /feeds/comments/blog.post/ would return all public comments attached to the Post model in the 'blog' app. Note that the model name needs to be lowercase. '''Comments filtered by a specific object:''' /feeds/comments/<app>.<model>/<pk_val>/ Provides a feed of all public comments attached to the object specified by the parameters . For example, the URL /feeds/comments/blog.post/42/ would return all public comments attached to the Post with pk=42 in the 'blog' app. '''Note:''' This is the first time I've created a ticket/patch, so I would appreciate any advice regarding the code or this ticket. Thanks. | kylefox | comments, feed, syndication | 0 | 1 | 0 | 1 | 1 | 0 | |
8735 | 2008-08-31 20:25:18 | 2011-09-28 16:12:23 | 2022-03-06 03:43:02.184227 | Accepted | closed | contrib.localflavor | dev | fixed | Lack of Portuguese LocalFlavor | There is no Portuguese localflavor in Django right now! | alcides | 0 | 1 | 0 | 0 | 1 | 0 | ||||
8855 | 2008-09-03 19:52:23 | 2009-02-25 19:51:44 | 2022-03-06 03:43:20.555308 | Unreviewed | closed | contrib.comments | dev | duplicate | Default comment form deficiencies | Default comment form, as found in comments framework, suffers from some basic deficiencies: * submit button labels ("Post" and "Preview") are not marked for translation; * the `input` HTML elements (tags) are not closed, effectively prohibiting document validation as XHTML 1.0 Attached patch fixes these two problems and adds minor change in HTTP method declaration for consistency in style. | zgoda | 0 | 1 | 0 | 0 | 0 | 0 | ||||
8859 | 2008-09-03 23:25:53 | 2008-09-17 06:59:26 | 2022-03-06 03:43:21.181297 | Unreviewed | closed | Translations | dev | fixed | Update the translation more consistency, more natural Mandarin Chinese. | For example, changed 'password' translation from 口令 to 密码。(try Google both of them, see the number of results, 密码 is more common used.) Changed 'refresh' translation from 载入 to 刷新。 Also changed, boolean -> 布尔值; underline: 下横线 -> 下划线; checkbox: 检查框 -> 复选框; post: 张贴 -> 发表; 前导 -> 开始. Fixed typo, and update some states' name. | zhe | zh-CN | 0 | 1 | 0 | 0 | 0 | 0 | |||
8906 | 2008-09-05 20:36:00 | 2011-09-28 16:12:21 | 2022-03-06 03:43:29.007038 | Accepted | closed | contrib.auth | 1.0 | wontfix | django.contrib.auth settings.py URL's aren't portable | in r8015, django gained the ability to be moved from one path to another easily by setting "!PythonOption django.root /whatever" in the httpd conf, as described at [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#ChangedthewayURLpathsaredetermined BackwardsIncompatibleChanges]. However, the LOGIN_URL, LOGOUT_URL, and LOGIN_REDIRECT_URL variables in settings.py don't seem to be affected by these changes. So, if i have LOGIN_URL = '/login/' in settings.py, it'll still resolve to just "/login/" even if i have django.root set so that everything else becomes "/whatever/some_other_path/". which makes the app non-portable. | levity | 0 | 1 | 0 | 1 | 0 | 0 | ||||
9025 | 2008-09-10 22:25:56 | 2020-06-06 22:40:54 | 2022-03-06 03:43:48.696064 | Accepted | new | contrib.admin | New feature | Normal | dev | Nested Inline Support in Admin | Currently, admin.TabularInline and admin.StackedInline do not support inlines themselves. This would allow nested inlines to happen. | pixelcort | 0 | 1 | 1 | 0 | 0 | 1 | |||
9107 | 2008-09-16 18:06:39 | 2021-01-28 05:51:10 | 2022-03-06 03:44:02.469352 | Accepted | new | contrib.admin | New feature | Normal | dev | URL arguments to set values of fields in admin don't work for inlines | Though it works just fine to set the value of a field in the admin with URL arguments (i.e. adding '?title=foo' to your URL sets the value of the field 'title' to 'foo'), this doesn't work if the field you're trying to set is in an inline. In such a case the syntax would presumably be something along the lines of '?inlinemode_set-0-fieldname' if you were trying to set the value fo the first instance of the inline model. This, however, doesn't work nor does any other variation I was able to think of. | josh@dydxtech.com | admin inline | 0 | 1 | 1 | 1 | 1 | 0 | ||
9118 | 2008-09-17 12:01:31 | 2011-09-28 16:12:21 | 2022-03-06 03:44:04.276901 | Accepted | closed | Forms | dev | wontfix | Unhelpful handling of UTF_8 encoding bugs in ModelForm field.help_text | I am modifying a field of a model in ModelForm and adding a help_text with national characters. The declared encoding is UTF_8, but the actual help_text contains a wrong diacritic (not UTF_8 encoded). The complete form.as_table within my template called does quietly not render -- it just doesn't show. The template displays correctly when the diacritic in error gets removed or corrected. If I remove the UTF_* coding declaration in the original error situation then the following is reported: {{{ Non-ASCII character '\x9c' in file <forms.py pointer removed> on line 43, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details (forms.py, line 43) }}} | jbl1 | 0 | 0 | 0 | 0 | 0 | 0 | ||||
9154 | 2008-09-20 02:59:22 | 2011-12-13 23:00:54 | 2022-03-06 03:44:10.331931 | Design decision needed | closed | Template system | Uncategorized | Normal | dev | duplicate | Cache compiled templates | I've seen compiled templates are not cached in loader class. You can improve performance in environments like Apache with only caching compiled templates by name. You can rely that a same string content in a template will became a same compiled template (I forgot here the threading problem, that is another issue). I will attach a patch that can improve rendering in hundred times (it depends of cache hit). In one production site, I gain from 15rps to 31rps with apache bench tool (that timing include SQL sentences, logic, etc.), so the template gain is much better. | msaelices | templates, cache | 0 | 1 | 0 | 1 | 1 | 0 | |
9249 | 2008-09-30 02:55:17 | 2021-11-23 11:48:56 | 2022-03-06 03:44:25.641861 | Accepted | new | HTTP handling | New feature | Normal | 1.0 | Google Analytics' Cookies break CacheMiddleware when SessionMiddleware turns on Vary: Cookie | When using Google Analytics on a Django project with CacheMiddleware and SessionMiddleware turned on, the Cookies that Google Analytics apparently change on each reload, invalidating the Vary: Cookie parameter that SessionMiddleware is setting. There should be a way to define cookie prefixes, such as ``'__utm'``, to ignore for cookie variation for caching. | pixelcort | cache cookies | 0 | 1 | 1 | 0 | 1 | 0 | ||
9289 | 2008-10-03 16:42:46 | 2011-09-28 16:12:23 | 2022-03-06 03:44:31.629512 | Accepted | closed | contrib.localflavor | dev | fixed | Swedish (se) localflavor | The attached patch contains: * SECountySelect - Select widget for Swedish counties (län) * SEMunicipalitySelect - Select widget for Swedish municipalities (kommun) * SEOrganisationNumber - Form field for Swedish Organisation numbers (organisationsnummer) * SEPersonalIdentityNumber - Form field for Swedish Identity numbers (personnummer) Documentation, Swedish translations, and tests that covers all widgets fields are included! | peritus | localflavor,sv,se | 0 | 1 | 0 | 0 | 0 | 0 | |||
9318 | 2008-10-07 10:25:58 | 2017-04-28 21:18:33 | 2022-03-06 03:44:36.109322 | Accepted | new | Core (Other) | New feature | Normal | 1.0 | "Virtual" behaviour for signal dispatcher and model inheritance | In presence of model inheritance, we need to propagate signal not only to handlers, attached to the Child classes, but also to handlers, attached to the Parent class. Please, see unittests in the patch, for example of such model inheritance. | svetlyak40wt | model inheritance, signals, dispatch, proxy, subclass | 0 | 1 | 1 | 0 | 0 | 0 | ||
9334 | 2008-10-09 17:19:10 | 2013-07-25 16:49:17 | 2022-03-06 03:44:38.265112 | Accepted | closed | Documentation | New feature | Normal | 1.0 | wontfix | The docs don't explain how django names cache keys | For instance in a template fragment cache, how do i know the name of the cache key so i can delete it later? cheers, Simon. | simon@musicpictures.com | dceu2011 | 0 | 1 | 1 | 0 | 0 | 0 | |
9368 | 2008-10-14 23:01:21 | 2015-10-27 06:33:12 | 2022-03-06 03:44:43.286510 | Accepted | closed | Database layer (models, ORM) | Cleanup/optimization | Normal | fixed | Clean up code for getting columns for select query | I cleaned up some code in db/models/sql/query.py (see mtredinnick's suggestion on http://code.djangoproject.com/ticket/5420) In particular: * The code to get a column's SQL alias was duplicated in 6 places, so I factored that out into a function * Depending on whether the get_default_columns function was called for the base model or a related model, it took different parameters, did different things, and returned different values. So I split it into two separate functions, get_base_columns and get_related_columns. This refactoring makes the Query class easier to understand and easier to subclass with less code duplication. * I added a function Query.get_base_fields, which the !QuerySet class uses to determine which fields correspond to the values from the result set. Currently, get_base_fields returns all fields of the base model. However, Query subclasses could potentially override get_base_fields (as well as get_base_columns) so that only a subset of the model's fields are returned (e.g. if you want to lazy-load some large fields). A large motivation for this refactoring is that functional decomposition of get_columns made it difficult to subclass Query to provide custom behavior. This can be seen especially well in contrib.gis.db.models.query, where it needed to override a small bit of logic in the middle of get_columns and get_default_columns, but ended up having to copy and paste those entire functions (which were both quite large) as a result. My change at least makes it so gis doesn't have to copy and paste quite as much. I would have liked to not copy and paste anything in gis, but I didn't quite figure out how to do that without breaking the regression tests. (Also, I haven't even run the code in gis because I don't have the necessary libraries installed. So somebody else might want to test that part...) | adunar | 0 | 1 | 1 | 0 | 0 | 0 | |||
9394 | 2008-10-18 00:40:32 | 2016-09-23 16:05:30 | 2022-03-06 03:44:47.450286 | Accepted | closed | Database layer (models, ORM) | Cleanup/optimization | Normal | dev | duplicate | Reverse relation lookups with a multi-table inherited model produces extraneous queries | With the following models: {{{ class Place(models.Model): name = models.CharField(max_length=50) class Business(Place): owner = models.CharField(max_length=50) class Restaurant(Business): rating = models.IntegerField() class Chef(models.Model): name = models.CharField(max_length=50) restaurants = models.ManyToManyField(Restaurant, through='Employee') class Employee(models.Model): restaurant = models.ForeignKey(Restaurant) chef = models.ForeignKey(Chef) years_of_service = models.IntegerField() }}} we can do {{{some_restaurant.employee_set.all()}}}, which results in three queries. The first two queries are just retrieving the attributes of the inherited Business and Place models, which is unnecessary since all that information already exists on the some_restaurant object. Only one query should be needed. | ikelly | 0 | 1 | 1 | 0 | 0 | 0 | ||
9422 | 2008-10-22 16:22:06 | 2015-02-13 17:18:21 | 2022-03-06 03:44:51.589543 | Accepted | closed | Core (Serialization) | Bug | Normal | 1.0 | fixed | Incorrect handling of foreign keys by serializers | When a foreign key points to a remote object via a non-primary key field, the Python serializer and XML serializer classes can sometimes handle this incorrectly. This occurs when the primary key of the related object is a OneToOneField, as is the case for model inheritance. In this case, the serializer will store the __unicode__ version of the primary key, rather than the primary key itself. As an example: {{{ class Foo(models.Model): pass class Bar(Foo): name = models.CharField(max_length=244) slug = models.SlugField(unique=True) def __unicode__(self): return self.name class Wibble(models.Model): bar = models.ForeignKey(Bar, to_field="slug") }}} when a Wibble instance is serialized, the value of the 'bar' property will be serialized as the result of calling __unicode__ on the referenced Bar. This problem can be resolved with the attached patch. | etianen | 0 | 1 | 1 | 1 | 0 | 0 | ||
9435 | 2008-10-24 03:43:35 | 2016-12-29 19:14:22 | 2022-03-06 03:44:53.363647 | Accepted | new | Core (Other) | Bug | Normal | 1.0 | Check out behaviour of wsgi backend with PATH_INFO being an empty string | Transferring a side-issue from #3414 (comment 23 over there): Note: the WSGI spec allows PATH_INFO to be empty or missing; specifically: "This may be an empty string, if the request URL targets the application root and does NOT have a trailing slash." (emph. added) And WSGI servers are allowed to omit PATH_INFO (and various other variables) if they are an empty string. IIUC, this means that [8105] doesn't correctly handle the case where someone goes to "foo.com/django" (no trailing '/'), because it wrongly assumes that a missing PATH_INFO is a '/'. Per the WSGI spec, a missing PATH_INFO is in fact an empty string. That means that relative URLs at the root of a Django site would not work correctly under servers that omit an empty PATH_INFO. Whether the OP issue here is a configuration problem is irrelevant to this piece: it is perfectly legal for a WSGI server to omit PATH_INFO if it's an empty string, and its omission means that it's an EMPTY string, not a '/'. Conversely, if a WSGI server is ommitting PATH_INFO when PATH_INFO should be a "/" (i.e. the URL was "foo.com/django/" with a trailing "/"), then that server is seriously broken and should be fixed. (But I'm not seeing anything here that suggests this is actually the case.) Either way, however, the code that's defaulting a missing PATH_INFO to "/" appears to be quite wrong: either creating a bug or masking one somewhere else. | mtredinnick | 0 | 1 | 1 | 0 | 0 | 0 | |||
9617 | 2008-11-17 13:54:33 | 2008-11-21 11:52:53 | 2022-03-06 03:45:18.457097 | Ready for checkin | closed | Translations | 1.0 | fixed | Typo in polish translations (TabularInline "Delete?" column) | Hi, there's a typo (missing "n") in polish version of "Delete?" column header of TabularInline, patch attached. | romke <rombar@gmail.com> | typo, polish, pl, TabularInline, Delete | 0 | 1 | 0 | 0 | 0 | 0 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE tickets ( 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 );