MySQLdb on Ubuntu 10.10

2010-10-12 Thread Will McGugan
Hi,

I've just upgraded my development machine from Ubuntu 10.04 to 10.10.
Unfortunately, now my Django apps wont start, I get the following
traceback on runserver:


File "/usr/local/lib/python2.6/dist-packages/django/core/management/
commands/runserver.py", line 48, in inner_run
self.validate(display_num_errors=True)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/
base.py", line 245, in validate
num_errors = get_validation_errors(s, app)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/
validation.py", line 22, in get_validation_errors
from django.db import models, connection
  File "/usr/local/lib/python2.6/dist-packages/django/db/__init__.py",
line 75, in 
connection = connections[DEFAULT_DB_ALIAS]
  File "/usr/local/lib/python2.6/dist-packages/django/db/utils.py",
line 91, in __getitem__
backend = load_backend(db['ENGINE'])
  File "/usr/local/lib/python2.6/dist-packages/django/db/utils.py",
line 32, in load_backend
return import_module('.base', backend_name)
  File "/usr/local/lib/python2.6/dist-packages/django/utils/
importlib.py", line 35, in import_module
__import__(name)
  File "/usr/local/lib/python2.6/dist-packages/django/db/backends/
mysql/base.py", line 14, in 
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb
module: libmysqlclient_r.so.15: cannot open shared object file: No
such file or directory

I realise this probably isn't specifically a Django issue, but it
sounds like an issue that other Django devs would have experienced.

Any help would be appreciated...

Will

-- 
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 from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



get_or_create not atomic?

2009-05-12 Thread Will McGugan
Hi,

I recently tracked down a strange bug in our site where 2 object existed but
the code was expecting only one.

I think this is due to get_or_create, which doesn't appear to be atomic.
What I assume happened is that two requests came in close together and
tested for the existence of the object I was creating. Both requests
detected that the object didn't exist and went on to create a new one.

Could this be the case? And if so, should I not expect 'get_or_create' to be
an atomic operation?


Regards,

Will McGugan

-- 
Will McGugan
http://www.willmcgugan.com

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



I'm moving to Oxford

2009-01-14 Thread Will McGugan
Hi,

I'm sending this out to everyone in my gmail contacts, because I'm lazy.
Apologies if you don't need to know this.

I'm moving to Oxford tomorrow (Thursday 15th). Please get in touch if you
need my new address. My landline will change, but you can always get me on
my mobile.

I wont have internet access at home from tomorrow, so apologies if emails go
unanswered till I get broadband again!

So long, London!

Will

-- 
Will McGugan
http://www.willmcgugan.com

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Change message unicode issue

2008-12-05 Thread Will McGugan
Hi,

I'm getting an 500 error in my admin site when modifying an object
containing unicode. It seems to be an issue when constructing the change
message. Here's the details (running on Django 1.0). Any help would be
appreciated.


'ascii' codec can't decode byte 0xe2 in position 37: ordinal not in
range(128)


·/www/django-sites/itpp/itpp/django/contrib/admin/options.py in
change_view

594. change_message =
self.construct_change_message(request, form, formsets) ...

▶ Local vars

·/www/django-sites/itpp/itpp/django/contrib/admin/options.py in
construct_change_message

347. change_message.append(_('Changed
%(list)s for %(name)s "%(object)s".') ...



-- 
Will McGugan
http://www.willmcgugan.com

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Are Querysets threadsafe?

2008-10-29 Thread Will McGugan

Hi,

Are querysets threadsafe? i.e. If a query set object is shared across
requests, will it cause any issues? I ask because some of the code in
django/db/models/query.py looks like it might access the same
resources if called simultaneously from two threads.

Regards,

Will McGugan
http://www.willmcgugan.com

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---