How to use post_save signal ?

2012-03-04 Thread Nikhil Verma
Hi all I am using Django-1.2.5 and i want to use post_save signal in the following problem/task. I have :- models.py image = models.ImageField(.) remove_image = models.BooleanField() Now i want :- 1) When the user uploads the file , the file path appears on the imageField like this. Curr

Re: How to use post_save signal ?

2012-03-04 Thread akaariai
On Sunday, March 4, 2012 12:31:50 PM UTC+2, Nikhil Verma wrote: > > Hi all > > I am using Django-1.2.5 and i want to use post_save signal in the > following problem/task. > > I have :- > models.py > > image = models.ImageField(.) > remove_image = models.BooleanField() > > Now i want :- > >

Re: How to use post_save signal ?

2012-03-04 Thread Nikhil Verma
Hi akaariai As you said i will remove the file and leave the file in file system(mistake for writing delete). Now what i have done is :- image: Currently: images/testimonial-bottom_2.png Change: Delete this file When you click the link

Re: How to use post_save signal ?

2012-03-04 Thread akaariai
On Sunday, March 4, 2012 3:12:20 PM UTC+2, Nikhil Verma wrote: > > Hi akaariai > > As you said i will remove the file and leave the file in file > system(mistake for writing delete). > Now what i have done is :- > > image: Currently: > images/testimonial-bottom_2.png

Django-cms plugins - ImportError no module named: cmsplugin_filer_file....

2012-03-04 Thread doniyor
Hi there, i need your help, i am trying to setup cms of my webpage, but everytime i run the "python manage.py syncdb" the error comes: django.core.exceptions.ImproperlyConfigured: ImportError filer cmsplugin_filer_image : no module named filer cmsplugin_filer_image i have installed all p

Re: Django-cms plugins - ImportError no module named: cmsplugin_filer_file....

2012-03-04 Thread doniyor
by the way, i am using django-cms-2.2 On 4 Mrz., 15:07, doniyor wrote: > Hi there, > > i need your help, i am trying to setup cms of my webpage, but > everytime i run the "python manage.py syncdb" the error comes: > django.core.exceptions.ImproperlyConfigured: ImportError filer > cmsplugin_filer_

Re: Django-cms plugins - ImportError no module named: cmsplugin_filer_file....

2012-03-04 Thread Amao Zhao
the APP_INSTALLS in your settings.py is a list. please recheck your 'filer' and so no. 在 2012-3-4 下午10:07,"doniyor" 写道: > Hi there, > > i need your help, i am trying to setup cms of my webpage, but > everytime i run the "python manage.py syncdb" the error comes: > django.core.exceptions.Improperly

How can I make a view called "push" to add +1 to my Entry.push model?

2012-03-04 Thread leaks
I have this in mind: having entries in a page and people will be able to push them (voting them +1 to get them higher in the page). The more pushes the higher the post will be displayed. (I order them by the amount of pushes) I have put a submit button next to each post. The question: 1.How ca

Re: How to use post_save signal ?

2012-03-04 Thread Nikhil Verma
Hi akaariai I solved my problem by using snippet 1633 FileField/ImageField. Thanks for making my concept in signals. On Sun, Mar 4, 2012 at 7:23 PM, akaariai wrote: > On Sunday, March 4, 2012 3:12:20 PM UTC+2, Nikhil Verma wrote: >> >> Hi akaariai >> >> As you said i will remove the file and l

Re: Django-cms plugins - ImportError no module named: cmsplugin_filer_file....

2012-03-04 Thread doniyor
hey Amao, great help :))) i really didnot see this dummy mistake.. thanks great and chrs On 4 Mrz., 15:53, Amao Zhao wrote: > the APP_INSTALLS in your settings.py is a list. please recheck your 'filer' > and so no. > 在 2012-3-4 下午10:07,"doniyor" 写道: > > > > > > > > > Hi there, > > > i need yo

Django REST

2012-03-04 Thread Bharath Mundlapudi
Dear Django Users and Authors, I am wondering if there are any best practices or better way to write REST based apps on top of Django. I was using version 1.1 and not followed recent advancements. Can you kindly point me to links or references from your experience. Preferably out-of-the-box solut

Re: Django REST

2012-03-04 Thread Jani Tiainen
I've been very happy with django-rest-framework. I think there exists at least django-piston to do the same. And you can write it also "manually". Since REST is just architectural specification and doesn't involve any special magic. On Sun, Mar 4, 2012 at 8:13 PM, Bharath Mundlapudi wrote: > De

Re: GeoDjango distance queryset filter with distance value stored within model

2012-03-04 Thread Jani Tiainen
I think you can only achieve that currently by using queryset extra() method. You should open a ticket and preferably create a standard geodjango testcase for that. It could be also possible that not all gis backends support that kind of a behavior. On Sat, Mar 3, 2012 at 6:47 PM, Daniel Gerzo w

Re: Django REST

2012-03-04 Thread Daniel Hilton
On 4 March 2012 18:35, Jani Tiainen wrote: > I've been very happy with django-rest-framework. > > I think there exists at least django-piston to do the same. The other one to look at is django-tastypie - I've used it twice now in anger and been really happy with it plus the rate of development /

Re: Django REST

2012-03-04 Thread Mo Mughrabi
I recommend django-piston, we've been using it and it's great and highly capable On Sun, Mar 4, 2012 at 9:13 PM, Bharath Mundlapudi wrote: > Dear Django Users and Authors, > > I am wondering if there are any best practices or better way to write REST > based apps on top of Django. I was using ver

equivalent of flask's flash() in django

2012-03-04 Thread Bolang
Hi all, What is the equivalent of flask's flash()[1] in django? Thanks [1]http://flask.pocoo.org/docs/patterns/flashing/ -- 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 uns

Re: Django REST

2012-03-04 Thread Piotr Zalewa
On 03/04/12 20:06, Daniel Hilton wrote: On 4 March 2012 18:35, Jani Tiainen wrote: I've been very happy with django-rest-framework. I think there exists at least django-piston to do the same. The other one to look at is django-tastypie - I've used it twice now in anger and been really happy

Re: Security: How to destroy sessions for a user

2012-03-04 Thread Mr. Gerardo Gonzalez Cruz
You need check session always into your database to manage user sessions. When change a password you need a simple update over session table, then over every request in your site you need check if you password had a change, if yes the user session set a null. Basically you need polling to database

Haystack Solr Error

2012-03-04 Thread coded kid
I'm trying to rebuild_index, so after inputting manage.py rebuild- index , I'm getting: Removing all documents in your index because you said so. fail to clear Solr index: [Errno 10061] No connection could be made because the target machine actively refused it. What I'm I doing wrong? -- You re

Re: equivalent of flask's flash() in django

2012-03-04 Thread Daniel Arbanas
On Sun, Mar 4, 2012 at 8:12 PM, Bolang wrote: > Hi all, > What is the equivalent of flask's flash()[1] in django? > > Thanks > > [1] > http://flask.pocoo.orghttps://docs.djangoproject.com/en/dev/ref/contrib/messages// > **docs/patterns/flashing/

admin css

2012-03-04 Thread Mike Dewhirst
I would like to adjust the admin app's base.css. Nothing outrageous. I just want to change all the #999 color values to something a little bit darker so screen text is slightly easier to see. I could write a python script to do that but it feels wrong. I tried locating somewhere in my project