80 rows where "changetime" is on date 2006-10-13

View and edit SQL

Suggested facets: component, type, severity, version, resolution, owner, has_patch

changetime (date)

  • 2006-10-13 · 80
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
126 2005-07-20 22:19:29 2006-10-13 21:17:51 2019-06-24 00:16:36.964933 Unreviewed closed contrib.admin defect normal   fixed Patch to place the post_data into the request variable This is a patch to put the post_data into the request variable. This is helpful for views that need access to the raw data. {{{ Index: wsgi.py =================================================================== --- wsgi.py (revision 256) +++ wsgi.py (working copy) @@ -20,6 +20,7 @@ # Populates self._post and self._files if self.environ['REQUEST_METHOD'] == 'POST': post_data = self.environ['wsgi.input'].read(int(self.environ["CONTENT_LENGTH"])) + self._post_data = post_data if self.environ.get('CONTENT_TYPE', '').startswith('multipart'): header_dict = dict([(k, v) for k, v in self.environ.items() if k.startswith('HTTP_')]) self._post, self._files = httpwrappers.parse_file_upload(header_dict, post_data) @@ -89,7 +90,18 @@ def _set_user(self, user): self._user = user + + def _set_post_data(self,post_data): + self._post_data = post_data + def _get_post_data(self): + if not hasattr(self, '_post_data'): + self._load_post_and_files() + if hasattr(self, '_post_data'): + return(self._post_data) + else: + return("") + GET = property(_get_get, _set_get) POST = property(_get_post, _set_post) COOKIES = property(_get_cookies, _set_cookies) @@ -97,6 +109,7 @@ REQUEST = property(_get_request) session = property(_get_session, _set_session) user = property(_get_user, _set_user) + post_data = property(_get_post_data,_set_post_data) class WSGIHandler: def __init__(self): Index: modpython.py =================================================================== --- modpython.py (revision 256) +++ modpython.py (working copy) @@ -21,10 +21,11 @@ def _load_post_and_files(self): "Populates self._post and self._files" + self._post_data = self._req.read() if self._req.headers_in.has_key('content-type') and self._req.headers_in['content-type… adrian anonymous   0 0 0 0 0 0
266 2005-08-04 11:27:02 2006-10-13 19:47:51 2019-06-24 00:18:05.476202 Unreviewed closed Core (Other) enhancement normal   fixed Patch: a validator that matches against another list if some other field has a specific value This validator will match a field against a list of validators, but only if some other field matches some specific value. Possible usage scenario: a web interface for domain records where A records will require an IP in dotted notation while an CNAME record will require a fully qualified host name. {{{ class MatchesIfOtherFieldEquals: def __init__(self, other_field, other_value, validator_list=[]): self.other_field = other_field self.other_value = other_value self.validator_list = validator_list self.always_test = True def __call__(self, field_data, all_data): if all_data.has_key(self.other_field) and all_data[self.other_field] == self.other_value: for v in self.validator_list: v(field_data, all_data) }}} adrian hugo <gb@bofh.ms>   0 0 0 0 0 0
281 2005-08-05 20:25:51 2006-10-13 19:37:45 2019-06-24 00:18:14.955064 Unreviewed closed Core (Other) defect minor   fixed Improve e-mail address validation The email_re variable found in ./django/core/validators.py seems very inadequate to cover the possibilities in RFC 2822. For reference, check this article: http://www.twilightsoul.com/Default.aspx?tabid=134 ...I would request that it be patched to make a better effort. adrian peter.havens@gmail.com   0 0 0 0 0 0
455 2005-09-02 23:09:12 2006-10-13 21:17:42 2019-06-24 00:20:07.573853 Unreviewed closed Core (Other) enhancement normal   wontfix extend formfields.FormWrapper for a readonly mode It would be cool if the FormWrapper class would accept an optional parameter readonly. If that parameter is True, the FormWrapper shouldn't generate input statements but just the stuff that would go into the value="" attribute of the input statement. This would allow to use the same template for editing data and for showing data if the logged in user doesn't have the right to edit that dataset - and all this without the need of an additional template or too much changes to the editing template. adrian hugo <gb@bofh.ms>   0 0 0 0 0 0
473 2005-09-07 21:56:57 2006-10-13 19:48:03 2019-06-24 00:20:18.912484 Unreviewed closed Database layer (models, ORM) enhancement normal   fixed Make MySQL warnings more informative Sometimes when saving a record the data is slightly malformed and MySQL will raise an error. This code adds an extra debug wrapper layer for MySQL to make these warnings more informative. In core/db/backends/mysql.py, add the following class: class MysqlDebugWrapper: def __init__(self, cursor): self.cursor = cursor def execute(self, sql, params=[]): try: result = self.cursor.execute(sql, params) except Database.Warning, w: self.cursor.execute("show warnings") raise Database.Warning, "%s: %s" % (w,self.cursor.fetchall()) return result def executemany(self, sql, param_list): try: result = self.cursor.executemany(sql, param_list) except Database.Warning: self.cursor.execute("show warnings") raise Database.Warning, "%s: %s" % (w,self.cursor.fetchall()) return result def __getattr__(self, attr): if self.__dict__.has_key(attr): return self.__dict__[attr] else: return getattr(self.cursor, attr) Then, in the same file, change: return base.CursorDebugWrapper(self.connection.cursor(), self) to: return base.CursorDebugWrapper(MysqlDebugWrapper(self.connection.cursor()), self) adrian mlambert@gmail.com   0 0 0 0 0 0
576 2005-09-29 04:45:44 2006-10-13 19:48:55 2019-06-24 00:21:25.479182 Unreviewed closed contrib.admin defect major   fixed [patch] don't show 'add another' button in popup This patch removes the 'add another' functionality from popups, as it breaks the javascript dynamic add stuff. In some cases it can even lead to inconsistent data, if you "Add another" and after that add another one, the wrong data might be present in the browser, this only happened once to me, but still. anyway, this is not the ideal, end to end solution, but it makes the interface consistent. The 'ideal' solution would be to fix the javascript update thingy, but that is non-trivial, and would require some extensive work to the entire admin interface, there'd need to be some kind of javascript > python callback mechanism. I know how to implement such a thing, and I might actually do it :) who knows ;) if someone else wants to do it, I'm happy to give help. adrian hp@syntomax.com   0 1 0 0 0 0
582 2005-10-01 09:10:38 2006-10-13 19:37:15 2019-06-24 00:21:29.290224 Unreviewed closed Template system   normal   fixed [patch] Load templates from application eggs The attached patch changes django.core.template_loader to try several different template-source-loaders; first it tries the vanilla django.core.template_file loader; then it tries the new django.core.template_eggs loader. The new loader tries to load the named template from 'templates/%s' % name for each installed app. So one can package an app as a python egg and distribute it as one file with default templates included, and installation is as simple as dropping it somewhere in sys.path :) adrian sune.kirkeby@gmail.com apps eggs templates 0 1 0 0 0 0
603 2005-10-10 15:08:42 2006-10-13 19:36:36 2019-06-24 00:21:42.426261 Unreviewed closed Template system defect normal   fixed Improved template error messages Template errors are annoying to find. This patch adds filename and line numbers to the error messages when the DEBUG setting is true. Extracted from the new-admin branch. adrian rjwittams   0 0 0 0 0 0
665 2005-10-20 22:48:11 2006-10-13 19:48:09 2019-06-24 00:22:21.538976 Unreviewed closed Metasystem enhancement minor   fixed Field.default should accept callables Field.default should accept callables, which would be evaluated at the time that the default value was set. Example: {{{ #!python default=datetime.datetime.now }}} adrian adrian   0 0 0 0 0 0
722 2005-11-03 21:22:22 2006-10-13 19:36:40 2019-06-24 00:22:57.918953 Unreviewed closed Validators defect normal   wontfix Allow for period '.' and hyphen '-' characters in usernames with an isUsername validator Currently restricts usernames by not allowed a '.'. Can we remove this restriction? as there are several companies out there why my login ID would be either Ian.Holsman or I.Holsman and I would prefer to use the same ID that I use on my intranet, rather than invent yet another ID for myself. Thanks Ian adrian Ian@holsman.net username validation period hyphen 0 0 0 0 0 0
734 2005-11-05 09:37:42 2006-10-13 19:39:11 2019-06-24 00:23:05.593202 Unreviewed closed Validators defect normal   fixed isValidIPAddress4 uses wrong ValidationError object The isValidIPAddress4 uses validators.ValidationError instead of just ValidationError and so throws this traceback: {{{ There's been an error: Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/handlers/base.py", line 71, in get_response response = callback(request, **param_dict) File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/contrib/admin/views/decorators.py", line 49, in _checklogin return view_func(request, *args, **kwargs) File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/contrib/admin/views/main.py", line 878, in change_stage errors = manipulator.get_validation_errors(new_data) File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/formfields.py", line 70, in get_validation_errors validator(new_data.get(field.field_name, ''), new_data) File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/formfields.py", line 695, in isValidIPAddress validators.isValidIPAddress4(field_data, all_data) File "/usr/local/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/validators.py", line 99, in isValidIPAddress4 raise validators.ValidationError, "Please enter a valid IP address." NameError: global name 'validators' is not defined }}} This was [http://simon.bofh.ms/logger/django/2005/11/04/23/18/ reported on IRC by mflanagan]. adrian hugo   0 0 0 0 0 0
737 2005-11-06 13:20:38 2006-10-13 19:39:36 2019-06-24 00:23:07.448457 Unreviewed closed Validators enhancement normal   fixed validators.isValidIPAddress4 using only regexps Hi, The attached diff simplifies the isValidIPAddress4 validator so that it uses only regexps to check the IP address rather than splitting and checking the value of each field. adrian mattimustang@gmail.com   0 0 0 0 0 0
741 2005-11-06 21:56:17 2006-10-13 19:37:57 2019-06-24 00:23:09.984143 Unreviewed closed Core (Other) defect normal   fixed Session unpickler is not fault tolerant Sessions store Python objects via pickle. Currently unpickling errors are not handled. For example, if a client visits a site and a class instance is pickled into their session and then they later return to the site after the definition of that class has been removed or changed an !ImportError may be thrown. Unpickling can potentially cause a whole range of Exceptions including !UnpicklingError, !AttributeError, EOFError, !ImportError, and !IndexError. Probably it would be reasonable to use a broad try/except block and generate a new session if the session cannot be unpickled. adrian django@kieranholland.com   0 0 0 0 0 0
746 2005-11-07 04:28:43 2006-10-13 19:37:10 2019-06-24 00:23:13.123772 Unreviewed closed Core (Other) defect normal   invalid refactor models/__init__.py so fields themselves add their own get_XXXX_count/list functions currently in {{{ models/__init__.py }}} there is a big for loop which goes over all the installed modules and creates the foreign key relationships (oneTomany,manytomany and one to one) with a big if/else/elif statement. I propose we move the if/elif logic to the actual field code itself. so a field 'knows' what functions it has to create, and field writers could override this functionality to add their own relationships if they choose from {{{ for related in klass._meta.get_all_related_objects(): if foo: .... elsif blah: .... }}} to {{{ for related in klass._meta.get_all_related_objects(): related.create_relationships( klass, meta ) }}} and {{{ class OneToOne: def create_relationships( klass,meta ) func = curry(....) ... klass.setattr(...) }}} I think this change would be backwards compatible. and could allow me to define a 'TagField' which creates special functions. rjwittams Ian@Holsman.net   0 0 0 0 0 0
750 2005-11-07 14:16:13 2006-10-13 19:59:11 2019-06-24 00:23:15.679477 Unreviewed closed Tools defect minor 0.90 fixed i18n should ideally respect the languages supported on a per-application basis What if my main site application is only available in {{{'de'}}} and {{{'en'}}} translations, but the user's Accept-Language header is set to {{{'ru'}}}, {{{'de'}}} (in that order)? Instead of using 'de' it will fall back to 'en'. This is because {{{'ru'}}} is listed in LANGUAGES, so it sets the user language to {{{'ru'}}}. However, there are no translation strings for {{{'ru'}}} for the main site application, so it falls back to {{{'en'}}}. There needs to be some respect for which languages each application has support for, to solve this i.e. the set of supported languages should be considered per application. This is more of an enhancement request than a defect, since I can always change LANGUAGES to be what I want, e.g. {{{('de', 'en')}}} in the above example. hugo Esaj   0 0 0 0 0 0
751 2005-11-07 17:01:25 2006-10-13 19:42:41 2019-06-24 00:23:16.315340 Unreviewed closed Translations enhancement normal   fixed Swedish translation As the summary states: swedish translations. Now I only have to find the attach-button... :/ hugo ozamosi@blinkenlights.se   0 0 0 0 0 0
757 2005-11-08 23:02:23 2006-10-13 19:48:26 2019-06-24 00:23:20.147006 Unreviewed closed Core (Other) defect major   fixed Cannot set primary key value manually for new objects. When calling '''object.save()''' for objects whose primary key values *do not* exist in the model table, an auto-assigned primary key value is used instead of the one that I assign in my program. For example, this code will result in a primary key based on a '''db.get_last_insert_id''' call rather than the value I assign (assuming no record with id = 15 exists in the model table): {{{ obj = SomeModel() obj.id = 15 obj.save() }}} The object.save() code in meta/!__init!__.py assumes that if the ID does not already exist, an INSERT must take place and any auto-assign fields must get their values accordingly. adrian cygnus@cprogrammer.org   0 0 0 0 0 0
806 2005-11-15 22:09:03 2006-10-13 19:49:03 2019-06-24 00:23:51.235714 Unreviewed closed Core (Other) defect normal   fixed module methods and adding a new record Hi. I'm having some 'fun' with using module functions, and would appreciate some enlightenment. this is the class & function. {{{ class TagType(meta.Model): name = meta.CharField(maxlength=40, core=True, unique=True) class META: admin = meta.Admin(); ordering = [ 'name' ] def __repr__(self): return self.name; class Tag(meta.Model): name = meta.CharField(maxlength=40, core=True ) description = meta.TextField( unique=False, blank=True) type = meta.ForeignKey(TagType, radio_admin=True, default=1) class META: admin = meta.Admin() ordering = [ 'name' ] unique_together = (("name", "type"),) def _module_name_to_id(tagname, insert_if_not_there=False): from keyman.apps.conf.models.conf import tagtypes, TagType "convert a XXXX:TAG into it's ID name" format = tagname.lower().split(":") tag_real_name = format.pop() tag_type = "normal" if ( format.__len__() > 0 ): tag_type = format[0] cursor= db.cursor() cursor.execute( """ SELECT t.id as id, t.name as name, t.description as description, t.type_id as type_id FROM conf_tags t, conf_tagtypes tt WHERE t.type_id =tt.id AND t.name = %s AND tt.name = %s """, [tag_real_name, tag_type] ) row = cursor.fetchone() if row: return Tag(*row) else: if insert_if_not_there: t = tagtypes.get_object(name__exact = tag_type ) newtag = t.add_tag( tag_real_name ) return newtag else: raise TagDoesNotExist }}} so what it tries to do is return a id when given a the type/name combo like {{{ a = tags.get_name_to_id("site:foo") }}} and that works pretty well, as I'm going straight to the DB to get that. but when I try to add a new tag I am using the model API.… adrian Ian@holsman.net   0 0 0 0 0 0
849 2005-11-20 09:56:37 2006-10-13 19:36:59 2019-06-24 00:24:18.839956 Unreviewed closed Core (Other) defect normal   fixed login_required redirects to pages without parameters and so loses them This would allow accessing GET, POST or META stuff in the templates without the view function taking care of it. For example if using a login_required decorator, you could just put a {{{<input type="hidden" name="next" value="{{ request.path }}" />}}} into the login.html template and have it automatically redirect to the secured form. Currently you need to pass the 'next' parameter to the form itself and use that to build the next field. And it's currently impossible to pass on request parameters to the logged in page. adrian hugo   0 0 0 0 0 0
906 2005-11-25 10:48:48 2006-10-13 19:38:34 2019-06-24 00:24:55.549814 Unreviewed closed contrib.admin defect normal   fixed [patch] Typo in password_reset_form template {{{ Index: django/contrib/admin/templates/registration/password_reset_form.html =================================================================== --- django/contrib/admin/templates/registration/password_reset_form.html (revision 1431) +++ django/contrib/admin/templates/registration/password_reset_form.html (working copy) @@ -7,7 +7,7 @@ {% block content %} -<h1>{% trans "Password reset") %}</h1> +<h1>{% trans "Password reset" %}</h1> <p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll reset your password and e-mail the new one to you." %}</p> }}} adrian Esaj   0 1 0 0 0 0
961 2005-11-29 20:03:10 2006-10-13 22:24:29 2019-06-24 00:25:30.221328 Unreviewed closed Core (Other) enhancement normal   wontfix [patch] Add automatic thumbnail generation to ImageFields There was some discussion about this in #425 and #674. Attached is a patch that will use PIL to automatically generate and save thumbnails of various sizes when saving an ImageField. Noteworthy changes: - ImageFields may take a thumb_sizes argument, which is a list of integers. A thumbnail image is generated for each size, such that no side is larger than the given integer. - Model objects that have ImageFields with thumb_sizes specified will have get_XXX_thumbnail_url and get_XXX_thumbnail_sizes methods. The former optionally takes an integer (size) to determine which thumbnail url to return. Otherwise it will return the first thumbnail in the thumb_sizes list. adrian dcwatson@gmail.com   0 1 0 0 0 0
972 2005-12-01 07:25:34 2006-10-13 19:43:02 2019-06-24 00:25:37.095617 Unreviewed closed Documentation defect normal   fixed better explain choices usage in the model docs When using choices option as documented in http://www.djangoproject.com/documentation/model_api/#general-field-options it is important to define the choices outside of the class definition (not inside). In the wrong way validation raises error. WRONG: {{{ class Website(meta.Model): "websites" TYPE_CHOICES = ( ('1','Private'), ('2','Phorum'), ) ... type = meta.CharField('Type', maxlength=200, blank = True, choices=TYPE_CHOICES) }}} RIGHT: {{{ TYPE_CHOICES = ( ('1','Private'), ('2','Phorum'), ) class Website(meta.Model): "websites" ... type = meta.CharField('Type', maxlength=200, blank = True, choices=TYPE_CHOICES) }}} Please, improve docs correspondingly. jacob radek   0 0 0 0 0 0
985 2005-12-03 09:34:33 2006-10-13 19:38:29 2019-06-24 00:25:45.395948 Unreviewed closed contrib.admin defect normal master fixed [1463] possibly incomplete? When I try to access the admin docs with the new admin (on a system where docutils is not installed, BTW), I get an import error. According to the stack trace, it's failing to import django/contrib/admin/utils.py due to the direct import of docutils modules, the first of which is on line 92. The change to this file in [1463] looks like an attempt to address this problem, but I don't see where you're doing anything with the flag that gets set if the original !ImportError gets caught. adrian Tim Keating   0 0 0 0 0 0
1066 2005-12-15 13:33:46 2006-10-13 19:42:38 2019-06-24 00:26:36.169269 Unreviewed closed Core (Other) defect major master fixed Lost import of i18n stuffs in defaultfilters Lost import of i18n stuffs in defaultfilters. But it used in "yesno" filter. adrian oxyum   0 0 0 0 0 0
1073 2005-12-16 20:36:34 2006-10-13 19:37:11 2019-06-24 00:26:40.617954 Unreviewed closed Database layer (models, ORM) defect normal   wontfix method_save in meta/__init__.py could make use of mysql features I was looking at method_save, and noticed it might not be the best way of doing it for mysql in mysql you have got 2 features which might help out a bit. {{{ REPLACE [LOW_PRIORITY | DELAYED] [INTO] tbl_name [(col_name,...)] VALUES ({expr | DEFAULT},...),(...),... }}} http://dev.mysql.com/doc/refman/5.0/en/replace.html which will replace the record if it already exists and {{{ INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name [(col_name,...)] VALUES ({expr | DEFAULT},...),(...),... [ ON DUPLICATE KEY UPDATE col_name=expr, ... ] }}} http://dev.mysql.com/doc/refman/5.0/en/insert.html with the ON DUPLICATE KEY UPDATE part allowing you to deal with a duplicate record. using one of these might simplify the logic going on here, as well as possibly reducing the number of trips to the DB server. adrian Ian@holsman.net   0 0 0 0 0 0
1179 2006-01-06 19:06:13 2006-10-13 19:37:39 2019-06-24 00:27:47.787650 Unreviewed closed Metasystem defect normal magic-removal fixed [magic-removal] Models not in INSTALLED_APPS should raise ImportError In trunk, if you try to import a model that isn't in {{{INSTALLED_APPS}}}, Django will raise {{{ImportError}}}. This lets you do the following: {{{ try: from django.models.foo import bar except ImportError: bar = None # ... if bar is not None: bar_objects = bar.get_list() else: bar_objects = [] }}} The magic-removal branch doesn't yet have this feature. adrian adrian   0 0 0 0 0 0
1214 2006-01-13 09:02:56 2006-10-13 19:36:59 2019-06-24 00:28:10.201958 Unreviewed closed Translations defect normal   fixed django.utils.translation reads DJANGO_SETTINGS_MODULE When installing the locale files, the translation module looks in the environment for DJANGO_SETTINGS_MODULE. Instead it should read the {{{settings.__file__}}} attribute, or maybe have a setting that {{{django.conf.settings}}} fills in (by default) from the module name like translation currently does. Whatever it does, that kind of logic doesn't need to be in the translation module. hugo ianb@colorstudy.com   0 0 0 0 0 0
1236 2006-01-17 03:37:11 2006-10-13 19:36:41 2019-06-24 00:28:24.062753 Unreviewed closed Template system defect normal 0.90 fixed Django hiding exceptions I just got an exception "TemplateSyntaxError: Caught an exception while rendering." Looking into the code where that exception was being raised, I see that it's actually squashing another exception (anything with subclass Exception) and re-raising the useless message I got. I eventually narrowed down the code that was raising the initial exception, and put my own try/except block around it, and found that the exception really being raised is at result of passing an invalid value to an object constuctor (a meta.Model object, this is). Clearly *not* a template syntax error. Please don't squash exceptions. The offending (offensive?) code is the "wrapped" section of DebugNodeList in django/core/template/__init__.py (currently terminating on line 742). russellm richard@commonground.com.au   0 0 0 0 0 0
1288 2006-01-29 21:32:51 2006-10-13 19:40:21 2019-06-24 00:28:57.275873 Unreviewed closed Validators defect normal   fixed E-mail validator regex is too slow For some reason, the current email validator regex hangs when trying to match something like {{{"asd00000000000000000000000000000000000000000000000000000000000000"}}} The current regex is: {{{ ^((([\t\x20]*[!#-\'\*\+\-/-9=\?A-Z\^-~]+[\t\x20]*|"[\x01-\x09\x0B\x0C\x0E-\x21\x23-\x5B\x5D-\x7F]*")+)?[\t\x20]*<([\t\x20]*[!#-\'\*\+\-/-9=\?A-Z\^-~]+(\.[!#-\'\*\+\-/-9=\?A-Z\^-~]+)*|"[\x01-\x09\x0B\x0C\x0E-\x21\x23-\x5B\x5D-\x7F]*")@(([a-zA-Z0-9][-a-zA-Z0-9]*[a-zA-Z0-9]\.)+[a-zA-Z]{2,}|\[(([0-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\])>[\t\x20]*|([\t\x20]*[!#-\'\*\+\-/-9=\?A-Z\^-~]+(\.[!#-\'\*\+\-/-9=\?A-Z\^-~]+)*|"[\x01-\x09\x0B\x0C\x0E-\x21\x23-\x5B\x5D-\x7F]*")@(([a-zA-Z0-9][-a-zA-Z0-9]*[a-zA-Z0-9]\.)+[a-zA-Z]{2,}|\[(([0-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\]))$ }}} This page might be useful: http://www.regular-expressions.info/email.html There, the following is recommended: {{{ \b[A-Z0-9._%-]+@[A-Z0-9-]+\.[A-Z]{2,4}\b }}} Although it doesn't fully conform to RFC822. An RFC822-compliant regex is as follows: {{{ (?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".… adrian Esaj   0 0 0 0 0 0
1301 2006-02-01 00:14:32 2006-10-13 21:49:23 2019-06-24 00:29:05.464741 Unreviewed closed Metasystem defect normal magic-removal fixed [magic-removal] AttributeError in DateQuerySet {{{ AttributeError: 'DateQuerySet' object has no attribute '_field' django/db/models/query.py in iterator, line 419 }}} Looks like the problem is in {{{django/db/models/query.py:104}}}, because {{{_field}}} isn't copied during the call to {{{_clone()}}}. adrian Esaj   0 0 0 0 0 0
1341 2006-02-11 09:34:09 2006-10-13 19:42:36 2019-06-24 00:29:31.105429 Unreviewed closed Internationalization defect normal   fixed date formattings need to use technical message IDs The date names currently are used directly. This leads to conflicts between the different versions of "May" (AP-Version, short version, long version - all the same message-ID, but in different languages they might be different). This should be changed so that month names use MAY_SHORT, MAY_AP and MAY_LONG (and other month names accordingly). The 'en' translatio must carry the original values, so that if a language isn't available, the english translation kicks in. One little problem: if people disable the english translation and only run one translation that doesn't include those technical IDs, they will see the IDs themselves. But they can just update the translation to include the correct month names, so this isn't a big problem. hugo hugo   0 0 0 0 0 0
1363 2006-02-16 22:08:32 2006-10-13 21:49:23 2019-06-24 00:29:45.222703 Unreviewed closed Core (Other) defect normal magic-removal fixed Python 2.3-ism in magic-removal Need to add this: {{{ # For Python 2.3 if not hasattr(__builtins__, 'set'): from sets import Set as set }}} to {{{django/db/models/query.py}}}. adrian Esaj   0 0 0 0 0 0
1506 2006-03-16 21:58:00 2006-10-13 19:49:02 2019-06-24 00:31:16.294915 Unreviewed closed Core (Management commands) task major   fixed [patch] Admin interfaces throws KeyError exception when using OneToOneFields as primary key The exception is thrown when someone tries to change a record in the admin interface that uses a OneToOneField as a primary key. Exception details: {{{ KeyError at /admin/main/consultores/36/ 'id_user' Request Method: GET Request URL: http://localhost:8000/admin/main/consultores/36/ Exception Type: KeyError Exception Value: 'id_user' Exception Location: /usr/lib/python2.3/site-packages/django/core/meta/fields.py in original_value, line 75 Template error In template /usr/lib/python2.3/site-packages/django/contrib/admin/templates/admin/field_line.html, error at line 14 Caught an exception while rendering. 4 {% for bound_field in bound_fields %} 5 {% if bound_field.has_label_first %} 6 {% field_label bound_field %} 7 {% endif %} 8 {% field_widget bound_field %} 9 {% if not bound_field.has_label_first %} 10 {% field_label bound_field %} 11 {% endif %} 12 {% if change %} 13 {% if bound_field.field.primary_key %} 14 {{ bound_field.original_value }} 15 {% endif %} 16 {% if bound_field.raw_id_admin %} 17 {% if bound_field.existing_display %}&nbsp;<strong>{{ bound_field.existing_display|truncatewords:"14" }}</strong>{% endif %} 18 {% endif %} 19 {% endif %} 20 {% if bound_field.field.help_text %}<p class="help">{{ bound_field.field.help_text }}</p>{% endif %} 21 {% endfor %} 22 </div> 23 Traceback (innermost last) Switch back to interactive view Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/django/core/template/__init__.py" in render_node 732. result = node.render(context) File "/usr/lib/python2.3/site-packages/django/core/template/__init__.py" in render 778. output = self.filter_expression.resolve(context) File "/usr/lib/python2.3/site-packages/django/core/template/__init__.py" in resolve 589. obj = resolve_variable(self.var, context) File "/usr/lib/python2.3/site-packages/django/core/template/__init__.py" in resolve_variable 677. current = current() File "/u… mtredinnick wizeman   0 1 0 0 0 0
1548 2006-03-28 13:39:58 2006-10-13 19:47:56 2019-06-24 00:31:42.758823 Unreviewed closed contrib.admin enhancement normal   fixed Caching of related objects can be improved This is an improvement to related object caching on the trunk. Explanation: When using getters, an object attribute is used to cache the result so the database is not consulted on a subsequent call. For example: {{{ c.get_poll() # Hits the db c.get_poll() # doesn't, reads the cache attribute }}} When getting a list of related objects, no record is made of the object that spanwed them: {{{ c = p.get_choice_list() c.get_poll() # Hits the db }}} This patch changes get_FOO_list() to pre-cache the parent object so that the get_poll call wouldn't have to hit the db. In the example, p has already been loaded, and because c was created from it, we know that it is the answer to get_poll(). I haven't investigated how this would apply to the magic-removal branch. adrian Ned Batchelder (ned@tabblo.com)   0 0 0 0 0 0
1560 2006-03-30 09:04:02 2006-10-13 19:42:35 2019-06-24 00:31:50.373465 Unreviewed closed Internationalization defect normal   fixed the Chinese translation of the javascript in the django_src the Chinese translation of the javascript in the django_src is not done yet. hugo cmaxcao@gmail.com   0 0 0 0 0 0
1572 2006-04-02 12:02:46 2006-10-13 19:37:50 2019-06-24 00:31:58.031303 Unreviewed closed Documentation task trivial   fixed [M-R][Patch]feedgenerator.py should also support only username or email I found that Rss201rev2Feed in feedgenerator.py only support both username and email supplied situation, and I think if there is only username or email it also need support. And I also change the outpu format from : email ( username ) to username ( email ) if both of them supplied I think it's the common format of the author. And I also found that if I'm using Chinese in author_name, they'll be complained that: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 0: ordinal not in range(128) So I remove 'u' string prefix. adrian limodou@gmail.com   0 0 0 0 0 0
1652 2006-04-17 15:13:06 2006-10-13 21:53:26 2019-06-24 00:32:48.556950 Unreviewed closed Database layer (models, ORM) defect critical   fixed sqlite backend executemany -> typo bug There is a typo in {{{backends/sqlite/base.py }}} note how the last line uses a non existing parameter {{{param}}} instead of {{{param_list}}} {{{ def executemany(self, query, param_list): query = self.convert_query(query, len(param_list[0])) return Database.Cursor.executemany(self, query, param) }}} adrian ialbert   0 0 0 0 0 0
1699 2006-04-26 21:12:56 2006-10-13 19:48:42 2019-06-24 00:33:18.250336 Unreviewed closed contrib.admin defect normal   fixed raw_id_admin problem I have ForeignKey field with raw_id_admin=True which references ProductVariation object. In admin when I'm selecting ProductVariation object from popup window, ProductVariation edit windows is opened instead of copying ProductVariation id into ForeignKey field of opener window. In JS console window of my Firefox I see following record: {{{ Error: missing ) after argument list in opener.dismissRelatedLookupPopup(window, 621L); return false; }}} adrian anonymous   0 0 0 0 0 0
1711 2006-04-28 06:55:33 2006-10-13 19:38:39 2019-06-24 00:33:25.838947 Unreviewed closed contrib.admin defect normal magic-removal worksforme [patch] inline editing uses invalid parent_id field when saving In the following example (taken from the OneToOneField example) when adding a new Restaurant or changing a Restaurant in the Admin interface with some values in the inline edited Pizza fields, an exception is thrown because rather than using the correct "id" of Restaurant (taken from Place) the string representation of Place is used: {{{ from django.db import models class Place(models.Model): name = models.CharField(maxlength=50) address = models.CharField(maxlength=80) def __repr__(self): return "%s the place" % self.name class Admin: list_display=['name', 'address'] class Restaurant(models.Model): place = models.OneToOneField(Place) serves_hot_dogs = models.BooleanField() serves_pizza = models.BooleanField() def __repr__(self): return "%s the restaurant" % self.place.name class Admin: list_display=['place'] class Pizza(models.Model): name = models.CharField(maxlength=50, core=True) price = models.IntegerField() restaurant = models.ForeignKey( Restaurant, edit_inline=models.TABULAR, num_in_admin=3, num_extra_on_change=3, ) }}} That's the exception: --------------------- {{{ ProgrammingError at /admin/bug1/restaurant/add/ ERROR: syntax error at or near "Pizza" at character 86 INSERT INTO "bug1_pizza" ("name","price","restaurant_id") VALUES ('Pepperoni',12,Fat Pizza the place) Request Method: POST Request URL: http://192.168.1.111:8000/admin/bug1/restaurant/add/ Exception Type: ProgrammingError Exception Value: ERROR: syntax error at or near "Pizza" at character 86 INSERT INTO "bug1_pizza" ("name","price","restaurant_id") VALUES ('Pepperoni',12,Fat Pizza the place) Exception Location: .....\django\django\db\backends\util.py in execute, line 11 }}} A simple workaround is to replace the __repr__ method in Place with: {{{ def __repr__(self): return "%s" % self.id }}} adrian erichs@calytrix.com   0 1 0 0 0 0
1802 2006-05-08 12:51:13 2006-10-13 19:48:14 2019-06-24 00:34:24.695457 Unreviewed closed contrib.admin defect normal   fixed changing description name gives error with after changing the verbose_name, a manage.py syncdb gave an error: {{{ Traceback (most recent call last): File "./manage.py", line 11, in ? execute_manager(settings) File "django/core/management.py", line 1237, in execute_manager execute_from_command_line(action_mapping) File "django/core/management.py", line 1163, in execute_from_command_line action_mapping[action]() File "django/core/management.py", line 473, in syncdb app=app, created_models=created_models) File "django/dispatch/dispatcher.py", line 347, in send sender=sender, File "django/dispatch/robustapply.py", line 47, in robustApply return receiver(*arguments, **named) File "django/contrib/auth/management.py", line 34, in create_permissions p.save() File "django/db/models/base.py", line 185, in save ','.join(placeholders)), db_values) File "django/db/backends/util.py", line 12, in execute return self.cursor.execute(sql, params) File "django/db/backends/sqlite3/base.py", line 74, in execute return Database.Cursor.execute(self, query, params) pysqlite2.dbapi2.IntegrityError: columns content_type_id, codename are not unique }}} content of the table is: {{{ sqlite> select * from auth_permission; ... 31|Can add TrainingsTagebuch|11|add_trainingstagebuch 32|Can change TrainingsTagebuch|11|change_trainingstagebuch 33|Can delete TrainingsTagebuch|11|delete_trainingstagebuch }}} executed sql is: {{{ SELECT "auth_permission"."id","auth_permission"."name","auth_permission"."content_type_id","auth_permission"."codename" FROM "auth_permission" WHERE ("auth_permission"."codename" = ? AND "auth_permission"."name" = ? AND "auth_permission"."content_type_id" = ?) ['add_trainingstagebuch', u'Can add Eintrag im Trainingstagebuch', 11] INSERT INTO "auth_permission" ("name","content_type_id","codename") VALUES (?,?,?) [u'Can add Eintrag im Trainingstagebuch', 11, 'add_trainingstagebuch'] }}} because the name is used in the where lookup django does not find the record… adrian mdt@emdete.de   0 0 0 0 0 0
1903 2006-05-17 00:15:10 2006-10-13 19:42:14 2019-06-24 00:35:29.831834 Unreviewed closed Template system enhancement normal   invalid [patch] to add filter "get" to add getting data from dicts and lists Any chance this could be added? I want to display a list of items with user customizable columns. I couldn't see any other way to do this other than implementing a filter. It seems like it would be a fairly fundamental filter, but it's absent from the library ("slice" isn't appropriate as dicts don't play nice with them). An alternative, of course, would be to have "getitem" and "getattr" filter, but that's slightly more verbose and technical. Any chance this could be added? Thanks. -e adrian erickt@dslextreme.com   0 1 0 0 0 0
1933 2006-05-19 19:03:53 2006-10-13 19:59:44 2019-06-24 00:35:48.693538 Unreviewed closed contrib.admin enhancement normal   wontfix why do settings exist in code (settings.py) and not in a (potentially remote) XML config file? After playing around with Django quite a bit (and loving it for the most part), and talking with a fellow developer friend who also gave it a whirl - we both a agreed that having settings inside actual code was really inconvenient (and bad design for the most part). Why is it like this? Why not put these 'settings' in an xml file, that can then be placed outside your build directory, for easy maintainability and reusability? -Thanks for your work. adrian eetheband@yahoo.com   0 0 0 0 0 0
1945 2006-05-20 19:02:26 2006-10-13 19:39:18 2019-06-24 00:35:56.319556 Unreviewed closed Internationalization defect minor   worksforme Problem following the tutorial when using non English characters I'm following http://www.djangoproject.com/documentation/tutorial1/ and its second part. Everything goes OK. Just, to try things, I modify most of the examples of code. So when I modified the polls/models.py to create the Poll object, instead of using pub_date's tutorial provided description, I wrote: pub_date = models.DateTimeField('Fecha de publicación') To make the script a valid python script, I added at the top: # -*- coding: latin1 -*- So later, much much later, when I'm adding the administrative interface, I reach the point where I have added the "class Admin: pass" to Poll and web browsed my way to see the first poll. Here, the poll is displayed, and the date description shows a broken character (the accented o): "Fecha de publicaci�n:" (not sure if that will get through, it shows a question mark inside a rotated square). Well, I guess maybe Django wants unicode characters or stuff. So I modified my Poll class to read (note the unicode string): pub_date = models.DateTimeField(u'Fecha de publicación') Reloading the admin page I get: UnicodeDecodeError at /admin/polls/poll/1/ 'ascii' codec can't decode byte 0xc3 in position 75: ordinal not in range(128) ...along with a hell long of a callstack and environment dump. Since I'm used to these kind of things, I tried the following change: pub_date = models.DateTimeField(u'Fecha de publicación'.encode("utf8")) ...which worked and didn't crash, but strikes me as unusually cumbersome to do. AFAICS the model doesn't properly treat unicode strings and the reason I get this OK with the utf8 encoding is just because that's what the output page charset is, and the result is processed by the browser. I guess if I switched that to latin1 now it would break visually as well, right? Is Django unable to handle internationalised stuff in the model? If this is the case, I would add a note on the kind of strings you can use for the model. jacob gradha@titanium.sabren.com   0 0 0 0 0 0
1959 2006-05-22 03:59:43 2006-10-13 19:43:03 2019-06-24 00:36:05.118190 Unreviewed closed contrib.admin defect normal   fixed typo in SVN code - contrib/admin/views/doc.py {{{ Index: contrib/admin/views/doc.py =================================================================== --- contrib/admin/views/doc.py (revision 2956) +++ contrib/admin/views/doc.py (working copy) @@ -284,7 +284,7 @@ 'DateTimeField' : _('Date (with time)'), 'EmailField' : _('E-mail address'), 'FileField' : _('File path'), - 'FilePathField', : _('File path'), + 'FilePathField' : _('File path'), 'FloatField' : _('Decimal number'), 'ForeignKey' : _('Integer'), 'ImageField' : _('File path'), }}} adrian ian@holsman.net   0 0 0 0 0 0
1995 2006-05-24 19:32:51 2006-10-13 19:37:30 2019-06-24 00:36:28.051080 Unreviewed closed Core (Other)   trivial master wontfix Comments system: Change &#34;Forgotten your password?&#34; to &#34;Forgot your password?&#34; This is in {{{django/contrib/comments/templates/comments/form.html}}} : {{{ {% trans "Forgotten your password?" %} }}} Proper English would be either "Forgot your password?" or "Have you fogotten your password?". Our editor made me change this :D adrian dave@rightround.com   0 0 0 0 0 0
2029 2006-05-29 09:43:22 2006-10-13 19:38:33 2019-06-24 00:36:49.302171 Unreviewed closed contrib.admin   normal   fixed [patch] Fix sorting models by verbose_name_plural in get_admin_app_list template tag Now it sorts models just by doing model_list.sort() and it don't work when you have custom verbose_name_plural set in your model, for example in UserProfile model verbose_name_plural set to 'address book'. Patch below fixes this to correctly sort based on verbose_name_plural. adrian Alex Dedul   0 1 0 0 0 0
2035 2006-05-30 10:51:16 2006-10-13 19:42:46 2019-06-24 00:36:53.011776 Unreviewed closed Core (Other) defect normal 0.91 invalid All perfect with Developer mode, but it not work in production using Apache Using developer with "python manage.py runserver 192.168.1.100:8001" works perfectly and very fine, but now i have to work in stable mode (production) and i use APACHE2 + Mod_python and i have configured apache2.conf with this (and always i have "404 PAGE NOT FOUND"): '' <Location /myproject/> SetHandler mod_python PythonHandler django.core.handlers.modpython PythonPath "['/home/mparra/desarrollo/django/'] + sys.path" SetEnv DJANGO_SETTINGS_MODULE myproject.settings PythonDebug On </Location> '' Path I have: /home/mparra/desarrollo/django/ /myproject /urls.py /polls /settings.py / ... When i put address: http://192.168.1.100/myproject/polls/ i have the next: ''Page not found (404) Request Method: GET Request URL: http://192.168.1.100/myproject/polls/ Using the URLconf defined in myproject.urls, Django tried these URL patterns, in this order: 1. ^polls/$ 2. ^polls/(\d+)/$ 3. ^polls/(\d+)/results/$ 4. ^polls/(\d+)/vote/$ The current URL, /myproject/polls/, didn't match any of these. '' My urls.py is: from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^polls/$', 'myproject.polls.views.index'), (r'^polls/(\d+)/$', 'myproject.polls.views.detail'), (r'^polls/(\d+)/results/$', 'myproject.polls.views.results'), (r'^polls/(\d+)/vote/$', 'myproject.polls.views.vote'), ) Thanks, i wait your response!! Thanks manuparra@gmail.coim anonymous   0 0 0 0 0 0
2055 2006-05-31 20:19:12 2006-10-13 21:17:49 2019-06-24 00:37:05.664442 Unreviewed closed contrib.admin defect normal master fixed [patch] In some languages the text at the login page of the admin page partly disappears When the translations for "username" or "password" are a bit longer then their English equivalents (like the Dutch "gebruikersnaam" which means "username"), the text partly disappears under the input fields. This patch changes the login.css file to prevent these situations. wilson Rudolph   0 1 0 0 0 0
2074 2006-06-02 22:50:05 2006-10-13 19:37:07 2019-06-24 00:37:17.581053 Unreviewed closed Core (Management commands) defect normal master worksforme Development server doesn't work on Mac Os with Python-2.4.3 I run the development server with python 2.4.3 : {{{ ibook-g4-de-charlax:~/temp/test/django/test1 ca$ python Python 2.4.3 (#1, May 25 2006, 02:02:07) [GCC 4.0.1 (Apple Computer, Inc. build 5247)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> ibook-g4-de-charlax:~/temp/test/django/test1 ca$ python manage.py runserver Validating models... 0 errors found. Django version 0.95 (post-magic-removal), using settings 'test1.settings' Development server is running at http://127.0.0.1:8000/ Quit the server with CONTROL-C. }}} No error for the moment. Then I load http://127.0.0.1:8000/ in my browser. I get this error : {{{ Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/servers/basehttp.py", line 272, in run self.result = application(self.environ, self.start_response) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/servers/basehttp.py", line 615, in __call__ return self.application(environ, start_response) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/handlers/wsgi.py", line 140, in __call__ self.load_middleware() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/handlers/base.py", line 31, in load_middleware raise exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e) ImproperlyConfigured: Error importing middleware django.middleware.sessions: "No module named sessions" }}} Then I reload the page, and it works fine, but after each change I won't work until I reload the page. With Python-2.3 there's no problem. adrian charlax   0 0 0 0 0 0
2087 2006-06-05 00:45:39 2006-10-13 19:59:25 2019-06-24 00:37:25.780840 Unreviewed closed contrib.admin defect normal   wontfix Django database definition generation from SQL definition file --&gt; integration with ERW Immediate Feature Request: ------ Auto-generation of Python database definition code from pre-existing SQL file (could be fresh or could be exported from pre-existing database) More Far-Sighted Feature Request: ------ ERW integration Explanation: ------ The college I work for has a huge, intranet web-based administrative database built in PHP. While the PHP parts are hell to maintain, the database part is really quite nice. Django lets you define a database with Python, but "Garbage In, Garbage Out" if you do not have a good relational design in the first place. The programmer who built my college's system three years ago, a very talented and very lazy coder, used an early framework called ERW (http://erw.dsi.unimi.it/), by Sebastiano Vigna, to build the database, administrative forms, documentation, and ER diagrams. He then wrote the reports and customized bits in PHP, which is becoming increasingly difficult to maintain. I am looking to jump ship and learn a real language and use a better framework. That is why I am looking hard at Ruby on Rails, Zope, Turbo Gears, and Django. At this point, I am closest to going with Django. But there are parts of ERW that I am unwilling to let go of. ERW is basically two parts: the java-based ERTOOL and the php-based interface. Let's ignore the PHP bits, since even Vigna is not interested in continuing to use PHP and says he is planning to rewrite the project in another language. ERTOOL, on the other hand, is marvelous. It is a java .jar file that takes a single xml file and creates the following from it: 1 - A fully-normalized SQL database definition file with consistent naming conventions and foreign keys, user and group authentication/authorization, fine-grained permissions, etc. 2 - A linked and easy-to-use set of documentation in many formats that makes managing the database fun and easy. 3 - A .dot file (Graphviz) that creates a graphical representation of the database (an ER diagram), complete with hot links to the documentation. … adrian cooper.me@gmail.com   0 0 0 0 0 0
2090 2006-06-05 11:06:57 2006-10-13 19:41:57 2019-06-24 00:37:27.730273 Unreviewed closed Internationalization defect normal master fixed bad encoding in django.po french file django/conf/locale/fr/LC_MESSAGES/django.po line 15 : should have "Content-Type: text/plain; charset=UTF-8\n" instead of "Content-Type: text/plain; charset=ISO-8859-1\n" the django.mo file should be rebuild hugo fredz@pimentech.net   0 0 0 0 0 0
2092 2006-06-05 15:53:56 2006-10-13 23:56:14 2019-06-24 00:37:29.055617 Unreviewed closed Core (Other) defect normal   fixed Wrong redirect to https URL when using django with mod_python Currently in django/middleware/common.py following code is used to determine whether http or https URL should be used for redirect: {{{ #!python os.environ.get('HTTPS') == 'on' }}} This doesn't work in all cases at least with mod_python. mod_python doesn't create new process every time it process request, instead it reused already created processes. Consider following scenario: * I've requested some URL of my application using HTTPS protocol. mod_python created new process A and sets HTTPS environment variable to 'on' * I've requested some other URL using HTTP (http://localhost/test), but redirect is required to http://localhost/test/. mod_python processes this request using the same process A, and I will be redirected to URL with HTTPS protocol: https://localhost/test/ I am not mod_python expert, but I've searched mod_python mailing lists and found following thread (by Adrian Holovaty BTW :) : http://www.modpython.org/pipermail/mod_python/2004-September/016448.html So the right way is to check https protocol for mod_python is: {{{ #!python req.subprocess_env.has_key('HTTPS') and req.subprocess_env['HTTPS'] == 'on' }}} As I understand following code in ModPythonHandler exists to solve the problem: {{{ #!python os.environ.update(req.subprocess_env) }}} Unfortunately it doesn't solve problem with HTTPS, because HTTPS is already 'on' in os.environ and is not presented at all in req.subprocess_env. Possible solutions: * explicitly check for HTTPS environment variable * add is_ssl() method to HttpRequest and use it adrian k.shaposhnikov@gmail.com   0 0 0 0 0 0
2096 2006-06-06 11:45:12 2006-10-13 19:59:38 2019-06-24 00:37:31.842270 Unreviewed closed Documentation defect normal   fixed [patch] small M-R fix for example in ' template language for programmers' doc The example in 'Extending the template system' section still talks about a models/ subdir. This litle attached patch fixes that. jacob ramiro   0 1 0 0 0 0
2129 2006-06-11 10:20:24 2006-10-13 19:42:11 2019-06-24 00:37:53.777539 Unreviewed closed Validators defect normal master invalid the validate() method shouldn't ignore maxlength The validate() method of a model does not complain when exceeding the maxlength of a CharField. There should be an error in the returned dictionary (e.g. "Ensure your text is less than 75 characters.") In the following example someone could add an invalid e-mail-address without getting a validation error: {{{ >>> import django.contrib.auth.models as auth >>> u = auth.User.objects.get(pk=1) >>> u.email = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@xx.xx' >>> u.validate() {} >>> u.save() /usr/lib/python2.3/site-packages/django/db/backends/mysql/base.py:35: Warning: Rows matched: 1 Changed: 1 Warnings: 1 return self.cursor.execute(sql, params) >>> u.validate() {} >>> u = auth.User.objects.get(pk=1) >>> u.email 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' >>> u.validate() {'email': ['Enter a valid e-mail address.']} >>> }}} adrian tom@eggdrop.ch   0 0 0 0 0 0
2162 2006-06-15 07:05:02 2006-10-13 19:42:26 2019-06-24 00:38:14.674131 Unreviewed closed Contrib apps enhancement normal   fixed [patch] high-level syndication framework should support categories As [http://groups.google.com/group/django-users/browse_thread/thread/7287587ba125f5a7/87a95d9f47d59867?q=feed+categories&rnum=2#87a95d9f47d59867 Flavio Curella points out], it seems like the high-level syndication framework ought to support categories (i.e., tags). He suggests offering three ways of doing it, but that seems like overkill, because if we support an "item_categories" method that works like the "item_pubdate" method, then simpler schemes are easy to implement too. Patch included, and as bonus it's only one line long! :-) I'll buy that for a dollar. Also, this has some overlap with #1028, but my way is better because IMHO templates don't usually work well with XML. That's because in cases like RSS, XML isn't really being used as a markup language, but rather as merely a quasi-human-readable data format, so we should generate it programmatically. adrian greg[at]abbas.org   0 1 0 0 0 0
2190 2006-06-19 01:02:57 2006-10-13 19:48:07 2019-06-24 00:38:32.569198 Unreviewed closed Validators enhancement normal master fixed [patch] make the forms.NullBooleanField handle None value as forms.NullSelectField do I'm using the NullBooleanField for my Content model: {{{ class Content(models.Model): deleted = models.NullBooleanField(default=False, blank=True) ... }}} that creates the following field in db: {{{ "deleted" bool NULL }}} I got KeyError while trying to create a new content record without the new_data[\'deleted\'] beening set. it's caused by django/forms/__init__.py line 574 (NullBooleanField): {{{ 573. def html2python(data): 574. return {'1': None, '2': True, '3': False}[data] }}} the "data" passed to this html2python is None if I didn't inject the new_data[\'deleted\'] manually while posting. Since NullBooleanField implies null-able value in the db level, I think form.NullBooleanField should accept None value and handle it properly as NullSelectField - if data is None, just return None. so here is the simple patch: {{{ Index: django/forms/__init__.py =================================================================== --- django/forms/__init__.py (revision 3131) +++ django/forms/__init__.py (working copy) @@ -571,6 +571,8 @@ return SelectField.render(self, data) def html2python(data): + if not data: + return None return {'1': None, '2': True, '3': False}[data] html2python = staticmethod(html2python) }}} regards, - eric adrian nkeric   0 1 0 0 0 0
2191 2006-06-19 01:18:04 2006-10-13 19:38:58 2019-06-24 00:38:33.245778 Unreviewed closed Database layer (models, ORM) defect normal master wontfix Ordering of IpAddressField ist not natural The ordering of IpAddressField is not natural which doesn't look very well on large lists. I think for platform and backwards compatibility a change to a interger field are out of scope. I found http://www.jimgrill.com/pages/content/sortip which would allow at least with mysql a natural sorting of IpAddressFields. For Postgresql i haven't found a function yet, only for the inet/cidr row types. adrian django@poelzi.org   0 0 0 0 0 0
2192 2006-06-19 02:49:46 2006-10-13 19:37:06 2019-06-24 00:38:33.902363 Unreviewed closed contrib.admin defect major master fixed [patch] DateField with unique=True breaks The following model breaks, when I try to add an object in the admin. {{{ from django.db import models class Foo(models.Model): the_date = models.DateField('Watch me screw up', unique=True) class Admin: pass }}} With the following error: {{{ AttributeError at /admin/foo/foo/add/ 'str' object has no attribute 'strftime' Request Method: POST Request URL: http://localhost/admin/foo/foo/add/ Exception Type: AttributeError Exception Value: 'str' object has no attribute 'strftime' Exception Location: /home/anonymous/django/latest/django/db/models/fields/__init__.py in get_db_prep_lookup, line 415 }}} adrian anonymous DateField unique breaks 0 1 0 0 0 0
2194 2006-06-19 03:27:51 2006-10-13 19:48:13 2019-06-24 00:38:35.206088 Unreviewed closed contrib.admin defect trivial   fixed [patch] Minor inconsistency in "unique together" validation error message Two of the fields in a model are 'prefname' and 'mrn'. The long name of 'prefname' is 'Preferred Name' and the long name of 'mrn' is 'Member Record Number'. I noticed a minor inconsistency when I added {{{ unique_together = (('prefname', 'mrn'),) }}} to the Meta class of the model. When I add two records that are not unique together, I get the error 'Person with this Preferred Name already exists for the given mrn.' This is great, except that the long name is given for one of the fields but not the other. It would be preferrable if the error read, 'Person with this Preferred Name already exists for the given Member Record Number'. Like I said, it's very minor. adrian amcnabb@mcnabbs.org   0 1 0 0 0 0
2204 2006-06-20 15:20:27 2006-10-13 19:42:43 2019-06-24 00:38:41.480124 Unreviewed closed Core (Other) enhancement normal   wontfix [patch] A more anal pluralization algorithm I have changed pluralization to work correctly with words like "entry", "basis", "cactus", "poromenos", etc. The standard "+ 's'" didn't apply here and I thought it would be better if Django handled these by default instead of requiring the user to supply their pluralized name. adrian Poromenos   0 1 0 0 0 0
2211 2006-06-21 22:10:15 2006-10-13 19:36:59 2019-06-24 00:38:45.934860 Unreviewed closed Metasystem defect normal master fixed [patch] exact, gt, gte, lt, lte, ne lookups fail for DateField fields Documentation about field lookups cites this example: {{{ Entry.objects.filter(pub_date__lte='2006-01-01') }}} However, if pub_date is a !DateField field the query fails. Same thing with exact, gt, gte, lt, lte, ne lookups. Using {{{ Entry.objects.filter(pub_date__lte=datetime.date()) }}} all works fine, though I don't think this is the intended way to make this kind of query. In the admin site also there are some troubles caused by this behaviour. Try to add a !DateField field in list_filter for some model and ask for objects in 'Past 7 days'. This is the traceback. {{{ Traceback (most recent call last): File "/home/paolo/django_current/django/core/handlers/base.py" in get_response 74. response = callback(request, *callback_args, **callback_kwargs) File "/home/paolo/django_current/django/contrib/admin/views/decorators.py" in _checklogin 54. return view_func(request, *args, **kwargs) File "/home/paolo/django_current/django/views/decorators/cache.py" in _wrapped_view_func 40. response = view_func(request, *args, **kwargs) File "/home/paolo/django_current/django/contrib/admin/views/main.py" in change_list 734. cl = ChangeList(request, model) File "/home/paolo/django_current/django/contrib/admin/views/main.py" in __init__ 565. self.get_results(request) File "/home/paolo/django_current/django/contrib/admin/views/main.py" in get_results 624. result_list = list(self.query_set) File "/home/paolo/django_current/django/db/models/query.py" in __iter__ 94. return iter(self._get_data()) File "/home/paolo/django_current/django/db/models/query.py" in _get_data 412. self._result_cache = list(self.iterator()) File "/home/paolo/django_current/django/db/models/query.py" in iterator 162. select, sql, params = self._get_sql_clause() File "/home/paolo/django_current/django/db/models/query.py" in _get_sql_clause 426. tables2, joins2, where2, params2 = self._filters.get_sql(opts) File "/home/paolo/django_current/django/db/models/query.py" in get_sql 557. tables2, joins2, where2,… adrian paolo@php3.it   0 1 0 0 0 0
2214 2006-06-22 11:12:02 2006-10-13 19:36:50 2019-06-24 00:38:47.844879 Unreviewed closed Core (Other) defect normal master worksforme [patch] Form fields for related models not properly processed Hi, When a field in a related object on a form is null=True, but the field type has empty_strings_allowed=False, and the form is submitted, blank fields are sent to get_db_prep_save() as blank strings, rather than as None. The attached patch fixes the problem in my case. It should be reviewed, because I don't know what else it might affect. Russell adrian Russell Cloran <russell@hbd.com>   0 1 0 0 0 0
2216 2006-06-22 19:29:26 2006-10-13 19:37:20 2019-06-24 00:38:49.073224 Unreviewed closed Database layer (models, ORM) defect normal master fixed Filtering by a field having same name as the model results in AttributeError For model {{{ class Color(models.Model): color = models.TextField(maxlength=100) similar_colors = models.ManyToManyField("self") }}} filtering does not work by field "color": Color.objects.filter(color="Light") results in AttributeError: 'RelatedObject' object has no attribute 'column' Without the similar_colors relation, the filtering works fine. russellm anonymous   0 0 0 0 0 0
2257 2006-06-28 18:28:45 2006-10-13 19:36:58 2019-06-24 00:39:15.422632 Unreviewed closed Core (Management commands) defect normal   fixed [patch] syncdb should generate unique constraint names with hashes Take a look at how syncdb names constraints: {{{backend.quote_name('%s_referencing_%s_%s' % (r_col, table, col))}}} In some circumstances, syncdb generates the same constraint name (for foreign keys= for different tables. Now, using both table names in the name can lead to too long names, so this isn't a solution. I propose to use a hash of both table names + the two attribute names. A quick, easy and dirty version is: {{{backend.quote_name('%s_referencing_%s_%x' % (r_col, col, hash((r_table, table))))}}} Here's an example. {{{ class Man(models.Model): father = ForeignKey(Man, null=True) class Woman(models.Model): father = ForeignKey(Man, null=True) }}} These will (currently) both create the constraint 'father_referencing_man_id' (resulting in incomprehensible error message in case of mysql) mtredinnick mir@noris.de   0 1 0 0 0 0
2286 2006-07-05 00:07:20 2006-10-13 19:42:21 2019-06-24 00:39:34.161298 Unreviewed closed Core (Management commands) defect normal   invalid Validation error with syncdb I have an ```Email``` model linked to a ```Contact``` model (```contact=ForeignKey(Contact)``` in the ```Email``` model). The ```Contact``` model has an EmailField named ``email``. Syncdb is complaining that: {{{ Reverse query name for field 'contact' clashes with field 'Contact.email'." }}} If my understanding is correct, the reverse query name will be ``email_set``, not ``email`` so this shouldn't be a clash, should it? My work around at the moment is to actually set ``reverse_query='email_set'``, syncdb stops complaining but this is (in my understanding) the default reverse query name in this case anyway so it's a bit weird. (Just to be clear, the ```Email``` model is an actual email and the ```email``` field is an email address so they do serve seperate purposes) adrian SmileyChris   0 0 0 0 0 0
2301 2006-07-06 13:29:01 2006-10-13 19:36:59 2019-06-24 00:39:43.647662 Unreviewed closed contrib.admin enhancement minor   fixed [patch] AdminOption property to set links on display_field fields The attached patch add the ability to specify for which fields (among those listed in {{{display_fields}}}) the admin interface will present a link to the related object edit page. Currently, only the first field listed in {{{display_fields}}} get a {{{<a href="obj_id/">}}} tag. For example, if you have {{{blank=True}}} in your model for the first field, you won't be able to edit objects for which this field has been left blank. Moreover, you may want the admin interface to present links on several fields, or on an other field than the first one. This patch add a {{{display_fields_links}}} property to the !AdminOption class, with the following constraints: * {{{display_fields_links}}} needs {{{display_fields}}} to be defined, * fields specified in {{{display_fields_links}}} need to be present in {{{display_fields}}}, * if {{{display_fields_links}}} is omitted, the first of the {{{display_fields}}} fields will still be used for links. Since a picture is better than long sentences, an example is attached. adrian kilian <kilian.cavalotti@lip6.fr> list_display link 0 1 0 0 0 0
2309 2006-07-08 10:37:22 2006-10-13 19:42:17 2019-06-24 00:39:48.702924 Unreviewed closed Internationalization defect major master fixed After introducing USE_I18N runserver throws exception When I start my dev server I got following exception: {{{ $ PYTHONPATH=/Users/nesh/devel/workspace/riznica-mr/riznica:/store/django:/store/contrib/:/usr/local/lib/python2.4/site-packages/:/usr/bin/env python2.4 /Users/nesh/devel/workspace/riznica-mr/riznica/manage.py --settings=riznica.settings runserver Traceback (most recent call last): File "/Users/nesh/devel/workspace/riznica-mr/riznica/manage.py", line 4, in ? import settings # Assumed to be in the same directory. File "/Users/nesh/devel/workspace/riznica-mr/riznica/settings.py", line 6, in ? from django.utils.translation import gettext_lazy as _ File "/store/django/django/utils/translation/__init__.py", line 3, in ? if settings.USE_I18N: File "/store/django/django/conf/__init__.py", line 28, in __getattr__ self._import_settings() File "/store/django/django/conf/__init__.py", line 53, in _import_settings raise EnvironmentError, "Environment variable %s is undefined." % ENVIRONMENT_VARIABLE EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is undefined. }}} or with {{{ $ PYTHONPATH=/Users/nesh/devel/workspace/riznica-mr/riznica:/store/django:/store/contrib/:/usr/local/lib/python2.4/site-packages/ DJANGO_SETTINGS_MODULE=riznica.settings /usr/bin/env python2.4 /Users/nesh/devel/workspace/riznica-mr/riznica/manage.py --settings=riznica.settings runserver Traceback (most recent call last): File "/Users/nesh/devel/workspace/riznica-mr/riznica/manage.py", line 4, in ? import settings # Assumed to be in the same directory. File "/Users/nesh/devel/workspace/riznica-mr/riznica/settings.py", line 6, in ? from django.utils.translation import gettext_lazy as _ File "/store/django/django/utils/translation/__init__.py", line 3, in ? if settings.USE_I18N: File "/store/django/django/conf/__init__.py", line 28, in __getattr__ self._import_settings() File "/store/django/django/conf/__init__.py", line 55, in _import_settings self._target = Settings(settings_mod… hugo Djordjevic Nebojsa <nesh at studioquattro co yu>   0 0 0 0 0 0
2320 2006-07-10 04:42:31 2006-10-13 19:42:48 2019-06-24 00:39:55.732157 Unreviewed closed Documentation defect normal master fixed Template - Python, Tags, example Hi, I tried the example in the documentation page "The Django template language: For Python programmers" [http://www.djangoproject.com/documentation/templates_python/] section "Writing custom template tags" and I get errors. 1. When I use the tag I like: {{{ {% current_time "%Y-%M-%d %I:%M %p" %} }}} I get: {{{ Exception Type: TemplateSyntaxError Exception Value: current_time takes 1 arguments }}} If I remove the spaces within the string argument: {{{ {% current_time "%Y-%M-%d%I:%M%p" %} }}} it does not give this error. 2. In the "Shortcut for simple tags" case, I get: {{{ Exception Type: AttributeError Exception Value: 'str' object has no attribute 'contents' }}} The error comes from line: {{{ tag_name, format_string = token.contents.split(None, 1) }}} token variable is an empty string. I use it with: {{{ {% current_time "%Y-%M-%d%I:%M%p" %} }}} Thanks, Ray mtredinnick rvernica@gmail.com   0 0 0 0 0 0
2354 2006-07-14 21:44:30 2006-10-13 23:55:41 2019-06-24 00:40:17.267380 Unreviewed closed Documentation enhancement trivial   fixed [patch] add validate to tutorial1 I was following the tutorial and creating some alternative models which were not giving any output on '''manage.py sql'''. There were some minor errors in my models and it seems '''manage.py''' skips those models. These would have been much more easy to spot if '''manage.py validate''' was mentioned in the tutorial. I've attached my suggestion. jacob django@alper.nl   0 1 0 0 0 0
2372 2006-07-18 15:01:02 2006-10-13 19:45:43 2019-06-24 00:40:28.464333 Unreviewed closed Tools defect normal   fixed [patch] manage.py runfcgi seems to ignore LANGUAGE_CODE Running an app under apache+fcgi using manage.py FastCGI support, the LANGUAGE_CODE variable in settings is ignored and all translations are displayed using 'en-us'. The same settings file used with 'manage.py runserver' on the same system shows the correct translations. adrian ludo@qix.it   0 1 0 0 0 0
2401 2006-07-22 11:49:57 2006-10-13 19:42:32 2019-06-24 00:40:47.175800 Unreviewed closed Internationalization defect normal   worksforme strings escaping translation In admin, some strings have escaped translation - i am attaching a screenshot of edit users page in tamil where three strings and in english - the same result is in german also, so it is not that the tamil translation has missed the strings hugo lawgon@thenilgiris.com   0 0 0 0 0 0
2408 2006-07-24 08:23:33 2006-10-13 19:42:24 2019-06-24 00:40:51.766617 Unreviewed closed Translations defect normal   fixed [patch] trans_null doesn't have get_language_from_request There are situations where one might want to have the `USE_I18N` setting `False`, but still take advantage of `LocaleMiddleware` to populate the `Content-Language` header of the response. Unfortunately, `LocaleMiddleware` wants to do `get_language_from_request` to figure out which translation to use, and `trans_null` in `django.utils.translation` doesn't provide a method by that name. Adding a 'dummy' method which just spits back the default language code of the Django installation would fix this. hugo ubernostrum   0 1 0 0 0 0
2451 2006-07-30 10:02:44 2006-10-13 19:42:30 2019-06-24 00:41:19.184542 Unreviewed closed contrib.admin enhancement normal   fixed [patch] simplified locale in setup.py Hi, the complete list of django.conf.locales can be simplified by pattern for the language folder. Regards, Dirk adrian dummy@habmalnefrage.de   0 1 0 0 0 0
2556 2006-08-17 14:14:06 2006-10-13 19:37:12 2019-06-24 00:42:26.321165 Unreviewed closed Documentation defect normal   fixed simple_tag more capable than docs let on Opening per this email exchange on django-users: {{{ From: Malcolm Tredinnick On Thu, 2006-08-17 at 04:58 -0700, Karen Tracey wrote: > I've been experimenting with writing some template tags by reading > through the documentation and modifying some existing tags defined by > admin. I've got something like this: > from django import template > register = template.Library() > def paginator_number(request, i, paginator, page_num): > #do stuff, eventually returning str output > paginator_number = register.simple_tag(paginator_number) > This works, and I don't understand why. According to the documentation > (http://www.djangoproject.com/documentation/templates_python/#shortcut...) > a simple tag is supposed to only take one argument. Mine, as you see, > takes four. But it works fine, and somehow the arguments are being > checked, because if I pass in the wrong number I get a > TemplateSyntaxError saying that "paginator_number takes 4 arguments". It's a documentation bug, based on me not reading the code carefully enough (I wrote those docs; my fault entirely). I'll fix it when I get a chance. If you file a ticket and assign it to mtredinnick, that would remind me. [...] > It's convenient not to have to check the arguments myself but I'm > concerned about running into trouble down the line.... Now that I read the code more carefully, it inspects your function (using the inspect.getargspec() function from the Python standard library) and works out the positional arguments that it will take. They are then all accounted for when it processes your tag, including generating the error message syou are seeing. What you are doing is completely future proof. Regards, Malcolm }}} Thanks much for the quick answer! mtredinnick Karen Tracey <graybark@bellsouth.net>   0 0 0 0 0 0
2562 2006-08-18 18:12:17 2006-10-13 19:36:56 2019-06-24 00:42:30.154627 Unreviewed closed Core (Other) enhancement normal 0.95 wontfix Too much fields in User model I think there's too much fields in base ''User'' model. The only '''required''' fields for authorization purposes are ''username'', ''password'' and, possibly, ''is_active'' flag. So I think others should be removed (Yes, I know that other fields are optional). Why store in basic athentification model some additional data that isn't needed for athentification? With the new cool inheritance features you work on, it will be quite easy to extend base class with new fields. If you think that firstnames, lastnames and e-mails are very common, you're defenitely right. So you could make some model (''Staff'', for example), wich extends basic ''User'' with this fields and include it in django distribution. So if one needs just auth(entification|thorization), he would use base ''User'' class. Other would use built-in ''Staff'' class. And someone else would derive a custom class from basic ''User'' with exactly such fields, as he needs. Even if part of my users are robots, that have only ''model'' and ''version'' parameters, part of them are humans with common ''firstname'' and ''lastname'' and another part are programmers wich have only ''email'', I could build a custom model for each of them, not giving up the power of django's athentification system. adrian samozvanezz@gmail.com auth, core 0 0 0 0 0 0
2599 2006-08-24 09:37:04 2006-10-13 21:17:34 2019-06-24 00:42:53.612925 Unreviewed closed contrib.admin defect normal 0.95 fixed [PATCH] raw_id_admin field has incorrect value in admin form after validation errors I'm not sure what this is all about, I'm I was having the following problem: In the admin for an object that has a raw_id_admin field, when opening an object for editing, the value of the text input is correct: a comma-separated list of IDs: {{{ #!xml <input type="text" value="1,2,3" ... /> }}} However, when saving the object but getting validation errors, the form field suddenly contains the `repr` of the equivalent Python list in the value attribute: {{{ #!xml <input type="text" value="[&#39;1&#39;, &#39;2&#39;, &#39;3&#39;]" ... /> }}} I'll attach a patch that fixes this, but I'm really not sure where the actual problem is, and where it should be ideally fixed. adrian Christopher Lenz <cmlenz@gmx.de>   0 0 0 0 0 0
2746 2006-09-16 13:49:56 2006-10-13 19:38:18 2019-06-24 00:44:27.661753 Unreviewed closed Validators enhancement minor   wontfix [patch] new Validator for Mac Addresses Hi! I created a mac-address-validator for a project. Perhaps you can use it for Django... adrian anonymous   0 1 0 0 0 0
2747 2006-09-16 18:24:38 2006-10-13 19:37:18 2019-06-24 00:44:28.265031 Unreviewed closed contrib.admin enhancement normal master fixed [patch] send X-Headers for Doc Bookmarklets to logged in users This patch makes {{{ /admin/doc/bookmarklets/ }}} work for people without static IPs by returning the X-Headers not only to clients comming from STATIC_IPS. The X-Headers are sent to all logged in users with {{{ is_staff=True }}}. So basically the criterion is: {{{ if (request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS) \ or (request.user.is_authenticated() and request.user.is_staff): }}} Nice for developers/admins who come from an dynamic IP. adrian Maximillian Dornseif <md@hudora.de>   0 1 0 0 0 0
2796 2006-09-22 23:53:18 2006-10-13 19:48:07 2019-06-24 00:44:59.036592 Unreviewed closed contrib.admin enhancement normal   wontfix daily_cleanup outdated and hard to access So I made a patch (first time I'm touching the code, so probably not good enough). It adds a cleanup option to manage.py, which seems more logical to me here it goes Index: management.py =================================================================== --- management.py (révision 3797) +++ management.py (copie de travail) @@ -1187,6 +1187,20 @@ test.help_doc = 'Runs the test suite for the specified applications, or the entire site if no apps are specified' test.args = '[--verbosity] ' + APP_ARGS +def cleanup(): + "Runs the daily cleanup job for this site" + from django.conf import settings + from django.db import backend, connection, transaction + # Clean up old database records + cursor = connection.cursor() + cursor.execute("DELETE FROM %s WHERE %s < NOW()" % \ + (backend.quote_name('django_session'), backend.quote_name('expire_date'))) + transaction.commit_unless_managed() + +cleanup.help_doc = 'Runs the daily cleanup job for this site' +cleanup.args = "" + + # Utilities for command-line script DEFAULT_ACTION_MAPPING = { @@ -1212,6 +1226,7 @@ 'syncdb': syncdb, 'validate': validate, 'test':test, + 'cleanup':cleanup, } NO_SQL_TRANSACTION = ( @@ -1223,6 +1238,7 @@ 'reset', 'sqlindexes', 'syncdb', + 'cleanup', ) class DjangoOptionParser(OptionParser): @@ -1296,7 +1312,7 @@ if action == 'shell': action_mapping[action](options.plain is True) - elif action in ('validate', 'diffsettings', 'dbshell'): + elif action in ('validate', 'diffsettings', 'dbshell', 'cleanup'): action_mapping[action]() elif action == 'syncdb': action_mapping[action](int(options.verbosity), options.interactive) adrian sdistefano   0 0 0 0 0 0
2846 2006-09-29 14:37:19 2006-10-13 19:37:24 2019-06-24 00:45:30.260697 Unreviewed closed Core (Other) defect normal 0.95 worksforme something wrong in manipulators I have a Person model like this: {{{ class Person(models.Model): user = OneToOneField(User) dept = ForeignKey(Department) phone = ... }}} Also I have a form for any user change its own account settings. The code is: {{{ def index(request): manip = Person.ChangeManipulator(request.user) if request.POST: new_data = request.POST.copy() errors = manip.get_validation_errors(new_data) if not errors: manip.do_html2python(new_data) manip.save(new_data) return HttpResponseRedirect('/tosco/') else: errors = {} new_data = manip.flatten_data() form = forms.FormWrapper(manip, new_data, errors) return render_to_response('tosco.html', {'form':form}) }}} When I submit the POST to the form I get an error like this: {{{ ProgrammingError at /tosco/ ERROR: column "alec" does not exist SELECT 1 FROM "person_person" WHERE "user_id"=alec LIMIT 1 }}} OK. I discovered that the data in new_data is fine, with the id number of the user 'alec'. But when I call manip.save(new_data) it's being changed to the value 'alec' instead of the id number, at /path-to/django/db/models/manipulators.py line 97: {{{ if self.change: params[self.opts.pk.attname] = self.obj_key }}} I don't know why this is happening but if I change that to self.obj_key.id it works fine. Is that a bug? adrian fiorix@gmail.com   0 0 0 0 0 0

Advanced export

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

CSV options:

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