Re: automatically performing an a task

2010-05-22 Thread irum
Hi, Thanks:) However, sorry I am a newbie with this stuff. I have gotten some hands on Django during this project and have taken some understanding of cron by googling but I am still sort of lost with it. The problem is that if I fire manage.py script with cron, how do I run the specific task tha

Re: ManyToManyField m2m_changed signal issue

2010-05-22 Thread terry
it seems add duplicate user object to friends set , return an empty pk_set. since the m2m_changed 'post_add' action received why did not return an pk_set On May 22, 3:34 pm, terry wrote: > i have an model > > class People(models.Model): >      friends = models.ManyToManyField(User, blank=True) >

Re: Setting Up Django as Virtual Host

2010-05-22 Thread Richard Shebora
fyi... http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html On Sat, May 22, 2010 at 6:19 PM, Daniel Roseman wrote: > On May 22, 6:47 pm, Mike T wrote: >> Um, could someone point me in the right direction.  I have a site with >> a standard lamp server, running PHP.  I want to

Re: Django Sphinx Foreign key search

2010-05-22 Thread Allen Machary
search_string = req.REQUEST.get("search", "") query = Model1.objects if search_string == "": query = query.all() else: query = query.filter( Q(text_field__icontains=search_string) | Q(fek_field__text_field__icontains=search_string)) the query var

Re: Django Sphinx Foreign key search

2010-05-22 Thread Allen Machary
search_string = req.REQUEST.get("search", "") query = Model1.objects if search_string == "": query = query.all() else: query = query.filter( Q(text_field__icontains=search_string) | Q(fek_field__text_field__icontains=search_string)) the query var

Re: Setting Up Django as Virtual Host

2010-05-22 Thread Daniel Roseman
On May 22, 6:47 pm, Mike T wrote: > Um, could someone point me in the right direction.  I have a site with > a standard lamp server, running PHP.  I want to add a second Django > site, using a virtual host.  I have the virtual host set up, but I > don't know anything about configuring it to work.

Re: automatically performing an a task

2010-05-22 Thread Daniel Roseman
On May 22, 4:17 pm, irum wrote: > Hi, > > I am working on a sample auction site with Django for my course > project. I have a requirement that system automatically resolves an > auction after the end date of the auction and elect the winner. > > I am not sure how to implement this functionality an

Re: Admin site - unticking a field stores date in model

2010-05-22 Thread David
Thank you Shawn :-) I'll give that a go. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.co

Re: How to save links in the TextField

2010-05-22 Thread Rolando Espinoza La Fuente
On Fri, May 21, 2010 at 6:12 PM, nameless wrote: > > > I have a simple Blog model with a TextField. What is the best way to > save links in the TextField ? > > 1) Saving link in the database in this form: http://www.example.com > and then using some filter in the template to trasform it in form: >

Setting Up Django as Virtual Host

2010-05-22 Thread Mike T
Um, could someone point me in the right direction. I have a site with a standard lamp server, running PHP. I want to add a second Django site, using a virtual host. I have the virtual host set up, but I don't know anything about configuring it to work. I've done Django Development, but never co

Re: Admin site - unticking a field stores date in model

2010-05-22 Thread Shawn Milochik
Sure. Just create the datetime field in your model and override the save() function of the model to do what you want. To facilitate this, just override __init__() of the model to store the value of the boolean field upon instantiation so that, in save(), you know whether it has changed. Don't

Re: submit form to the db table with ForeignKey value

2010-05-22 Thread Goran
> Are you talking about: > # in your template >           {{ reg }} > > Does works for you? > > ~Rolando > Yes! It works! Thank you very much Rolando -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us

Re: Django Sphinx Foreign key search

2010-05-22 Thread urukay
No that's not what i want..i want search model over another model. esatterwh...@wi.rr.com wrote: > > You probably want to use the indexer argument. It allows you to > specify which indexes you want sphinx to search over. Of course you > have to tell sphinx which indexes ( models ) you want it

Re: How to save links in the TextField

2010-05-22 Thread nameless
help please :D On 22 Mag, 00:12, nameless wrote: > I have a simple Blog model with a TextField. What is the best way to > save links in the TextField ? > > 1) Saving link in the database in this form:http://www.example.com > and then using some filter in the template to trasform it in

automatically performing an a task

2010-05-22 Thread irum
Hi, I am working on a sample auction site with Django for my course project. I have a requirement that system automatically resolves an auction after the end date of the auction and elect the winner. I am not sure how to implement this functionality and which feature of Django should be used to a

Re: Django Sphinx Foreign key search

2010-05-22 Thread esatterwh...@wi.rr.com
You probably want to use the indexer argument. It allows you to specify which indexes you want sphinx to search over. Of course you have to tell sphinx which indexes ( models ) you want it to search in. http://www.sphinxsearch.com/docs/current.html#ref-indexer On May 21, 8:47 am, urukay wrote: >

Overriding ForeignKey widget CSS classes in the admin

2010-05-22 Thread Vasil Vangelovski
Hi I'm trying to build the CSS class attributes for all the widgets in my ModelForm dynamically in the form's __init__ method. This seems to work for and input widgets, but doesn't work if the is for a foreign key field. From what I can see the BaseModelAdmin replaces widgets for foreign keys di

Admin site - unticking a field stores date in model

2010-05-22 Thread David
Hello If I have a checkbox field for expiration, is there a built-in way I could store the date that this field is ticked in a datetimefield in the same model ? and also clear this entry when the checkbox is unticked ? Thank you -- You received this message because you are subscribed to the Goo

ManyToManyField m2m_changed signal issue

2010-05-22 Thread terry
i have an model class People(models.Model): friends = models.ManyToManyField(User, blank=True) and i use m2m_changed signal m2m_changed.connect(m2m_people_handle, People.friends.through) and the m2m_people_handle function is def m2m_people_handle(sender, instance, action, reverse, model,

Format localization in admin views

2010-05-22 Thread marcel
Hi, I started a very simple application width a DecimalField and DateTimeField in my model. I have in my settings :USE_L10N = True and LANGUAGE_CODE = 'ro'. It works according with my formats.py file in change_list but not works in change_form. I use last SVN version,pre-alpha SVN-13299.It is a bug