django-authopenid user timeout

2010-01-21 Thread Rachel Willmer
I've just installed django-authopenid in a project, and it seems to be working just fine, apart from one minor issue. (The creator of django-authopenid isn't maintaining the project any more, and there isn't a mailing list, hence why I'm asking this question here rather than elsewhere.) So, as I

Re: Django / memcached / pickle / Unicode = confusion + UnicodeDecodeError

2009-01-16 Thread Rachel Willmer
I'm using memcached, the latest version from Ubuntu 8.10. The cache is initially empty for that key (I was changing the key when testing to force this) and the contents of cached were originally coming from a call to Bank.objects.all(). Thanks for the explanation about what the iso-8859-1 is doi

Re: Django Continuous Integration

2009-01-13 Thread Rachel Willmer
An interesting set of questions, and one I've been thinking about myself. So here's my tuppence-worth. Background: I've written a set of 3 websites, which I've developed incrementally, some shared code, some separate - done for my own benefit, no external customer, so I can change things as I se

Django / memcached / pickle / Unicode = confusion + UnicodeDecodeError

2009-01-13 Thread Rachel Willmer
I've just upgraded some code to Django 1.0 and the caching stopped working. I have found a fix but I don't understand what's happening so if anyone can explain, I'd be grateful. My code used to look somthing like this (simplified for clearer reading) cached=cache.get(key) if cached: list=pi

Re: template tag not rendered - why not?

2009-01-12 Thread Rachel Willmer
e the line with get_mytag was outside the block. Rachel 2009/1/12 Rachel Willmer : > I'm debugging a template tag which used to work under V0.96 and now > doesn't under V1. > > Using logging, I can see that its __init__ function is called, but render > isn't. > &

template tag not rendered - why not?

2009-01-12 Thread Rachel Willmer
I'm debugging a template tag which used to work under V0.96 and now doesn't under V1. Using logging, I can see that its __init__ function is called, but render isn't. Any pointers as to why or how I debug this would be very gratefully received Rachel --~--~-~--~~~--

Re: RHEL 5.2 + mysql + Django 1.0 => Django 0.95.4

2008-12-17 Thread Rachel Willmer
Thanks to Malcolm and Srdjan for your replies. Don't get me wrong, Malcolm, I'm not knocking Django! far from it, I think it's the bees knees. It looks like what I've actually got here is a problem caused by a mixture of i386 and x86_64 libraries. if I try to build mysql-devel, the build appear

Re: RHEL 5.2 + mysql + Django 1.0 => Django 0.95.4

2008-12-15 Thread Rachel Willmer
Thanks for the reply. Unfortunately the egg gives me the same problems as when I attempt an install from the tarball. Any RHEL users out there encountered this problem and fixed it? Rachel --~--~-~--~~~---~--~~ You received this message because you are subscribe

RHEL 5.2 + mysql + Django 1.0 => Django 0.95.4

2008-12-12 Thread Rachel Willmer
I'm installing Django on a customer's machine which is running Red Hat Enterprise Linux Server release 5.2. Django 1.0 complains about the version of mysql-python available, which is 1.2.1-1, where it needs 1.2.1p2. Trying to install the latest tarball from sourceforge gives me lots of other fil

Re: is it possible to run 0.96 and 1.0 in parallel?

2008-10-21 Thread Rachel Willmer
Virtualenv - great, just what I've been looking for :-) Thanks Rachel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubs

is it possible to run 0.96 and 1.0 in parallel?

2008-10-19 Thread Rachel Willmer
This might be a FAQ but I've googled and can't find the answer... I'm considering upgrading some websites from 0.96 to 1.0 but I need to be able to upgrade the current site while I work through the migration process. It doesn't seem possible to run Django 1.0 and 0.96 concurrently on the same mac

How to force BINARY flag at table creation?

2008-06-01 Thread Rachel Willmer
I've just come across an interesting problem... I've got a text string as primary key in a Django model. Turns out that Mysql is treating this as case-insensitive, that is, I have an initial_data.json fixture with 2 records, "abc" and "ABC" in the primary key field, and only one of them is install

