Re: unique=True and IntegrityError

2009-08-31 Thread aa56280
On Aug 31, 9:51 pm, Karen Tracey wrote: > However if you use a ModelForm to validate the data prior to attempting to > save the model you get these problems reported as validation errors: Karen, Thanks for the thorough explanation. I really appreciate it. What I took from

Re: subprocess.Popen in django production - are file descriptors closed?

2009-08-31 Thread aaron smith
it ended up being an incorrect working directory. I had to give the runfcgi parameter the "workdir" parameter so that it would run from the right place. arg!. By default if you don't specify workdir it puts the working dir as "/" On Mon, Aug 31, 2009 at 7:16 AM, Bill Freeman

Re: unique=True and IntegrityError

2009-08-31 Thread Karen Tracey
On Mon, Aug 31, 2009 at 6:27 PM, aa56280 wrote: > > I can't find an answer to this, so I'm hoping folks here can help: why > is it that Django catches IntegrityError for a field with unique=True > in the Admin tool but requires you to catch it yourself in your app? > That is,

Accessing Child Meta Attributes from Abstract Model Class

2009-08-31 Thread Brett Epps
Hi, I've got an abstract base class like this: class Base(models.Model): class Meta: abstract = True def save(self, *args, **kwargs): print dir(self.Meta) super(Base, self).save(*args, **kwargs) and a child model class inheriting from it like this: class

Renaming displayed django application name in admin

2009-08-31 Thread Joshua Partogi
Dear all, How do we change the displayed application name in django admin? Let's say I have an application called foo, I wanted it to be displayed as bar instead of foo in the admin system. I've searched the document but failed to get the answer for this. Thank you in advance for your help. --

Re: ImportError No module named myapp.views.hometest

2009-08-31 Thread weiwei
forgot to mention i am using django1.1 On Aug 31, 5:35 pm, weiwei wrote: > backgroud information: > server: fedora11 > web server : apache 2.2 + mod_wsgi2.5 > > my project location > '/usr/local/django/myproject' > '/usr/local/django/myproject/myapp' > > in the

ImportError No module named myapp.views.hometest

2009-08-31 Thread weiwei
backgroud information: server: fedora11 web server : apache 2.2 + mod_wsgi2.5 my project location '/usr/local/django/myproject' '/usr/local/django/myproject/myapp' in the django.wsgi i have --- sys.path.append('/usr/local/django') sys.path.append('/usr/local/django/myproject')

SQL query with complex WHERE clause

2009-08-31 Thread Gyanit
Hi All, I don't seem to find good source to help me write a complex where condition in the django. The where condition is generic boolean clause built on top of literals. The literal are just == or != check on a single field. for example ((field1 == 2 and field2 != 5) or field3 == 6). another

Re: Django and SSL Deployment using mod_wsgi

2009-08-31 Thread Graham Dumpleton
On Sep 1, 3:39 am, Francis wrote: > We setup a Nginx proxy in front of Apache/WSGI and got Nginx to handle > the SSL cert and simply pass on a flag to WSGI if the connection was > coming through http or https. > > Next you'll want a SSL middleware, we >

hacking django-comments timestamp input - 400 error

2009-08-31 Thread Joseph Brown
Hello, A user on my site recently complained to me about getting a 405 error after slavishly writing a 15 minute comment - losing all they had written! I looked into the server logs and saw a 400 followed by a 405 error, and I'm guessing it was the timestamp input: "The timestamp is used to

unique=True and IntegrityError

2009-08-31 Thread aa56280
I can't find an answer to this, so I'm hoping folks here can help: why is it that Django catches IntegrityError for a field with unique=True in the Admin tool but requires you to catch it yourself in your app? That is, why isn't it handled like all other built-in validation checks that come

Re: ImportError: No module named transmeta in Django 1.0.3 under Fedora 11

2009-08-31 Thread Zico
On Tue, Sep 1, 2009 at 3:14 AM, Karen Tracey wrote: > > Yes, I see that now right in the subject. You'll need to upgrade to 1.1 if > you want to use this fixmystreet package, since it is using support added > between 1.0 and 1.1. > > Thanks Karen! Thanks a lot! Now it`s

