Re: newforms-admin branch has been merged into trunk
Brian Rosner wrote: > I have just recently merged the newforms-admin branch into trunk as of > r7967 [1]. A BIG Thankyou to all involved !! Cheers / Frank --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: DateField() , AttributeError: 'str' object has no attribute 'strftime'
Russell Keith-Magee wrote: >On 8/8/07, Collin Grady <[EMAIL PROTECTED]> wrote: > > >>This is not a backend issue at all - the problem is you're assigning a >>string to the DateField, which is not what it needs. >> >> Thank Russ for the help.. typo on my part ;-) yes this works !! mydate = datetime.date(*time.strptime(inputdata[MY_DATE], '%Y-%m-%d')[:3]) Cheers. /Frank --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
DateField() , AttributeError: 'str' object has no attribute 'strftime'
Hi, fedora 7 django 0.96 DATABASE_ENGINE = 'sqlite3' maybe its late but DateField is causing me some grief when trying to load some test data from the command line (ie: not via admin web). in model test_date = models.DateField() in another python script (run on command line ) that imports the model and attempts to populate an sqlite database with lots of entries (test data from ascii file , including date fields in the format -mm-dd) eg: equivalent to obj.test_date='2007-12-04' obj.save() it complains about raceback (most recent call last): File "populate_database.py", line 136, in tr.save() File "/usr/lib/python2.5/site-packages/django/db/models/base.py", line 223, in save db_values = [f.get_db_prep_save(f.pre_save(self, True)) for f in self._meta.fields if not isinstance(f, AutoField)] File "/usr/lib/python2.5/site-packages/django/db/models/fields/__init__.py", line 494, in get_db_prep_save value = value.strftime('%Y-%m-%d') AttributeError: 'str' object has no attribute 'strftime' SO, thought I would have to do a time.strptime('2007-02-23', '%Y-%m-%d') thing in between but did not get it working. Suggestions welcome :-) /F --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: list_display with multiple url in admin , select item to change
Frank Singleton wrote: > Hi, > > Is it possible to embed hyperlinks in the list_display list for model ok read this in the docs.. If the string given is a method of the model, Django will HTML-escape the output by default. If youd rather not escape the output of the method, give the method an allow_tags attribute whose value is True. eg: class Person(models.Model): first_name = models.CharField(maxlength=50) last_name = models.CharField(maxlength=50) color_code = models.CharField(maxlength=6) class Admin: list_display = ('first_name', 'last_name', 'colored_name') def colored_name(self): return '%s %s' % (self.color_code, self.first_name, self.last_name) colored_name.allow_tags = True --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
list_display with multiple url in admin , select item to change
Hi, Is it possible to embed hyperlinks in the list_display list for model. An example is a model class that has say 1 foreign key reference, and list_display as follows list_display=('id','foreignkeyref') self.id appears in the first column as a hyperlink (nice, this hyperlink you get for free), but I would also like foreignkeyref to be a hyperlink also in the 2nd column. I would like them both to appear as hyperlinks and not just foreignkey as text, when you visit the admin "select item to change" page. Cheers / Frank --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---