2010-05-31

2010-05-27

FIX: ImportError: cannot import name ImmutableList

Hi, it is NISHIO Hirokazu. I'm moving my Django app into Google App Engine with Django-nonrel. I encountered the error and it took a lot of time from me. Google search didn't know anything about the problem.

The version of Django in Google App Engine is 1.0. Thus that of Django-nonrel(djangoappengine) is 1.2. It is the root of the problem.

Of cource, some code to avoid such a versioning problem was wrote in Django-nonrel. See djangoappengine/main/main.py


parent_dir = os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
f parent_dir not in sys.path:
sys.path.insert(0, parent_dir)

# Remove the standard version of Django
if 'django' in sys.modules and sys.modules['django'].VERSION < (1, 2):
for k in [k for k in sys.modules
if k.startswith('django\.') or k == 'django']:
del sys.modules[k]


If sys.path doesn't have the path to Django in Django-nonrel, it add the path. If already old Django was imported, it remove that. But unfortunately, in my case, sys.path has the path, and the path to Django in Google App Engine preceded, but it's not imported yet.

It's mystery. I can't tell why it happened. But it actually happened.

I wrote a workaround for the problem. It bring the path to correct Django always on top.


parent_dir = os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
if parent_dir in sys.path:
sys.path.remove(parent_dir)
sys.path.insert(0, parent_dir)

FIX: DatabaseError: Non-nullable field id can't be None!

Hi, it is NISHIO Hirokazu. I'm moving my Django app into Google App Engine with Django-nonrel. I encountered the error and it took a lot of time from me. Google search didn't know anything about the problem.

Keep in mind: DON'T INHERIT DJANGO MODELS!

I want to add "oldid" field to keep relation information between models. Unfortunately "User" models are not mine, just be imported from django.auth, so I inherit it to add the field. It was the root of evil.

I hope it helps you :)

2010-05-26

2010-05-22

home-less

Hi, this is takano32.

R0025618

Today's topic is "home-less", this is Japanese English and it means "Homelessness".

Ueno is one of the most famous home-less city in Japan.
And many other cities are having many home-less near by railway station.

The photo in this article is taken at Shibuya in Japan.
But Shibuya is famous by having many teenagers.

Here in Shibuya have many teenagers and also having many home-lesses.
It's very interesting Japanese city has many faces on each aspects.

2010-05-17

ruin(破滅) lounge @ Shibuya

Ruin Lounge is a new style of gallery.

I'm a Ruin Lounge member.
http://chaosxlounge.com/artist.html

There are many computers.

Geeks are making visual processing software every day,

So that the visual effects will become more and more cool.





2010-05-13