Re: Install going well but problem with syncdb

2009-08-31 Thread eka
Check that you have python-sqlite2 installed http://oss.itsystementwicklung.de/trac/pysqlite/ On Aug 31, 6:14 pm, Franck Y wrote: > Hello > I had the install going pretty well but when i do > python manage.py syncdb > > i got this error message > > python manage.py

Re: django & flex

2009-08-31 Thread Thomas Hill
Yup, I was going to reply with this as well. One draw back to this, however, is that it makes the app a little bit more complicated to test and debug, I've found, unless you concoct your own other test cases that import the pyAmf libs and test separately. Another thing you might want to think

Re: Install going well but problem with syncdb

2009-08-31 Thread Daniel Roseman
On Aug 31, 10:14 pm, Franck Y wrote: > Hello > I had the install going pretty well but when i do > python manage.py syncdb > > i got this error message > > python manage.py syncdb > Traceback (most recent call last): >   File "manage.py", line 11, in ? >    

Install going well but problem with syncdb

2009-08-31 Thread Franck Y
Hello I had the install going pretty well but when i do python manage.py syncdb i got this error message python manage.py syncdb Traceback (most recent call last): File "manage.py", line 11, in ? execute_manager(settings) File "/usr/lib/python2.4/site-packages/django/core/management/

Re: ImportError: No module named transmeta in Django 1.0.3 under Fedora 11

2009-08-31 Thread Karen Tracey
On Mon, Aug 31, 2009 at 4:55 PM, Zico wrote: > > > On Tue, Sep 1, 2009 at 2:48 AM, Karen Tracey wrote: > >> >> What version of Django are you using? >> > > 1.0.3 > Yes, I see that now right in the subject. You'll need to upgrade to 1.1 if you want to

Re: signals (post_save, pre_save) vs save()

2009-08-31 Thread Maksymus007
On Mon, Aug 31, 2009 at 10:49 PM, eka wrote: > > Hi all. > > I have this question on when one is preffered over another. I mean > overriding save or using signals like post_save or pre_save. > > cheers. > The scale. signals are used for every model, save() per one

Re: Problems trying to use jinja2

2009-08-31 Thread Jeff
Alright, I found this: http://code.djangoproject.com/ticket/10216 which explains the cryptic error message. The fix is to disable TEMPLATE_DEBUG. On Aug 31, 2:44 pm, Jeff wrote: > Hi, > > I seem to have run into a problem trying to use the jinja2 template > language.

Re: Custom form validation request or user-based

2009-08-31 Thread Matthias Kestenholz
On Fri, Aug 28, 2009 at 10:34 AM, Enrico Sartorello wrote: > Hi, > i'm developing a Django application where i need to differentiate the > validation of an admin-site model form between different users: some user > must respect some particular restrictions (imposed

Re: ImportError: No module named transmeta in Django 1.0.3 under Fedora 11

2009-08-31 Thread Zico
On Tue, Sep 1, 2009 at 2:48 AM, Karen Tracey wrote: > > What version of Django are you using? > 1.0.3 -- Best, Zico --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

signals (post_save, pre_save) vs save()

2009-08-31 Thread eka
Hi all. I have this question on when one is preffered over another. I mean overriding save or using signals like post_save or pre_save. cheers. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: ImportError: No module named transmeta in Django 1.0.3 under Fedora 11

2009-08-31 Thread Karen Tracey
On Mon, Aug 31, 2009 at 4:29 PM, Zico wrote: > Now, the transmeta is gone!! and... new one just appeared!! > > ImportError at / > > cannot import name GIcon > > Request Method: GET Request URL: http://localhost:8000/ Exception Type: > ImportError Exception Value: > >

Re: Custom form validation request or user-based

2009-08-31 Thread Enrico Sartorello
Up. On Fri, Aug 28, 2009 at 10:34 AM, Enrico Sartorello < enrico.sartore...@gmail.com> wrote: > Hi, > i'm developing a Django application where i need to differentiate the > validation of an admin-site model form between different users: some user > must respect some particular restrictions