FAQ application available in Django?

2006-12-30 Thread Rachel Willmer
Has anyone written a FAQ application in Django that's publically available? I need one but don't want to re-invent the wheel... Rachel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: sqlite3 "database locked"

2006-11-10 Thread Rachel Willmer
Following up on my own question, it looks to me like implementing a new default Manager class is the way to go. Anyone got a better solution? Rachel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gr

sqlite3 "database locked"

2006-11-10 Thread Rachel Willmer
I'm using a sqlite3 database as the backend for a Django app and frequently get "OperationalError: database locked". Is there a way of specifying a timeout handler within Django in the same way that you can using the C library version of sqlite3? Rachel --~--~-~--~~~

Re: Trac/Django on the same Apache instance

2006-11-10 Thread Rachel Willmer
I have trac/django co-existing happily with the following config: They both run on separate virtual hosts under Apache2. The trac config looks like this: SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnv

how to do complex query which filters on method not database field

2006-11-06 Thread Rachel Willmer
I have a complicated query which should return the subset of a table whose objects match one of several conditions. What's the easiest way of doing this, given that I can't just do a SQL statement, because some of the conditions require me to feed the object's values into a function to evaluate i

Re: is not JSON serializable - again

2006-11-06 Thread Rachel Willmer
What specifically does the error message say is not JSON serializable? Try setting it to be a string in the response dict... For example: if errors or request.POST.has_key('preview'): response_dict = {} # datetime_now = datetime.datetime.now()

Re: OT: MySQL to SQLite?

2006-11-03 Thread Rachel Willmer
How about using SQL? On a *nix machine, you'd use mysqldump to output the db in sql format, then use the ".read" command in sqlite to read it in. For the reverse journey from sqlite to mysql, it would be the ".output"/".dump" commands to create the sql file, and the "source" command in mysql to

Re: Can I set a local variable in a template?

2006-11-02 Thread Rachel Willmer
Perfect! thanks Rachel On 02/11/06, Jay Parlar <[EMAIL PROTECTED]> wrote: > Will the 'ifchanged' tag do it for you? > http://www.djangoproject.com/documentation/templates/#ifchanged --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Can I set a local variable in a template?

2006-11-02 Thread Rachel Willmer
I'm sure this must be a FAQ but I can't see the answer anywhere... I'd like to buld a table from a for loop. One field in each line will depend on the previous line, so I'd like to do something like this: {% for line in lines %} {% if notequal line.name prevname %} {{ line.name }} {% endif %} se

TimeField woes with existing database

