Re: Problem with ModelForm

2010-09-04 Thread Kenneth Gonsalves
On Sat, 2010-09-04 at 09:19 -0700, Jagdeep Singh Malhi wrote: > form = Input(request.POST) form = InputForm(request.POST) -- regards Kenneth Gonsalves -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Pylons vs. Django

2010-09-04 Thread Feross
Hey everyone, I'm a new Python user and I'm looking for a web development framework to build a database-driven website. I've looked at the various Python web frameworks out there and I've settled on either Django or Pylons, but I'm not sure which to choose. Things I've heard about Django that I

Re: ANN: PyMySQL 0.3

2010-09-04 Thread Andy
Thanks Pete. I'm definitely interested in using PyMySQL for production. I'm interested in running Django in an async mode using gevent (http:// www.gevent.org/). gevent provides a money patch that turns any Python code into non-blocking. The problem is that MySQLdb is written in C, so it'd still

Re: Urlencode vs. iriencode

2010-09-04 Thread Sam Lai
Here's the code for the two (the numbers at the start of each line are just line numbers from the file) - iriencode: 128 """ 129 Convert an Internationalized Resource Identifier (IRI) portion to a URI 130 portion that is suitable for inclusion in a URL. 131 132 This is the

Re: Spam filters for Django?

2010-09-04 Thread Anton Bessonov
the three most common ways are to only allow logged in users to post, captchas or akismet or a combination of the three. Sometimes Honey pot is very effective in combination with captcha. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Where and how should I write translations

2010-09-04 Thread Martin Tiršel
Never heard about CLDR before, so your answer doesn't give much sense to me :( Django doesn't have complete implementation of internationalization? makemessages is then useless if I can not add custom strings without overwriting them by Django. Or is there really something I don't know

Re: Urlencode vs. iriencode

2010-09-04 Thread Jordon Wii
Anyone? I haven't found anything that describes the difference (except that one is for URI's and the other for URLs). On Sep 4, 8:52 am, Jordon Wii wrote: > What's the difference between the template filters urlencode and > iriencode?  When should I use one over the other

Re: ANN: PyMySQL 0.3

2010-09-04 Thread Pete Hunt
Hi Andy - Below is a patch that will let Django use pymysql if MySQLdb is not available. Currently it is not in use in production anywhere but I am hoping to change that soon. Currently its primary use is prototyping applications that are being developed on Mac OSX but deployed on Linux. If you

Django Admin adds trailing 0's