Re: __getitem__ and lookups in templates

2009-08-31 Thread Fernando Gómez
On Aug 31, 5:16 pm, Karen Tracey wrote: > Based on that code, a dictionary lookup that raises TypeError, > AttributeError, or KeyError will cause the template code to continue with > trying an attribute lookup, so it is one of those three specifically that > you will need to

Re: ImportError: No module named transmeta in Django 1.0.3 under Fedora 11

2009-08-31 Thread Zico
On Tue, Sep 1, 2009 at 2:03 AM, Karen Tracey wrote: > The traceback might help since it would show the import that is triggering > this. If it is "from contrib.transmeta import something" then I don't > understand why you'd still be having problems with the setup you

Re: Django and ZSI

2009-08-31 Thread Antoni Aloy
2009/8/31 Julián C. Pérez : > > Anyone has experience with using web services in Django?? > I mean, not necessarily with ZSI but others methods... > Yes, we have many of the working. But this is no a Django issue is more a Python programming one. You can access to Soap web

Re: __getitem__ and lookups in templates

2009-08-31 Thread Karen Tracey
On Mon, Aug 31, 2009 at 3:48 PM, efege wrote: > > Hi, > > According to the docs, > > "... when the template system encounters a dot in a variable name, it > tries the following lookups, in this order: > >* Dictionary lookup. Example: foo["bar"] >* Attribute lookup.

Re: ImportError: No module named transmeta in Django 1.0.3 under Fedora 11

2009-08-31 Thread Karen Tracey
On Mon, Aug 31, 2009 at 2:40 PM, Zico wrote: > > Yes, I did it. Now my transmeta is in: > > /opt/fixmystreet/contrib/transmeta/__init__.py > > And, my stdimage is in: > > /opt/fixmystreet/contrib/stdimage/__init__.py > > But, nothing changed yet!!! Same error is coming: > >

__getitem__ and lookups in templates

2009-08-31 Thread efege
Hi, According to the docs, "... when the template system encounters a dot in a variable name, it tries the following lookups, in this order: * Dictionary lookup. Example: foo["bar"] * Attribute lookup. Example: foo.bar * Method call. Example: foo.bar() * List-index lookup.

Re: Getting all unique values of a field with Django ORM

2009-08-31 Thread stevedegrace
Thanks guys! On Aug 30, 10:56 pm, Alex Gaynor wrote: > On Sun, Aug 30, 2009 at 9:37 PM, stevedegrace wrote: > > > Hi guys, > > > I'm making a refback type linkback app for my hobby CMS. I want to > > find all the unique page targets. I am thinking

Extending the add/change form at the admin

2009-08-31 Thread Hellnar
Hello, I want to extend the admin panel of Django where adding/ changing happens for a specific object, say Foo. I have already done alot of research and found a part discussing this at the old version djangobook. I have made an admin/myapp/foo/change_list.html at my template directory and did

Problems trying to use jinja2

