Re: Which IDE should I use for Django?

2011-12-19 Thread Ankit Rai
-users+unsubscr...@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > > > > -- > Mvh/Best regards, > Thomas Weholt > http://www.weholt.org > > -- > You received this message because you are subscrib

Re: Advanced Search

2011-05-02 Thread Ankit Rai
rom this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- *Ankit Rai* * * -- You received this message because you are subscribed to the Google Groups

Re: Accessing foreign key fields

2011-03-01 Thread Ankit Rai
ngo users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > >

Re: CSRF verification failed. Request aborted.

2011-02-24 Thread Ankit Rai
pplication ---Ankit Rai On Thu, Feb 24, 2011 at 3:25 PM, luca72 <lucabe...@libero.it> wrote: > (1, 2, 5, 'final', 0) > > Thanks > > Luca > > On 24 Feb, 10:50, Ankit Rai <ankit9...@gmail.com> wrote: > > after removing add @csrf_exempt, it will work retsart th

Re: CSRF verification failed. Request aborted.

2011-02-24 Thread Ankit Rai
after removing add @csrf_exempt, it will work retsart the server. Which version of django are you using to know version type follwoing cmd python import django django.VERSION On Thu, Feb 24, 2011 at 3:18 PM, luca72 wrote: > removing @crsf_protect i get the same error > >

Re: SELECT * FROM `student` WHERE mark=(select max(mark) from student)

