On 8/20/07, Stefan Matthias Aust <[EMAIL PROTECTED]> wrote:
> SC keeps all persistent data two global dicts that contain other dicts
> containing more dicts and arrays. I tried to map the data onto
> database tables but doing this, most of the elegance of Python seems
> to vanish. My code is
I had some success mapping SQLAlchemy Table objects to django models, but as
Malcolm said if you're starting from scratch, unless you have a really
compelling reason to use django models, why not use SA directly?
Also, and forgive the tone of this, it's not meant to sound rude, why do you
want to
You can minimize the amount of code writing some special methods for
your Player model, i.e.:
player = Player.objects.get(...)
player.increase("kills", 1)
where
class Player(..):
...
def increase(self, attribute, by_value):
current_value = getattr(self, attribute, 0)
As a side-project I tried to port Stellar Crisis 2.2 (a 15 year old
browser game written in the C-like langage Pike for the Roxen server)
to Django. So far, unfortunately, I failed. It seems, Django isn't the
right tool to create such kind of application :(
SC keeps all persistent data two
4 matches
Mail list logo