2009-08-31 Thread Jeff
Hi, I seem to have run into a problem trying to use the jinja2 template language. I've tried using Mitsuhiko's snippet (http://bitbucket.org/ mitsuhiko/jinja2-main/src/c07588cf115f/ext/djangojinja2.py) and this other one by Joe Vasquez (http://jobscry.net/downloads/jinja_r2r.txt) where I had to

Re: Django and ZSI

2009-08-31 Thread Julián C . Pérez
Anyone has experience with using web services in Django?? I mean, not necessarily with ZSI but others methods... On Aug 31, 11:56 am, Julián C. Pérez wrote: > Hi you all > I'm trying to serve a simple web service using ZSI > Anyone how can I configure an app's urls and views

Re: ImportError: No module named transmeta in Django 1.0.3 under Fedora 11

2009-08-31 Thread Zico
On Tue, Sep 1, 2009 at 12:15 AM, Karen Tracey wrote: > On Mon, Aug 31, 2009 at 1:49 PM, Zico wrote: > >> Hi, may be you have seen my previous email regarding stdimage. The >> previous error was: >> *"ImportError: No module named stdimage" >> * >> I have

Re: django & flex

2009-08-31 Thread Randy Barlow
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 solar declared: > Is there a 'common' way to build apps with django and a Adobe Flex > frontend? > I'm about to do just that, and I'm a bit overwhelmed by the number of > choices that you get by multiplying > communication layers (REST, XML-RPC,

Re: ImportError: No module named transmeta in Django 1.0.3 under Fedora 11

2009-08-31 Thread Karen Tracey
On Mon, Aug 31, 2009 at 1:49 PM, Zico wrote: > Hi, may be you have seen my previous email regarding stdimage. The previous > error was: > *"ImportError: No module named stdimage" > * > I have solve this problem by this way: > > 1. I have created a "contrib" directory in my

Re: Table with search results and returning to previous page.

2009-08-31 Thread Viacheslav Chumushuk
But in this case we lose pretty URLs, and keep your mind that form can be very large. On Sun, Aug 30, 2009 at 11:08:34AM -0500, Frank Wiles wrote: > Hi Viacheslav, > > All you need to do is on your edit/view links include the necessary > extra args to recreate the search they

django & flex

2009-08-31 Thread solar
Is there a 'common' way to build apps with django and a Adobe Flex frontend? I'm about to do just that, and I'm a bit overwhelmed by the number of choices that you get by multiplying communication layers (REST, XML-RPC, SOAP) times data formats (XML, JSON, etc.) times Flex

Job - freelance Django developer needed

2009-08-31 Thread replyforall
I'm looking for a Django developer to join us at replyforall.com on a full-time, or near full-time, contractor basis. Our current need is more slanted towards a backend web developer/ engineer who ideally is familiar with HTML/CSS and capable of front- end implementation. Our site was built on

Re: ImportError: No module named stdimage in Django 1.0.3 under Fedora 11

2009-08-31 Thread Karen Tracey
On Mon, Aug 31, 2009 at 1:15 PM, Zico wrote: > > > On Mon, Aug 31, 2009 at 7:43 PM, Karen Tracey wrote: > >> You seem to have been following the doc for downloading/installing >> stdimage, which says to put it somewhere in a directory included in your >>

Re: Django and SSL Deployment using mod_wsgi

2009-08-31 Thread Francis
We setup a Nginx proxy in front of Apache/WSGI and got Nginx to handle the SSL cert and simply pass on a flag to WSGI if the connection was coming through http or https. Next you'll want a SSL middleware, we use: http://www.djangosnippets.org/snippets/240/ Now its a matter of configuring which

ImportError: No module named transmeta in Django 1.0.3 under Fedora 11

2009-08-31 Thread Zico
Hi, may be you have seen my previous email regarding stdimage. The previous error was: *"ImportError: No module named stdimage" * I have solve this problem by this way: 1. I have created a "contrib" directory in my /opt/fixmystreet/ 2. Then, i have downloaded the stdimage with * * *svn checkout

Re: template tag question

2009-08-31 Thread Bobby Roberts
On Aug 31, 1:38 pm, Julián C. Pérez wrote: > Hi > I use Django 1.0 and I define a template function like... > --- > from django import template > register = template.Library() > def doSomething(param1, param2): >    # Do something like... >    return str(param1)+''+str(param2)

Re: template tag question

2009-08-31 Thread Julián C . Pérez
Hi I use Django 1.0 and I define a template function like... --- from django import template register = template.Library() def doSomething(param1, param2): # Do something like... return str(param1)+''+str(param2) register.simple_tag(doSomething) --- to use that in template system, assuming

template tag question

2009-08-31 Thread Bobby Roberts
hi group. I"ve got an issue i'm needing help with. I have two variables, a and b in my template and I need to pass those to a single template tag so I can process them and return a result to the template. Is there a way to pass more than one variable to a template tag... if so, how? thanks

Re: ImportError: No module named stdimage in Django 1.0.3 under Fedora 11

2009-08-31 Thread Zico
On Mon, Aug 31, 2009 at 7:43 PM, Karen Tracey wrote: > You seem to have been following the doc for downloading/installing > stdimage, which says to put it somewhere in a directory included in your > PYTHONPATH. By putting it directly in site-packages you can do imports of >

Django and ZSI

2009-08-31 Thread Julián C . Pérez
Hi you all I'm trying to serve a simple web service using ZSI Anyone how can I configure an app's urls and views files to do this?? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Django lucene

2009-08-31 Thread Puneet
Hi, Can anyone help with this in django with lucene? Is there anyone able to use this module sucessfully. I am getting this error when I am trying to search : Error : 'Manager' object has no attribute 'objects_search' Thanks, Puneet On Aug 25, 7:55 pm, Puneet wrote: > Hi,

Re: create a link from an object - template tag or?

2009-08-31 Thread MIL
Hi Bill Cool I understand that :D And youre right, I will need template.Variable() someday soon Thank you Michael On 31 Aug., 16:29, Bill Freeman wrote: > WIth your original version here, I'm going to guess that you need to use > template.Variable()  (or learn a lot about

Re: Problem subclassing Widget with value_from_datadict

2009-08-31 Thread Mike Ramirez
On Monday 31 August 2009 08:08:50 am you wrote: > On Monday 31 August 2009 07:51:52 am you wrote: > > > Either make sure you always pass in userip when you instantiate the > > > form, or (preferably) change the __init__ so that userip is in the > > > kwargs dictionary, and use kwargs.pop('userip')

model validation errors

2009-08-31 Thread alain31
Hello, I wrote a model to manage small TeX fragments: class LaTeX(models.Model): latex = models.TextField(help_text="Un extrait de source LaTeX") macros = models.ForeignKey(Macros) For now, I override save() to compile the latex string using macros strings with LaTeX compilator, and

Re: Why is a LEFT OUTER JOIN used to select records with a NULL foreign key?

2009-08-31 Thread Karen Tracey
On Mon, Aug 31, 2009 at 10:30 AM, wallenfe wrote: > > I'm trying to understand why a LEFT OUTER JOIN is being used in > queries that filter on a NULL foreign key. It seems that the same > result can be achieved without the LEFT OUTER JOIN. > > Here is an example: > [snip]

Re: Problem subclassing Widget with value_from_datadict

2009-08-31 Thread Mike Ramirez
On Monday 31 August 2009 05:48:18 am Daniel Roseman wrote: > On Aug 31, 11:58 am, Mike Ramirez wrote: > > On Monday 31 August 2009 02:46:27 am Daniel Roseman wrote: > > > I think you're going to need to post your view code as well. It seems > > > that the form is passing

ImportError: No module named stdimage in Django 1.0.3 under Fedora 11

2009-08-31 Thread Karen Tracey
On Mon, Aug 31, 2009 at 2:13 AM, Zico wrote: > > > On Mon, Aug 31, 2009 at 7:04 AM, Karen Tracey wrote: > >> File "/usr/lib/python2.6/site-packages/django/core/urlresolvers.py", line >> 214, in _resolve_special >>> >>> >>> >>> >>> >>> >>> callback =

Re: template recursion

2009-08-31 Thread gentlestone
I have solve it! The point is to use a variable not a constant for recursion's file name. Why recursion? I've translated my model into rendering context. And if a field is a relationship with fields, the rendering is the same. Here is the template: {{contextElement.label}}:

Re: Changing the Date Format

2009-08-31 Thread vishak
I'm using it in model.model,DateField() date that forms from this i need to change. On Aug 31, 6:56 pm, PANCHICORE wrote: > Hi v. I guess you want to give a format in the template, date tag, > formats a date according to the given format as you can see here >

Re: DjangoCon '09 Schedule

2009-08-31 Thread adrian
Tickets are now sold out. I need a ticket. If anyone would like to sell their ticket please contact me at adrian_nye at yahoo. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Why is a LEFT OUTER JOIN used to select records with a NULL foreign key?

2009-08-31 Thread wallenfe
I'm trying to understand why a LEFT OUTER JOIN is being used in queries that filter on a NULL foreign key. It seems that the same result can be achieved without the LEFT OUTER JOIN. Here is an example: > cat models.py from django.db import models from django.contrib.auth.models import User #

Re: create a link from an object - template tag or?

2009-08-31 Thread Bill Freeman
WIth your original version here, I'm going to guess that you need to use template.Variable() (or learn a lot about doing what it does). It is mentioned on the how to page for template tags. IIRC, all arguments to a tag are strings (after all, you get them with a split operation), so they must

Re: subprocess.Popen in django production - are file descriptors closed?

2009-08-31 Thread Bill Freeman
Are you saying that it works in the development server environment? If so, it could be permission issues. Have the ruby script append a time stamp to a world writable log file to confirm that it gets run. Bill On Fri, Aug 28, 2009 at 9:07 PM, aaron smith < beingthexemplaryli...@gmail.com>

Re: Is ‘if element in a List’ possible with in Django templates?

2009-08-31 Thread Karen Tracey
On Mon, Aug 31, 2009 at 9:26 AM, Lokesh wrote: > > Hi, > > I am trying to check the check boxes while serve of a page. > > I will be passing the elements/indexes of an element(checkbox) as a > list from FORM. > > Here is the sample code that I am trying to implement >

Re: template recursion

2009-08-31 Thread Karen Tracey
On Mon, Aug 31, 2009 at 9:03 AM, gentlestone wrote: > > is recursion allowed in templates? > > for example can the "xy_template.html" file contain {% include > "xy_template.html" %}? > It's "allowed" in the sense that it's not caught as an error. But it will lead to

Re: Changing the Date Format

2009-08-31 Thread PANCHICORE
Hi v. I guess you want to give a format in the template, date tag, formats a date according to the given format as you can see here (http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date). ex: {{ date_value|date:"d-M-Y" }} return: '31-Aug-2009'. On Aug 31, 3:45 pm, vishak

Changing the Date Format

2009-08-31 Thread vishak
Hi All I'm trying to change the default date format of django. The present format is '2009-08-31'. I want to display this format as '31- Aug-2009'. I tried putting date_time format in settings.py but no result. Even tried to do with java script but all went in vain. Can the group give me an

Re: '%d-%m-%Y' format for DateTimefield in django

2009-08-31 Thread zayatzz
Check out this thread, where Karen Throughly explained date formats and widgets to me: http://groups.google.com/group/django-users/browse_thread/thread/7488aa81bfa94cac/ Alan. On Aug 28, 4:10 pm, Karen Tracey wrote: > On Aug 28, 3:19 am, Jigar

Is ‘if element in a List’ possible with in Django templates?

2009-08-31 Thread Lokesh
Hi, I am trying to check the check boxes while serve of a page. I will be passing the elements/indexes of an element(checkbox) as a list from FORM. Here is the sample code that I am trying to implement sampleForm(): check = [1,3,5] hobbies_list = {'1':'Chess', '2':'Cricket', '3':'Tennis',

Re: Defining subsets of "list" variable at template level

2009-08-31 Thread Alex Robbins
First, if you aren't running into db performance problems, I wouldn't optimize. Keep everything as simple as possible, then optimize the parts that actually demonstrate themselves to be a performance issue. If this really is a performance issue, you could solve it like this: If you know that

template recursion

2009-08-31 Thread gentlestone
is recursion allowed in templates? for example can the "xy_template.html" file contain {% include "xy_template.html" %}? because I tried but the system crushed: Process: Python [97385] Path:/System/Library/Frameworks/Python.framework/Versions/

Re: Problem subclassing Widget with value_from_datadict

2009-08-31 Thread Daniel Roseman
On Aug 31, 11:58 am, Mike Ramirez wrote: > On Monday 31 August 2009 02:46:27 am Daniel Roseman wrote: > > > I think you're going to need to post your view code as well. It seems > > that the form is passing itself, rather than its data, to the widget, > > so I'd guess there's

Re: How do you remove fields from a subclassed form?

2009-08-31 Thread Alex Gaynor
On Mon, Aug 31, 2009 at 12:13 AM, buttman wrote: > > class MyForm(ModelForm): >    field1 = CustomField(custom_option="sdsdsd") >    field2 = CustomField(custom_option="sdsdsd") >    field3 = CustomField(custom_option="sdsdsd") >    # > >    class Meta: >        model =

Re: Database connection closed after each request?

2009-08-31 Thread Graham Dumpleton
On Aug 31, 8:47 pm, Mike wrote: > Hi, > > I also would like to note that this code is not threadsafe - you can't > use it with python threads because of unexpectable results, in case of > mod_wsgi please use prefork daemon mode with threads=1 Provided you set

Localized timesince template tag?

2009-08-31 Thread LaundroMat
I seem to remember being able to have template tags and filters localized in Django, but I can't find any information on this back. Did I misremember, or have my search skill deteriorated? I'm particularly looking for a Dutch localization of the timesince template tag.. Many thanks in advance,

Re: Problem subclassing Widget with value_from_datadict

2009-08-31 Thread Mike Ramirez
On Monday 31 August 2009 02:46:27 am Daniel Roseman wrote: > I think you're going to need to post your view code as well. It seems > that the form is passing itself, rather than its data, to the widget, > so I'd guess there's something weird about the way it's being > instantiated. > -- > DR.

Re: Database connection closed after each request?

2009-08-31 Thread Mike
Hi, I also would like to note that this code is not threadsafe - you can't use it with python threads because of unexpectable results, in case of mod_wsgi please use prefork daemon mode with threads=1 --~--~-~--~~~---~--~~ You received this message because you

Re: Blocks tags inside inclusion template tags are ignored

2009-08-31 Thread Daniel Roseman
On Aug 31, 4:56 am, ips006 wrote: > Is it possible to have block tags inside inclusion template tags > overwrite the block tags in parent templates? > > I have a chunk of html generated by an inclusion tag, and I would like > to assign a CSS file with it. I would like to be

Re: Problem subclassing Widget with value_from_datadict

2009-08-31 Thread Daniel Roseman
On Aug 30, 8:59 pm, Mike Ramirez wrote: > hey, >   I'm trying to write a recaptcha widget using the recaptcha client, the > problem I'm having is that redefining value_from_datadict I get this > error: 'ContactForm' object has no attribute named 'get'.  This happens on > the

FormWizard: how to pass in extra keyword arguments into a form's __init__?

2009-08-31 Thread Berco Beute
One of the forms I'm using in a FormWizard takes an aditional keyword argument in its __init__, e.g.: = def __init__(self, arg1=None, *args, **kwargs): pass = I'm at a loss how to make FormWizard construct my form while passing in the extra keyword argument (arg1).

Re: Django POST data errors

2009-08-31 Thread Matthias Kestenholz
On Mon, Aug 31, 2009 at 3:12 AM, Greg wrote: > > Hi all, > > I have a large-ish form (40-odd fields) on a pretty busy site, and I'm > constantly getting "ManagementForm data is missing or has been > tampered with" or "IOError: request data read error" errors. I can't >

Re: Many-to-many column admin interface

2009-08-31 Thread Thomas Guettler
Thank you for this link. Looks good Sven Richter schrieb: > Ah, and google does help or at least django_snippets. > I found the solution here: > http://www.djangosnippets.org/snippets/1295 > > The trick is to create a column in both models and in one with the option to > not syncdb. > Its

Re: need help: unique_together in both directions

2009-08-31 Thread ckar...@googlemail.com
Thank you, I have "solved" this with a custom Form method, that's not very clean, but I works so far. Chris On 29 Aug., 20:23, Matthias Kestenholz wrote: > On Sat, Aug 29, 2009 at 7:51 PM, > > ckar...@googlemail.com wrote: > > > Really no

Re: ImportError: No module named stdimage in Django 1.0.3 under Fedora 11

2009-08-31 Thread Zico
On Mon, Aug 31, 2009 at 7:04 AM, Karen Tracey wrote: > File "/usr/lib/python2.6/site-packages/django/core/urlresolvers.py", line > 214, in _resolve_special >> >> >> >> >> callback = getattr(self.urlconf_module, 'handler%s' % view_type) >> >> File