2010-09-04 Thread tresero
I have some fields that represent recommendations (forex). I modeled them as numeric(8,4) (postgresql). The problem is that the django admin automatically adds trailing 0's. I don't want that because in order to calculate profit/loss, I need to subtract the numbers (as integers, I eliminate the

Re: Query Set Problem

2010-09-04 Thread tresero
In case anyone wants the solution, CSBuySell.objects.extra(select={'open_price':"open_price", 'close_price':"close_price",'low_price':"low_price",'high_price':"high_price", 'profit': "csbuysell_pl(open_price,close_price,low_price,high_price,buy_long,stop_sell,sell_short,stop_buy)"},

DjangoCon Jobs Board

2010-09-04 Thread Steve Holden
Looking to hire someone? Looking to get hired on? DjangoCon wants to help. If you are an employer looking for staff (and whether or not you will be at the conference), please sent a letter- or A4-sized original (PDFs preferred) document that we can print out and attach to the jobs board for

Re: Problem with ModelForm

2010-09-04 Thread Jagdeep Singh Malhi
> Fairly obviously, you've instantiated the model - Input() - rather > than the form - InputForm() - in both branches of the if statement of > your view. it works. Thanks Sir. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: LIMITATIONS of django

2010-09-04 Thread Steven Elliott Jr
This is not really an appropriate question. Django, like many frameworks is a collection of libraries written in some language. Django happens to be written in Python; as such, your proficiency with Python will have an effect on what you can and can't do with Django. Django provides a lot of

Re: LIMITATIONS of django

2010-09-04 Thread Tim Chase
On 09/04/10 11:45, samie wrote: sir what are the shortcomings and limitations of Django. i am newbie and got to develop my own cms using python. Some of the limitations I know of: - composite keys (long-range plans; alternatively, nothing prevents you from using SQLAlchemy or the like) -

LIMITATIONS of django

2010-09-04 Thread samie
sir what are the shortcomings and limitations of Django. i am newbie and got to develop my own cms using python. -- 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

Re: Spam filters for Django?

2010-09-04 Thread Federico Maggi
What about leveraging (google "askimet django") for all users and forcing non-logged in users (eg, anonymous, guests) to also solve a reCAPTCHA? -- Federico On 04/set/2010, at 08:31, Kenneth Gonsalves wrote: > On Fri, 2010-09-03 at 22:25 -0700, Andy wrote: >> Only logged

Re: Problem with ModelForm

2010-09-04 Thread Daniel Roseman
On Sep 4, 5:19 pm, Jagdeep Singh Malhi wrote: > I try to Create forms from models > I am facing error message with 'is_valid()' > > error is  : > { > AttributeError at /add_db/ > > 'Input' object has no attribute 'is_valid' > > Request Method:         POST > Request URL:  

Problem with ModelForm

2010-09-04 Thread Jagdeep Singh Malhi
I try to Create forms from models I am facing error message with 'is_valid()' error is : { AttributeError at /add_db/ 'Input' object has no attribute 'is_valid' Request Method: POST Request URL:http://localhost/django/add_db/ Django Version: 1.2.1 Exception Type:

Re: Chat application in Django

2010-09-04 Thread Preston Holmes
On Aug 31, 4:31 am, Shamail Tayyab wrote: > Hi, > >    I am working on a chat application in Django, how can I ensure that I > do not have to poll the server for any chat data. > > Possible approaches that I've been to: > > 1. BAD - use polling. > > 2. Use long polling -

Urlencode vs. iriencode

2010-09-04 Thread Jordon Wii
What's the difference between the template filters urlencode and iriencode? When should I use one over the other (or use both)? -- 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.

Re: Chat application in Django

2010-09-04 Thread Ivan Uemlianin
Dear Shamail It depends on your host. Serving real-time content over the web requires a web server that can do server push (e.g., Twisted, Tornado, ejabberd, etc.). If your host will let you install your own web server, you're fine. If your host insists on apache, ... I think server push is

Re: Regrouping forms in formsets

2010-09-04 Thread Felix H.
Hi! I just figured this one out and would like to share my solution for posterity: Since the formset in question is a ModelFormSet (which I forgot to mention in the above message, sorry!), the data for each form can be accessed using "form.instance". Thus, the regroup tag should read: {% regroup

Re: windows7, django-admin.py, system variables, no module named django.core

2010-09-04 Thread Sam Lai
On 3 September 2010 19:42, gintare wrote: > Hello, > > I mean the correct way of running django seems to be to add to windows > environmental variable PATH c:/first/Python26/Lib/site-packages/ > Django-1.2.1/django/bin > and when run > $ cmd > $ django-admin.py startproject

Re: Composite Primary Key Support

2010-09-04 Thread Russell Keith-Magee
On Sat, Sep 4, 2010 at 4:45 PM, Andy wrote: > What are the downsides of just importing & using SQLAlchemy (which > supports composite PK) in a Django program? Essentially you lose integration of models with the rest of Django. Most importantly, this means ModelForms and

Re: Composite Primary Key Support

2010-09-04 Thread Andy
What are the downsides of just importing & using SQLAlchemy (which supports composite PK) in a Django program? On Sep 3, 10:43 pm, Russell Keith-Magee wrote: > On Sat, Sep 4, 2010 at 7:17 AM, Brendon wrote: > > I have a project where we have