Re: previous values of custom method in save

2013-01-30 Thread Sammael
Any advice please? Still didn't find any solution nor workaround. Maybe it's some kind of query caching? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-u

Re: get_absolute_url with custom extra parameter

2013-01-30 Thread Sammael
Thank you for your answer! I have a photo album which can be displayed in two modes: full (with url like 'album/id/full') and thumbnails ( like 'album/id/thumbnails' ). I would like 'get_absolute_url' to return a corresponding url depending on the given mode, something like {{ album.get_absolut

Re: getting same order in SQL as ManytoMany selection in Admin

2013-01-30 Thread Bill Freeman
I suppose that it is possible that Grappelli's JavaScript is ordering them. If you look at the raw HTML of the admin pages using curl or wget, or with JavaScript disabled in the browser, is the order maintained (this is harder than it sounds, since in curl you would have to fake a logged in sessio

Re: using existing database with django

2013-01-30 Thread Carlos Daniel Ruvalcaba Valenzuela
Yes, django can actually look at the DB schema and generate reasonable models from it, check the inspectdb command docs: https://docs.djangoproject.com/en/1.4/ref/django-admin/#inspectdb You can also slowly modernize and existing DB, for example, the field names or model names does not have to ma

using existing database with django

2013-01-30 Thread arc4gold
I have an existing database but I would like to design around that database using django...can I do this without altering the database in anyways significantly? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

getting same order in SQL as ManytoMany selection in Admin

2013-01-30 Thread Ken Ricci
I have a Django/Grappelli admin form for job postings which has a manytomany relationship for job requirements (using filter_horizontal). In the admin form, the order chosen stays constant when I save the job posting and display it again later. I'm trying to repeat the order in another app th

Re: CharField cannot have a "max_length" greater than 255 when using "unique=True"

2013-01-30 Thread mimino666
This snippet is what you need https://github.com/Mimino666/django-hash-field. Go ahead and give it a try, any feedback appreciated. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from i

Special SELECT and UPDATE for a field

2013-01-30 Thread Yarden Sachs
Hello, i want to create a field class for geometry (not using geodjango). here's the field code: http://pastebin.com/yADpZykJ i want 2 things i can't seem to do: 1. I want the select to wrap the column with MySql AsText() Function e.x. SELECT AsText(location) FROM addresses 2. I want to be able

Re: get_absolute_url with custom extra parameter

2013-01-30 Thread Mario Gudelj
You can't pass parameters to model functions from within a template. What exactly are you trying to achieve? On 30 January 2013 21:34, Sammael wrote: > Hello friends, > > Is the any way to pass an extra parameter to get_absolute_url method of a > model instance from template? > > Thank you for

Re: PHP vs Django

2013-01-30 Thread frocco
I coded a site in PHP using yii before I stumbled onto django a few weeks back. Now I am rewriting my site in django while I learn. I just love the framework. On Sunday, January 27, 2013 10:50:26 PM UTC-5, Nikhil Verma wrote: > > Well i would say its all about money and passion for programming.I

Re: Django hosting companies

2013-01-30 Thread Nikolas Stevenson-Molnar
+1 if you're dealing with small load, micro instances are super cheap (free for 1st year, even), as flexible as you need, and you can create images of a configured machine to launch more instances from. _Nik On 1/30/2013 7:16 AM, m1chael wrote: > aws micro instance > > On Tue, Jan 29, 2013 at 10:

Re: Django hosting companies

2013-01-30 Thread frocco
Thanks for the info on webfraction. I currently use bluehost.com, but webfraction looks like better support for django. On Tuesday, January 29, 2013 8:34:54 AM UTC-5, Frankline wrote: > > Have you tried webfaction? Very easy to setup. > > On Tue, Jan 29, 2013 at 4:30 PM, Gustavo Andres Angulo >

an elusive ValueError: 'str' object not callable -- lost.

2013-01-30 Thread Maurice Asimov
Hey guys. I recently started getting a ValueError complaining that an str is not callable -- in a very wierd place. This happens to some calls to messages.info(request, 'somethingsomething'), in one of those cases __inside the django console__ Traceback: Traceback: File "/app/.heroku/python/

Re: Django hosting companies

2013-01-30 Thread jianhui chen
I use google app engine. On Tue, Jan 29, 2013 at 8:17 AM, francislutalo wrote: > Anyone with an idea of which are the best companies to host my django > applications? > > > > Thank you, > Regards > francislutalo > > -- > You received this message because you are subscribed to the Google Groups >

Re: Long url parameter in GET request locks python

2013-01-30 Thread Andre Terra
I posted this answer on SO and thought I should share it here for the benefit of other and future readers: -- The accepted answer is spot on about the regex, but since we're discussing optimization, I thought I should note that

Re: How to make a field required in admin site

2013-01-30 Thread Ariel Isaac
It is a third application I can't do that, that's why I want to do it in the adminModel. Could you help me please ??? On Wed, Jan 30, 2013 at 10:34 AM, Black9design.com wrote: > Remove the line blank=True and it will be required. > > On Jan 30, 2013, at 7:01 AM, Ariel Isaac wrote: > > > Hi ev

Re: Long url parameter in GET request locks python

2013-01-30 Thread Shawn H
Indeed it was. As Alisdair posted, simplify the regex and validate elsewhere. Thanks. On Wednesday, January 30, 2013 11:26:51 AM UTC-6, fgallina wrote: > > 2013/1/30 Shawn H >: > > I posted this question yesterdat at stack overflow, but I'm wondering if > > this is a bug. I have a url that a

Re: Long url parameter in GET request locks python

2013-01-30 Thread Alasdair Nicol
On 30/01/13 16:38, Shawn H wrote: I posted this question yesterdat at stack overflow , but I'm wondering if this is a bug. I have a url that accepts one text parameter, allows spaces, and calls

Re: Long url parameter in GET request locks python

2013-01-30 Thread Fabian Ezequiel Gallina
2013/1/30 Shawn H : > I posted this question yesterdat at stack overflow, but I'm wondering if > this is a bug. I have a url that accepts one text parameter, allows spaces, > and calls a very simple view that checks if there are objects with a project > name that matches the text parameter value.

Long url parameter in GET request locks python

2013-01-30 Thread Shawn H
I posted this question yesterdat at stack overflow, but I'm wondering if this is a bug. I have a url that accepts one text parameter, allows spaces, and calls a very simple view that checks if t

raw_id_fields

2013-01-30 Thread Robert Dollinger
Hi everybody, I have a m2m relation where in my AdminForm I would use raw_id_fields instead of the filter_horizontal option. For explanation I prefer the raw_id_fields instead of the filter_horizontal option, because there records are already categorized. So in the popup-window the user has the

Re: How to make a field required in admin site

2013-01-30 Thread Black9design.com
Remove the line blank=True and it will be required. On Jan 30, 2013, at 7:01 AM, Ariel Isaac wrote: > Hi everybody, > > I have a model inherited from a third application call Video in that > model they have the thumbnail field with blank = True, this make in > the admin site that user could lef

Re: Django hosting companies

2013-01-30 Thread m1chael
aws micro instance On Tue, Jan 29, 2013 at 10:54 AM, Mengu wrote: > some of my friends are using webfaction. i use linode and in the past > i have used webbynode. > > On Jan 29, 3:17 pm, francislutalo wrote: >> Anyone with an idea of which are the best companies to host my django >> applications

How to make a field required in admin site

2013-01-30 Thread Ariel Isaac
Hi everybody, I have a model inherited from a third application call Video in that model they have the thumbnail field with blank = True, this make in the admin site that user could left in blank the thumbnail field, that's something I don't want to happen, I want to make in the admin.py in VideoA

Re: Django Framework Biginer guide please

2013-01-30 Thread Frankline
Just a question: How is Putty and OpenERP relevant to the question? In the meantime, you can start here: https://docs.djangoproject.com/en/1.4/ On Wed, Jan 30, 2013 at 12:49 PM, Vikas Yewale wrote: > I am new in Django-Python.so want guide to develope web based application > using Django frame

Django Framework Biginer guide please

2013-01-30 Thread Vikas Yewale
I am new in Django-Python.so want guide to develope web based application using Django framework. I Have : OS- UBUNTU , Putty , Open ERP. so please guide me Softwre requirement to develope django web based Apps. -- You received this message because you are subscri

get_absolute_url with custom extra parameter

2013-01-30 Thread Sammael
Hello friends, Is the any way to pass an extra parameter to get_absolute_url method of a model instance from template? Thank you for your answer. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receivin

previous values of custom method in save

2013-01-30 Thread Sammael
Dear friends, here is the relevant part of my model: *class Album(models.Model):* *name = models.CharField(max_length=64, blank=True) * *tags = models.ManyToManyField(Tag, blank=True) * *def tags_(self): * *return ', '.join([t.name for t in self.tags.all()]

Re: Why i can't get the debug informations (in case of error) when i run LiveServerTestCase tests?

2013-01-30 Thread Alessandro Pelliciari
Thanks for the answer! Because i'm developing and integrating some flow (social registration etc) through tests. So, instead of creating every time a new user, creating a new social association, and then after every try delete them from the database, the test does it from me. So, its like a k