2010-10-25 Thread ankit rai
say your model name is Student, and it has a field names as marks query set will be Student.objects.all().aggregate(Max('marks') this will be give you max marks st=Student.objects.filter(marks__in=Student.objects.all().aggregate(Max('marks'))) --ankit On Tue, Oct 26, 2010 at 9:28 AM, Phlip

Re: trouble with Django install

2010-09-12 Thread ankit rai
shortcut is a module name in django application.You might be using this in your views as from.django.shortcuts import httP*.There is no error while deploying . On Mon, Sep 13, 2010 at 8:49 AM, nick.l...@gmail.com wrote: > Sophi > > This is the simplest way to install Django:

Re: No module named shortcuts

2010-09-12 Thread ankit rai
Can you simply remove and re install the django .I have faced the same problem,this works for me! On Mon, Sep 13, 2010 at 1:00 AM, jean polo wrote: > django.contrib.admin is the problem then.. > I can access the shell if I comment it.. > problem is that I have no idea

Re: Translation

2010-08-10 Thread ankit rai
Can you describe your problem as i have recently done the django Internationalisation and i was able to do so . On Tue, Aug 10, 2010 at 11:05 PM, cootetom wrote: > I can't see anything wrong. Maybe someone else will. Maybe just create > a really simple one page web site from

Re: Question about django admin customization

2010-07-08 Thread ankit rai
you just need to add one function in your models.py def somename(self): return "click here"%(self.id) somename.allow_tags = True somename.short_description = "My field" in you admin.py list_display=['somename',] i think

Re: how to call an external Javascript using static serve() in Django?

2010-06-09 Thread ankit rai
check the source of ur web page does it includes the file and path is correct On Wed, Jun 9, 2010 at 1:16 PM, Dejan Noveski wrote: > Are you sure that the javascript file is loaded? Try the link to the > javascript file directly. > > > On Wed, Jun 9, 2010 at 7:10 AM, ravi

Re: Email Backend setting needed, a potential bug

2010-05-26 Thread ankit rai
check your django version .It might be that you have django at two places .I m using django 1.1 , have not fount such problem On Wed, May 26, 2010 at 12:34 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > On Wed, May 26, 2010 at 2:54 AM, Lakshman Prasad >

Re: How to pass the data submitted in 1 page to the next page?

2010-05-21 Thread ankit rai
On Fri, May 21, 2010 at 3:06 PM, ankit rai <ankit9...@gmail.com> wrote: > Make two separate views for handling the page.Enter the data in page one > and pass it as a query param or post method. In your *url.py* mapped the > second page and pass the param in post or get method

Re: How to pass the data submitted in 1 page to the next page?

2010-05-21 Thread ankit rai
Make two separate views for handling the page.Enter the data in page one and pass it as a query param or post method. In your *url.py* mapped the second page and pass the param in post or get method # url.py (r'^admin/xyz/(?P[a-zA-Z0-9-]+)$','xyz.views.myView'), view.py def

Re: ERROR: Caught UnicodeEncodeError while rendering: 'ascii' codec

2010-04-05 Thread ankit rai
from django.utils.encoding import * # views.py ## def country_detail(request, country_code): profiles = Profile.objects.filter(country__shortcode=country_code).filter(user__is_active='1') return render_to_response('people/country.html',{ 'country_code': country_code,

Re: ERROR: Caught UnicodeEncodeError while rendering: 'ascii' codec

2010-04-05 Thread ankit rai
from django.utils.encoding import * # views.py ## def country_detail(request, country_code): profiles = Profile.objects.filter(country__shortcode=country_code).filter(user__is_active='1') return render_to_response('people/country.html',{ 'country_code': country_code,

Re: ERROR: Caught UnicodeEncodeError while rendering: 'ascii' codec

2010-04-05 Thread ankit rai
use encoding method unicode(str).encde("UTF-8") On Mon, Apr 5, 2010 at 12:59 PM, Willem wrote: > I get following error: > > "Caught UnicodeEncodeError while rendering: 'ascii' codec can't encode > character u'\xe1' in position 161: ordinal not in range(128)" > > > If I

Re: Is any thing for python like .jar files for java.

2010-04-05 Thread ankit rai
you can use deb file for ur python project On Mon, Apr 5, 2010 at 11:48 AM, Anand Agarwal wrote: > I think you mean python egg. > > -Anand > www.bootstraptoday.com > > On Wed, Feb 10, 2010 at 1:35 AM, chiranjeevi muttoju < > chiru.bt...@gmail.com> wrote: > >> Hi all, >> Is

Re: pre-save and check for existing value of image

2009-11-10 Thread ankit rai
you self.instance.fieldname use this ur from . On Tue, Nov 10, 2009 at 12:58 PM, Ramdas S wrote: > Hi, > > I have this app which has an ImageField, where the image needs to be > cropped, resized, and a few effects (all from PIL) are applied on it, the > model looks something

Re: pre-save and check for existing value of image

2009-11-09 Thread ankit rai
You can check whether there is instance or not by self.instance .This will tell u that whether it is change (page)or a new object is added.And if it new object then only call ur custom functions.U can also use changeForm function On Tue, Nov 10, 2009 at 12:39 PM, Ramdas S

Re: Adding a password confirm on modelForm

2009-11-03 Thread ankit rai
in ur model form add a field called *confirm_password =CharField(max_length=200) * and then in admin u can add this field in fieldset .This will get display in ur UI For confirming the password is same or not use *clean* method and get the value of both the fields i.e password and

Re: Help with Admin forms validation error

2009-09-16 Thread ankit rai
First of all keep ur form in separate file named as forms.py .What all u r importing can u describe them .And check ur if condition. if desc and len(desc)>10: rasie .. On Wed, Sep 16, 2009 at 3:57 PM, Anish wrote: > > Hi, > please check whether you import statement

Re: python manage.py syncdb problem

2009-09-08 Thread ankit rai
hello, this error shows that there is some postgres db connection exception.please check ur connection or debug ur code. On Wed, Sep 9, 2009 at 11:07 AM, Zico wrote: > Hi, I have been trying to install fixmystreet in one of my Fedora 11 > machine. In one step, i need to

Re: Call a custom python function during each model save

2009-09-01 Thread ankit rai
def save_model(self, request, obj, form, change): obj.save() urfunction(aa,aa,aa,a) On Tue, Sep 1, 2009 at 3:59 PM, ANIL KARADAĞ wrote: > you can override model save method: > > for example > > class Student(models.Model): > name = models.CharField(blabla) >

Re: Call a custom python function during each model save

2009-09-01 Thread ankit rai
just overide save method and inside that method call ur function ,*do import it * for ex def save_model(): call ur function here myfunction(xx,aaa,aa) obj.save() On Tue, Sep 1, 2009 at 3:59 PM, ANIL KARADAĞ wrote: > you can override model save method: > > for

Re: redirect in django

2009-08-27 Thread ankit rai
thanks i got the solution On Thu, Aug 27, 2009 at 4:28 PM, Matthias Kestenholz < matthias.kestenh...@gmail.com> wrote: > > On Thu, Aug 27, 2009 at 12:38 PM, ankit rai<ankit9...@gmail.com> wrote: > > Nobody knows the answer to this question i think so > > >

Re: redirect in django

2009-08-27 Thread ankit rai
Nobody knows the answer to this question i think so On Thu, Aug 27, 2009 at 2:59 PM, ankit wrote: > > Hello, > > > I am new to django.I having to app in my admin.Know I want to know > that how can i redirect user to one app listpage if clicks save on > second app.say from

Re: Python/Django web programmer needed

2009-08-24 Thread ankit rai
india ,bangalore On Tue, Aug 25, 2009 at 12:09 AM, Michael <jmnu...@gmail.com> wrote: > > Where are you located? > > On Aug 24, 12:17 pm, ankit rai <ankit9...@gmail.com> wrote: > > can do for u .. > > > > > > > > On Mon, Aug 2

Re: Python/Django web programmer needed

2009-08-24 Thread ankit rai
can do for u .. On Mon, Aug 24, 2009 at 11:30 PM, Michael wrote: > > I own a web based medical recertification company and we are looking > for a Python/Django web programmer to do some work for us. The site > is written in Python using Django 1.0. We need to switch

Re: Default value for fields

2009-08-10 Thread ankit rai
check ur db table ,is null=true present.And in ur model write revision = models.IntegerField(default=0,balnk=true,null=true) and if u donont want to change the value from 0 at all then there is no need to diplay it in fields On Mon, Aug 10, 2009 at 11:29 PM, AG wrote: > >

Re: ANN: Django 1.1 released!

2009-07-29 Thread ankit rai
Congratulates to ALL the user & developers of Django On Wed, Jul 29, 2009 at 5:11 PM, rajeesh wrote: > > Applause! > > --- > Rajeesh > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: How to tell if a fields was modified

2009-07-24 Thread ankit rai
use clean method and use self.instance.fieldname to know previous value and then compare with the new value. On Fri, Jul 24, 2009 at 10:50 PM, Tim Chase wrote: > > >> How can I tell which model fields have been modified (this is, the > >> difference between the

Re: Search Field Problem

2009-07-21 Thread ankit rai
pls switch to django 1.1 beta version.You can easily download it from django site On Tue, Jul 21, 2009 at 3:47 PM, PanFei wrote: > oh my god ,I begin studying django by using 1.02 > > > > > On Tue, Jul 21, 2009 at 6:06 PM, Harish wrote: > >> >>

Re: model name ending with an 's'

2009-07-18 Thread ankit rai
in side ur class define class Meta: verbose_name_plural = "name which u want to be displayed on screen" for more details see docs class Meta options On Sat, Jul 18, 2009 at 11:22 AM, Earl Lapus wrote: > hi, > > I have a model named 'Services'. I added it to the

Re: Multi select field with images

2009-07-07 Thread ankit rai
little more explanation is required On Wed, Jul 8, 2009 at 10:31 AM, djangou...@gmail.com wrote: > I have a modelform and I want to make one of my select multiple fields > choices be images and not text. > > ideas/suggestions appreciated > > -- Sent from my Palm Pre > > > >

Re: Question IMAGE in Django

2009-06-22 Thread ankit rai
def art(request): art = Article.object.all() retrun % (art) art.allow_tags = True try this .Add this in your model or if in admin then pass object .then use list_display to display the image.see docs for more help: http://docs.djangoproject.com/en/dev/ref/contrib/admin/ On Mon, Jun 22, 2009 at

Re: Question IMAGE in Django

2009-06-22 Thread ankit rai
not got ur question.If u want to display image then set allow_tags=True. On Mon, Jun 22, 2009 at 3:34 PM, Vlad(L) wrote: > > Unfortunately, it is impossible. Through a browser has looked html > code - p> > > And how should be correctly registered MEDIA_URL in my case if

Re: how do I show a non-editable field in the admin site

2009-06-19 Thread ankit rai
feature, and > where can i see an example. > > thanks, > > Ernst > > On Fri, Jun 19, 2009 at 6:56 AM, ankit rai<ankit9...@gmail.com> wrote: > > use readonlyadmin in your admin.py.U can easily get it on search > > > > On Thu, Jun 18, 2009 at 7:17 PM, Eern

Re: how do I show a non-editable field in the admin site

2009-06-18 Thread ankit rai
use readonlyadmin in your admin.py.U can easily get it on search On Thu, Jun 18, 2009 at 7:17 PM, Eernst Bunders wrote: > > Hello > > I am new to django, and am in the process of discovering what it can > and can not do (out of the box). We are primarily interested in jango