2006-11-02 Thread Rachel Willmer
(This is a duplicate of a message I sent yesterday via Google Groups which doesn't seem to have showed up yet) I'm trying to use an existing sqlite3 database with a new Django application. All going swimmingly apart from a problem with one db column. The db column is of type TIME, the Django mod

GeoIP template tag

2006-11-02 Thread Rachel Willmer
(This is a duplicate of a message I sent yesterday via Google Groups which doesn't seem to have showed up yet) I've posted a template tag for using GeoIP at Rachel --~--~-~--~~~---~--~~ You received th

Re: Can I embed php code in my Django templates?

2006-10-18 Thread Rachel Willmer
Excellent, I'll give it a go Thanks Rachel On 18/10/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > This external template loader example might be useful for you: > http://code.djangoproject.com/ticket/2440 (it's also linked off the > front page of the Wiki if you lose it later). > > Regards

Re: Can I catch missing file when using include built-in template tag?

2006-10-18 Thread Rachel Willmer
Yes, good idea. I'll do that. Thanks Rachel On 17/10/06, RajeshD <[EMAIL PROTECTED]> wrote: > > > > > > My default action if I can't find a better way, is to write a view > > just so I can do this check, but I'd rather not if there's an > > alternative I can use within the generic view. > > Anoth

Re: Can I catch missing file when using include built-in template tag?

2006-10-17 Thread Rachel Willmer
Thanks for your suggestion. I do use that in other parts of the website, but in this one, I'm using a generic view - so what I need (I think) is a mechanism to check the existence of the included page within the template. My default action if I can't find a better way, is to write a view just so

Can I embed php code in my Django templates?

2006-10-17 Thread Rachel Willmer
I've got a website which is written in Django (love it!) but I'd like to be able to use that look-and-feel to cover the blog part of the website which is hosted in WordPress. Is it possible to include PHP code in the Django templates? Or is there another way (which doesn't involved migrating the

Can I catch missing file when using include built-in template tag?

2006-10-17 Thread Rachel Willmer
I'm using a set of templates which provide a standard layout to my website, where the actual content for any particular page is given using {% include params.pagename %}. All works just fine, but I'd like to be able to catch the non-existence of a page so I can put up a 404 page rather than just

Re: setting default value for foreign key?

2005-09-21 Thread Rachel Willmer
No, sorry, that was an error I introduced when I was composing the email... here's the real code... class AssetState(meta.Model): state=meta.CharField(maxlength=128) def __repr__(self): return self.state class META: admin=meta.Admin() ordering = ['id'] class

setting default value for foreign key?

2005-09-21 Thread Rachel Willmer
I have two classes: class State(meta.Model): state=meta.CharField(maxlength=128) def __repr__(self): return self.state class Asset(meta.Model): definition=meta.ForeignKey(AssetDefinition) state=meta.ForeignKey(AssetState,null=True,blank=True)

Re: auto-generated template for generic views

2005-09-08 Thread Rachel Willmer
into your template directory to over-ride the inbuilt one, as described in <http://www.djangoproject.com/documentation/tutorial2/#customize-the-admin-look-and-feel> Then you can modify that as you wish... Rachel On 04/09/05, Rachel Willmer <[EMAIL PROTECTED]> wrote: > I want to

Use of ForeignKeys in generic view template

2005-09-07 Thread Rachel Willmer
I've seen various references in the documentation to being able to use a generic view to add an object which contains a ForeignKey field, and automagically generate the appropriate SELECT html. Is this possible? If so, could some kind soul point me to an example of how to do it? Thanks Rachel

Re: auto-generated template for generic views

2005-09-05 Thread Rachel Willmer
> That's a really interesting idea. I think it'd be better to > "statically" generate the templates a single time, rather than have > Django create the templates automatically, because the former would > allow people to custom the templates' look and feel. Maybe a > "django-admin.py formtemplate a

auto-generated template for generic views

2005-09-04 Thread Rachel Willmer
I want to use the generic view mechanism to add/change/delete but I don't want to have to write my own form template for each page. I'd like it to work just like the admin interface does. Is it possible/sensible to hook into the admin code which seems to use add_stage/change_stage to automaticall

Re: iterative data model development

2005-09-01 Thread Rachel Willmer
On 01/09/05, Sebastien Fievet <[EMAIL PROTECTED]> wrote: > Django is not a release product. So, some features are not implemented > yet. Just leave their some time, and be patient ;) Not hassling, just asking :-) I think this is a *great* product, released or not... I'm just trying to understan

Django documentation search engine

2005-09-01 Thread Rachel Willmer
To help me get to grips with Django quickly, I created a search engine of the documentation. On the off-chance this is useful to others, I've made it available at Comments, brickbats, etc welcome... Rachel

initial data

2005-09-01 Thread Rachel Willmer
is there a django way to set up the tables with the initial data I want? or should I just do this using a postgres script? Rachel

iterative data model development

2005-09-01 Thread Rachel Willmer
Next question, I'm building up a data model iteratively e.g. write a bit of it, fix the errors caused by my lack of experience with Django, go back and write some more... Is there an easier way to do this than deleting the database each time so the right tables/columns get created? Rachel

backing up application/data

2005-09-01 Thread Rachel Willmer
I've just started looking at Django, and so far I'm very impressed with it. But one thing I'm not sure about, what's the recommended way of backing up a live django application? Obviously I can use svn for the python code, but is there a special django way to dump/restore the data? Or should I j