Antonio Cangiano asks for input to develop a DB2 backend for Django (and Python)

2007-03-16 Thread Lawrence Oluyede
Antonio Cangiano is the author of the IBM DB2 tools for Rails and his team and him are going to do the same for Django and Python. Right now he's asking for help to collect ideas to do a proper job. I think it's great having this kind of support for Python and Django. Here's the blog post:

Re: Testing and error handling

2007-03-08 Thread Lawrence Oluyede
> Can you provide a few more clues, please? In particular, what exception > is being raised. If we know what part of the code is involved, it will > be easier to try and work out the differences. > If you can reduce the behaviour to a simple (only a few lines) example, > that would be great, too.

Testing and error handling

2007-03-07 Thread Lawrence Oluyede
I'm having some problems with the same codebase tested with Python 2.5 and previous versions. With Python 2.5 the tests pass smoothly but with 2.4 and 2.3 they "explode". The problem seems to arise when the application raises an exception due to bad behavior. Python 2.5 gets back a HTTP 500 (that

Re: user.get_profile()

2007-02-28 Thread Lawrence Oluyede
On 2/28/07, MattW <[EMAIL PROTECTED]> wrote: > > Dear All, > > I have a view method that looks like this: I think you need the SVN version of Django, as they suggested to you in the other thread about user authentication -- Lawrence, oluyede.org - neropercaso.it "It is difficult to get a man

Re: how can i find a full source code for complete django

2007-02-28 Thread Lawrence Oluyede
On 2/28/07, Mary <[EMAIL PROTECTED]> wrote: > > I want to look at a full source code of certain website that was built > with django so that i can learn more > cause i need to learn more about django Read this Mary:

Re: permalink decorator is not working (at least for me)

2007-02-26 Thread Lawrence Oluyede
> I have a feeling somebody pointed this out in a ticket just recently, > too. We're treating something as a sequence when we shouldn't > necessarily be. I'll track it down this evening and either fix the docs > or the code. > > As an intermediate fix, pass in [str(self.id)] or (str(self.id),)

permalink decorator is not working (at least for me)

2007-02-25 Thread Lawrence Oluyede
I tried to use the new permalink decorator to decouple the model from the urlconf structure but it doesn't work correctly. Here's an example: def get_absolute_url(self): return "/foo/%d" % self.id changed to: def get_absolute_url(self): return

Re: Database changes

2007-02-19 Thread Lawrence Oluyede
> All I can think of is to create a new model, say Poll1, with the > correct fields, do a syncdb, write and execute a python function to > transfer the data from Poll to Poll1, do a DROP TABLE on Poll, create > a new table named Poll, do a syncdb transfer the data from Poll1 to > Poll with a

Re: login_required decorator

2007-02-19 Thread Lawrence Oluyede
> is there any reason that the login_required decorator doesn't have the > login_url parameter? I think it's a known issue > The other decorators have it. Besides me there seem to be also other > people who need this parameter (see the comments to the auth docs > page). In the meantime you can

Re: new forms - problem populating with data from a table

2007-02-11 Thread Lawrence Oluyede
> is there any reason why you copy the data? the form doesn't need the > data to be mutable, so there is no need for this. None special reasons to be honest. > I prefer constructing a dict manually than to mess around with python > internals, but that is really just a matter of personal

Re: new forms - problem populating with data from a table

2007-02-10 Thread Lawrence Oluyede
> I now want to take an existing user record and create an edit account > form, where the data entered by the user in the registration form is > represented and available to edit. Seemed simple when I set out to do > it, but I can't seem to populate the form. It's pretty easy. You provide a page

Re: Problems with low level caching and locmem backend

2007-02-09 Thread Lawrence Oluyede
> In the future, please don't cross post. If you're unsure, ask on the > users list first. The developers all read the users list too, so they > will see your question. The discussion will get moved to the > developers list if and when your problem raises an internal design Ok thanks for the

Problems with low level caching and locmem backend

2007-02-09 Thread Lawrence Oluyede
I'm trying to put in the cache a simple Python list made of unicode strings. The strange thing is locmem crashes badly during the first retrieval of a cache hit. The same code with the simple backend is like a breeze. I looked into locmem.py and simple.py backends and as the traceback states the

Re: passing arguments to the login_required decorator

2007-02-07 Thread Lawrence Oluyede
> How can I pass in the user to authenitcate and the login url arguments to > the decorator directly? You can simply use your own decorator and not the Django's. Take the django login_required decorator and modify it accordingly to your needs. You need to change the LOGIN_URL constant. What's

Debugging test client

2007-02-05 Thread Lawrence Oluyede
I'm having some problems with the django.test.client infastructure. To fix them I tried to print the response of a Client().get() call but I noticed that in presence of the status code 500 the response.content is filled with the production page, not the one Django generates during the development

Re: Error Template

2007-01-05 Thread Lawrence Oluyede
Sorry I forgot to specify a thing. The thing is to play with django on the console you need an actual application to poke with. In order to Django to know how to deal with that you have to tell it where resides the settings.py of your app so you can play with its model and so on. "python

Re: Error Template

2007-01-05 Thread Lawrence Oluyede
raise EnvironmentError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e) EnvironmentError: Could not import settings 'iti.settings' (Is it on sys.path? Does it have syntax errors?): No module named iti.settings AFAIK that's