Re: Searching IntegerField

2009-06-30 Thread Marcelo Ramos
: >            return self.name > >     class Admin: >         list_display=('name','rollNo') >         search_field=['name','rollNo'] The keyword name is "search_fields" and you are using "search_field". -- Marcelo R

Re: How to deal with problem about ForeignKey

2009-04-28 Thread Marcelo Ramos
Field() > then there are some records of A/B, > how can i delete records of A and do not delete records of B which have > foreignkey on A Did you mean how to delete records of A for which there are no records in B pointing to them through the foreign key "a", right?

Re: Template within a Template

2009-04-27 Thread Marcelo Ramos
ngerous html tags. [1] http://docs.djangoproject.com/en/dev/ref/templates/builtins/#safe [2] http://docs.djangoproject.com/en/dev/ref/templates/builtins/#removetags Regards. -- Marcelo Ramos Django/Python developer --~--~-~--~~~---~--~~ You received this message because y

Re: Query subset

2008-10-31 Thread Marcelo Ramos
tabase hits, but yes in terms of the "size" of the retrieved data. If you are avoiding a lot of fields the difference in traffic size from the database can be big. Regards. -- Marcelo Ramos --~--~-~--~~~---~--~~ You received this message because you are

Re: fetching images from database

2008-10-31 Thread Marcelo Ramos
iles/#using-files-in-models for more info. Regards. -- Marcelo Ramos --~--~-~--~~~---~--~~ 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

Re: Query subset

2008-10-31 Thread Marcelo Ramos
tricting the select sql query only to those fields). You can read the docs http://docs.djangoproject.com/en/dev/ref/models/querysets/#values-fields for further information. Regards. -- Marcelo Ramos --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Making sure published date is respected in views

2008-09-12 Thread Marcelo Ramos
e. I > would assume using ".filter(...something...)" is the way to go but > what would be the best filter to apply? Any other ways to achieve > this? Yes, a filter is a good option. For example: from datetime import datetime .objects.filter(pub_d

Re: Using unique on a field

2008-09-11 Thread Marcelo Ramos
) method." About a legacy db where you put a unique constraint manually it is recommended to put the option unique to the field so you get a nice error in the Django forms instead of an error screen. Regards. [1] http://docs.djangoproject.com/en/dev/ref/models/fields/#unique -- Marcelo Ramos

Re: Timeout for URLField?

2008-06-28 Thread Marcelo Ramos
gt; No. Django's builtin validators has two results: validated or not. If you put a timeout then you are not validating, you are "trying" to validate which is a completely different thing :-) Why are you putting a validator if you allow it to be overriden. Just use a Ch

Re: create_object error

2007-04-05 Thread Marcelo Ramos
2007/4/5, Michael Radziej <[EMAIL PROTECTED]>: > > On Thu, Apr 05, Marcelo Ramos wrote: > > > es_AR: > > > > #: views/generic/create_update.py:43 > > #, python-format > > msgid "The %(verbose_name)s was created successfu

Re: create_object error

2007-04-05 Thread Marcelo Ramos
ó con éxito %(verbose_name)." When I changed LANGUAGE_CODE to es instead of es_AR it worked fine but es_AR will probably fail if i use create_update.update_object() because the translation for a successfull update has accented characters. Are the accented chars the problem? Maybe it is related

Re: create_object error

2007-04-04 Thread Marcelo Ramos
2007/4/4, Malcolm Tredinnick <[EMAIL PROTECTED]>: > > Hi Marcelo, > > On Wed, 2007-04-04 at 17:46 -0300, Marcelo Ramos wrote: > > After submitting a form using a generic view I get this error: > > > > Request Method: POST > > [...] > > Exce

create_object error

2007-04-04 Thread Marcelo Ramos
e correct value then i'm a bit lost here. I'm working with a svn copy of revision 4926 (today). Thanks in advance. -- Marcelo Ramos Fedora Core 6 | 2.6.19 Socio UYLUG Nro 125 --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: using Order-by with dynamic attribute

2007-03-28 Thread Marcelo Ramos
is no record in the DB I'm guessing that order_by will not work. Can > anybody advise on a way. You can make a custom sort_ by_total() function, create a list from the queryset result and sort the list with sort() and sort_by_total. I remember doing that some time ago and it worked but if the q

Re: tuples into a select list

2007-03-23 Thread Marcelo Ramos
c in categories %} > {{ c[1] }} > {% endfor %} Try: {{c|slice:"1:2"|first}} Regards. -- Marcelo Ramos Fedora Core 6 | 2.6.19 Socio UYLUG Nro 125 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups