2D map application: performance and design question

2010-11-01 Thread Lars Ruoff
Hello,

first of all, these are my first steps with Django, and i only have
limited experience with Python, so please be patient.

I'm using it for what is intended to be a browser game in the future.
The main part of the game is a zoom view on a two-dimensional map of
fields.

I'm currently using Django 1.2.3 with Python 2.6 on Windows XP.
I'm using Python-provided SQLite and Django's local debug HTTP server
during development ('python manage.py runserver').

It works pretty well, but i notice that it takes several seconds to
update the map screen, which i consider unacceptable given the fact
that it runs locally.

I'm wondering where the performance bottleneck lies here.
Is it...
- SQLLite? (I.e. would switching to say PostgreSQL speed things up
considerably?)
- Djangos debug web server? (I.e. would switching to apache speed
things up considerably?)
- or the way my application is designed??

Since the latter is a very probable answer, here is the way it works
in a nutshell:

The model is something like:

class Terrain(models.Model):
image_file = models.CharField(max_length=80)

class Location(models.Model):
x = models.IntegerField()
y = models.IntegerField()
terrain = models.ForeignKey(Terrain)


The heart of the view goes like this:

center_location = Location.objects.get(id=location_id)

## how many fields on the map view in each direction
half_x = 6
half_y = 6

locations = Location.objects.filter( \
x__gte=center_location.x-half_x, \
x__lte=center_location.x+half_x, \
y__gte=center_location.y-half_y, \
y__lte=center_location.y+half_y)

locs = []
for l in locations:
loc_info = {'id': l.id, \
'x': l.x - center_location.x + half_x, \
'y': l.y - center_location.y + half_y, \
'img': l.terrain.image_file}
locs.append(loc_info)

c = Context({
'locs': locs,
})
return HttpResponse(t.render(c))


And the main part of the template renders these items:

{% for l in locs %}

{% endfor %}


Do you see any issues with this approach? Any paths to performance
improvements?
Since i'm at the beginning of this project i would like to avoid going
the wrong way.

best regards,
Lars

-- 
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.



Re: 2D map application: performance and design question

2010-11-01 Thread Lars Ruoff
Ok, but that said, the database isn't that big here. (Well, i guess)
There are currently 4800 entries in the "Location" table.
Is this too much for SQLite already?

May it be the query in
locations = Location.objects.filter( \
x__gte=center_location.x-half_x, \
x__lte=center_location.x+half_x, \
y__gte=center_location.y-half_y, \
y__lte=center_location.y+half_y)
that might be non-optimal?

How to improve it?

Lars


On Nov 1, 11:55 am, "Cal Leeming [Simplicity Media Ltd]"
 wrote:
> Hi Lars,
>
> Unless you are doing some *really* intense Python code in your business
> logic, then 9 out of 10 times, the bottleneck is usually the database,
> especially if you are using Python.
>
> Cal

-- 
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.



Re: 2D map application: performance and design question

2010-11-01 Thread Lars Ruoff
Hi Daniel,

you are right that images are being loaded.
But i gave it a try and replaced the images by text.
Still the page takes about 3 seconds to load.

Lars


On Nov 1, 12:30 pm, Daniel Roseman  wrote:
> It's a bit hard to tell without knowing how the slowness appears. What
> exactly is slow?
>
> My instinct would be that it's simply a matter of image loading. Don't
> forget that the development server can only serve one thing at a time,
> so if you're loading a lot of images they are going to come up slowly.
> A dedicated server will be a lot better for that - might be worth
> experimenting with setting up Apache or Nginx or Lightppd just to
> serve the images for now, to see if that helps.
> --
> DR.

-- 
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.



Re: 2D map application: performance and design question

2010-11-01 Thread Lars Ruoff
Hi Lukasz,
see my answer to Daniel. Replacing images by text didn't speed up
things much.
Is there any other test/profiling that i should do?
Would taking the systime before and after the query give me some
hints? I'll try this later...

On Nov 1, 12:39 pm, Łukasz Rekucki  wrote:
> On 1 November 2010 10:59, Lars Ruoff  wrote:
>
>
>
> > Hello,
>
> > first of all, these are my first steps with Django, and i only have
> > limited experience with Python, so please be patient.
>
> > I'm using it for what is intended to be a browser game in the future.
> > The main part of the game is a zoom view on a two-dimensional map of
> > fields.
>
> > I'm currently using Django 1.2.3 with Python 2.6 on Windows XP.
> > I'm using Python-provided SQLite and Django's local debug HTTP server
> > during development ('python manage.py runserver').
>
> > It works pretty well, but i notice that it takes several seconds to
> > update the map screen, which i consider unacceptable given the fact
> > that it runs locally.
>
> > I'm wondering where the performance bottleneck lies here.
> > Is it...
> > - SQLLite? (I.e. would switching to say PostgreSQL speed things up
> > considerably?)
>
> It could actually slow down things. Independently of the DB, you want
> to set up some indexes on your models (but I don't think that's your
> problem atm).
>
> > - Djangos debug web server? (I.e. would switching to apache speed
> > things up considerably?)
>
> Bingo! The development server is single-threaded and slow, so it
> totally sucks at serving *static files*. Looking at your template,
> your map is composed of many images and they all have to load
> sequentially via the devserver. Serving those images using Apache or
> Nginx should speed up things significantly.
>
> > - or the way my application is designed??
>
> In the long term, when the DB really starts to be your bottleneck, you
> want to do some research about all things "spatial" (like spatial
> indexes).
>
> --
> Łukasz Rekucki

-- 
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.



Re: 2D map application: performance and design question

2010-11-01 Thread Lars Ruoff
Ok, thanks all,

So following Bill's advice, i did:
>python manage.py shell
>>> import game.models
>>> list(game.models.Location.objects.filter( \
...   x__gte=34, \
...   x__lte=46, \
...   y__gte=24, \
...   y__lte=36))

...and the result showed up instantly!
So it seems DB is not the issue.
Will do other testing...


On Nov 1, 4:18 pm, Bill Freeman  wrote:
> My experience with Django debug toolbar is that it makes things
> slow all by itself.
>
> I have done a couple of apps that use the equivalent query, using PostgreSQL,
> without noticing a performance issue, with everything running on a Linux 
> server.
>
> 1. Have you tried timing the query by hand?  That is, run the manage.py shell,
> import your model, and type a sample version of the query, wrapped in a list()
> operation to force the query to evaluate right away.  If it's slow,
> then you problem
> is at least mostly in your DB/query choice.
>
> 2. Is the machine in question tight on memory?  That could make things slower
> that it would be on a production instance.
>
> 3.  You might look at the "range" field lookup instead of pairs of
> gte, lte.  I doubt
> that it makes a performance difference, and I don't know if SQLite supports
> BETWEEN, but it's easy to try.
>
> 4. You show x and y as integers, but if that was just by way of example, and
> they are really some complex (non-scalar) data type, the comparisons may not
> be cheap on the database.
>
> Bill
>
> On Mon, Nov 1, 2010 at 8:13 AM, Javier Guerra Giraldez
>
>  wrote:
> > On Mon, Nov 1, 2010 at 5:55 AM, Cal Leeming [Simplicity Media Ltd]
> >  wrote:
> >> 9 out of 10 times, the bottleneck is usually the database
>
> > true, but 8.7 of those 9 are about how the database is used, and not
> > about the engine choice.  simply changing SQLite won't improve
> > significantly the one-user case.
>
> > the trick is: 1) get as few db queries as possible for each page.  2)
> > use appropriate indices for those queries
>
> > but first of all, you have to identify if it is really the DB where
> > you're spending time.  the easiest way to be sure is to install
> > django_debug_toolbar app, it's great to tell you exactly what's going
> > on with the time and the DB accesses.
>
> > --
> > Javier
>
> > --
> > 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 
> > athttp://groups.google.com/group/django-users?hl=en.

-- 
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.



Re: 2D map application: performance and design question

2010-11-02 Thread Lars Ruoff
Ok, so having excluded SQLite and the static served files, I'd like to
test if the server matters. What would be a minimum Apache install and
config to run Django locally (on Windows)?


On Nov 1, 7:30 pm, Lars Ruoff  wrote:
> Ok, thanks all,
>
> So following Bill's advice, i did:>python manage.py shell
> >>> import game.models
> >>> list(game.models.Location.objects.filter( \
>
> ...   x__gte=34, \
> ...   x__lte=46, \
> ...   y__gte=24, \
> ...   y__lte=36))
>
> ...and the result showed up instantly!
> So it seems DB is not the issue.
> Will do other testing...
>
> On Nov 1, 4:18 pm, Bill Freeman  wrote:
>
> > My experience with Django debug toolbar is that it makes things
> > slow all by itself.
>
> > I have done a couple of apps that use the equivalent query, using 
> > PostgreSQL,
> > without noticing a performance issue, with everything running on a Linux 
> > server.
>
> > 1. Have you tried timing the query by hand?  That is, run the manage.py 
> > shell,
> > import your model, and type a sample version of the query, wrapped in a 
> > list()
> > operation to force the query to evaluate right away.  If it's slow,
> > then you problem
> > is at least mostly in your DB/query choice.
>
> > 2. Is the machine in question tight on memory?  That could make things 
> > slower
> > that it would be on a production instance.
>
> > 3.  You might look at the "range" field lookup instead of pairs of
> > gte, lte.  I doubt
> > that it makes a performance difference, and I don't know if SQLite supports
> > BETWEEN, but it's easy to try.
>
> > 4. You show x and y as integers, but if that was just by way of example, and
> > they are really some complex (non-scalar) data type, the comparisons may not
> > be cheap on the database.
>
> > Bill
>
> > On Mon, Nov 1, 2010 at 8:13 AM, Javier Guerra Giraldez
>
> >  wrote:
> > > On Mon, Nov 1, 2010 at 5:55 AM, Cal Leeming [Simplicity Media Ltd]
> > >  wrote:
> > >> 9 out of 10 times, the bottleneck is usually the database
>
> > > true, but 8.7 of those 9 are about how the database is used, and not
> > > about the engine choice.  simply changing SQLite won't improve
> > > significantly the one-user case.
>
> > > the trick is: 1) get as few db queries as possible for each page.  2)
> > > use appropriate indices for those queries
>
> > > but first of all, you have to identify if it is really the DB where
> > > you're spending time.  the easiest way to be sure is to install
> > > django_debug_toolbar app, it's great to tell you exactly what's going
> > > on with the time and the DB accesses.
>
> > > --
> > > Javier
>
> > > --
> > > 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 
> > > athttp://groups.google.com/group/django-users?hl=en.

-- 
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.



Re: 2D map application: performance and design question

2010-11-02 Thread Lars Ruoff
Ok, thanks for the suggestion, Javier.
I implemented this and it showed:
I'm spending about
0.2 secs for the queries,
but 1.5 secs for t.render(c) !

So rendering the template seems to take a significant amount of time!
As you can see, my template code iterates over about 13*13=169 objects
that have been passed in the context.
I then made tests to reduce this number. Here is the result of time
spent for the query and render() as a function of the grid size:
3*3: 0.03s, 0.1s
5*5: 0.04s, 0.25s
7*7: 0.08s, 0.45s
9*9: 0.13s, 0.72s
11*11: 0.17s, 1.1s
13*13: 0.2s, 1.5s

Lars


On Nov 2, 4:46 pm, Javier Guerra Giraldez  wrote:
> On Tue, Nov 2, 2010 at 3:35 AM, Lars Ruoff  wrote:
> > Ok, so having excluded SQLite and the static served files, I'd like to
> > test if the server matters. What would be a minimum Apache install and
> > config to run Django locally (on Windows)?
>
> again, that's _very_ unlikely to be the cause.  why not profile a
> little?  if you're not handy with a python profiler, just set a var
> 'starttime = datetime.now()' at the beginning of your view function
> and a few 'print(datetime.now() - starttime)' at strategic points.
>
> --
> Javier

-- 
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.



Re: 2D map application: performance and design question

2010-11-04 Thread Lars Ruoff
Excellent advice!
With this I'm down to less than 0.02 secs for the 13x13 map rendering!

Regards,
Lars


On Nov 2, 9:45 pm, Knut Ivar Nesheim  wrote:
> I would suggest rewriting the loop in your template as a templatetag.
> Something like this
>
> @register.simple_tag
> def render_locations(locations):
>     html = u""" html %(x)s stuff %(y)s here %(link)s """
>     return '\n'.join([html % { 'x': loc.x, 'y': loc.y', 'link':
> loc.link } for loc in locations])
>
> I've used this approach a few times with good results for my use cases.
>
> Regards
> Knut
>
> On Tue, Nov 2, 2010 at 9:28 PM, Lars Ruoff  wrote:
> > Ok, thanks for the suggestion, Javier.
> > I implemented this and it showed:
> > I'm spending about
> > 0.2 secs for the queries,
> > but 1.5 secs for t.render(c) !
>
> > So rendering the template seems to take a significant amount of time!
> > As you can see, my template code iterates over about 13*13=169 objects
> > that have been passed in the context.
> > I then made tests to reduce this number. Here is the result of time
> > spent for the query and render() as a function of the grid size:
> > 3*3: 0.03s, 0.1s
> > 5*5: 0.04s, 0.25s
> > 7*7: 0.08s, 0.45s
> > 9*9: 0.13s, 0.72s
> > 11*11: 0.17s, 1.1s
> > 13*13: 0.2s, 1.5s
>
> > Lars
>
> > On Nov 2, 4:46 pm, Javier Guerra Giraldez  wrote:
> >> On Tue, Nov 2, 2010 at 3:35 AM, Lars Ruoff  wrote:
> >> > Ok, so having excluded SQLite and the static served files, I'd like to
> >> > test if the server matters. What would be a minimum Apache install and
> >> > config to run Django locally (on Windows)?
>
> >> again, that's _very_ unlikely to be the cause.  why not profile a
> >> little?  if you're not handy with a python profiler, just set a var
> >> 'starttime = datetime.now()' at the beginning of your view function
> >> and a few 'print(datetime.now() - starttime)' at strategic points.
>
> >> --
> >> Javier
>
> > --
> > 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 
> > athttp://groups.google.com/group/django-users?hl=en.

-- 
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.



Where to load global static data?

2012-04-04 Thread Lars Ruoff
Hi,
i'm using Django the first time for a browser game project.
I will need to have some globally accessible, static data like string
tables for every view.
These would be loaded from XML files.
For the moment all i have figured out with Django is that my code will
be called via callbacks for the view when accessing a particular URL.
Obviously, i don't want to relo
I'd like to know where to put the code that reads these files and
initialzes the global data.

-- 
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.



Where to load global static data?

2012-04-04 Thread Lars Ruoff
Hi,
i'm using Django the first time for a browser game project.
I will need to have some globally accessible, static data like string
tables for every view.
These would be loaded from XML files.
For the moment all i have figured out with Django is that my code will
be called via callbacks for the view when accessing a particular URL.
Obviously, i don't want to relo
I'd like to know where to put the code that reads these files and
initialzes the global data.

-- 
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.



Re: Where to load global static data?

2012-04-04 Thread Lars Ruoff
Sorry, that message went off (twice!) while i was in the middle of
typing :-)

The question is:
How do i load static global data once and for all at server startup.
I.e. i'd like to have that data in memory and accessible from any view
during the lifetime of the server, so that it needs NOT to be loaded
for any access to the site/view.

Hope the question is clear.
Regards,
Lars

-- 
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.



Where/how to load global static data?

2012-04-04 Thread Lars Ruoff
Hi,
i'm using Django the first time for a browser game project.
I will need to have some globally accessible, static data like string
tables for every view.
These would be loaded from XML files.
For the moment all i have figured out with Django is that my code
will
be called via callbacks for the view when accessing a particular URL.
Obviously, i don't want to reload that data with *each* access to a
view.
I'd like to know where to put the code that reads these files and
initialzes the global data once and for all at server startup.
I.e. i'd like to have that data in memory and accessible from any
view
during the lifetime of the server, so that it needs NOT to be loaded
for any access to the site/view.

Hope the question is clear.

Regards,
Lars

-- 
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.



Re: Port Django to Javascript

2012-04-05 Thread Lars Ruoff
On Apr 5, 8:48 am, kenneth gonsalves  wrote:
> frankly these are not questions to be asked of an open source project.

On the contrary, many more open source projects should ask themselves
that question!

I'm very much interested in the answer, since i really don't get it.
Why would you re-invent a server-side application framework on client-
side??

regards,
Lars

-- 
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.



Re: Where to load global static data?

2012-04-05 Thread Lars Ruoff
On Apr 5, 9:43 am, Mike Dewhirst  wrote:
> On 5/04/2012 4:53pm, Lars Ruoff wrote:
>
> > Sorry, that message went off (twice!) while i was in the middle of
> > typing :-)
>
> > The question is:
> > How do i load static global data once and for all at server startup.
>
> I think you would need to implement caching. 
> Seehttps://docs.djangoproject.com/en/dev/topics/cache/
>
> Also, if you really want it pre-loaded you would probably need to write
> a program to ensure all static data is fetched at webserver restart.
>
> But, normally static data isn't served by Django. It is usually kept in
> a separate location from your Django code and served directly by the
> webserver without getting Django involved at all. 
> Seehttps://docs.djangoproject.com/en/dev/howto/static-files/
>
> Good luck
>
> Mike


thanks Mike.
sorry i had some problem with this thread so i tried to delete it and
started another one.
=> Please continue here:
http://groups.google.com/group/django-users/browse_thread/thread/9659ff188c59dc9b/3cae53e95b368229

In short, i'm not talking about static data like pages/ressources to
be served by the server, but static in the sense constant python data
that is going to be read in once and then acessed at different parts
of the python code.

-- 
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.



Re: Where/how to load global static data?

2012-04-05 Thread Lars Ruoff
On Apr 5, 9:05 am, kenneth gonsalves  wrote:
> I may be wrong, but AFAIK django is not a server - it is a framework
> that runs on a web server, so every new request starts a new instance of
> your site. You could use cacheing to serve static data - but this is not
> like pre-loading data like one would do with zope for example.
> --
> regards
> Kenneth Gonsalves


Hi,
the question is not about serving static data (like HTML, images
etc.), but having global python variables initialized once, for all
instances of the site, that is, so they can be used from within each
view.
All pages should be able to access these global objects and they
should be loaded only once in memory.
The problem is indeed with the "start a new instance of the site".
Isn't there a way to pass constant data between instances?
It probably would require a callback that django calls when it is
invoked for the first time.
does this exist?


-- 
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.



Re: Where/how to load global static data?

2012-04-05 Thread Lars Ruoff

On Apr 5, 2:31 pm, kenneth gonsalves  wrote:
> On Thu, 2012-04-05 at 05:25 -0700, Lars Ruoff wrote:
> > the question is not about serving static data (like HTML, images
> > etc.), but having global python variables initialized once, for all
> > instances of the site, that is, so they can be used from within each
> > view.
>
> this is precisely the point I addressed in my reply. Every request to
> django starts a new instance of django - and you have to initialise the
> variables again - cacheing may improve the performance. Django is not a
> server.
> --
> regards
> Kenneth Gonsalves

Kenneth, ok, sorry, i misunderstood your remark.
So as i understand, "new instance of Django" implies "new instance of
Python interpreter", right?
Then effectively there is no way of saving objects between instances. :
(

So how would you guys implement a (constant, possibly large) string
table that would be used in nearly every view?

regards,
Lars

-- 
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.



Re: Where/how to load global static data?

2012-04-05 Thread Lars Ruoff
Thanks a lot, Tom.
That magnificantly answers my question. :-)

One last thing:

"... a function which loads, parses and returns
the data, and memoize the result."

That (and the first option also) means that we stay within the same
Python interpreter environment even for different requests to the
site?

-- 
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.



Anyone using PyScripter to debug their Django apps?

2012-09-22 Thread Lars Ruoff
Hi,
The PyScripter FAQ has an entry about how to debug Django applications:
https://code.google.com/p/pyscripter/wiki/FAQ#How_can_I_debug_Django_applications?
 

Has anybody tried this out?
It doesn't work for me.
I can run my Django app but it ignores my breakpoints.

See my post on the PyScripter group:
https://groups.google.com/d/topic/pyscripter/8DDSjxJvxts/discussion

Just curious if anybody got this working and could give me a hint.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/iFXSozF2zssJ.
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.



Have different databases using SQLite

2011-10-06 Thread Lars Ruoff
Hi,

i'm having the Django database set up like so:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'D:\Users\Max\Projects\my4x\data\my4x.db',
'USER': '',  # Not used with sqlite3.
'PASSWORD': '',  # Not used with sqlite3.
'HOST': '',  # Set to empty string for
localhost. Not used with sqlite3.
'PORT': '',  # Set to empty string for
default. Not used with sqlite3.
}
}

I see that the database contains a lot of Django-related stuff (tables
with auth_ and django_ prefixes).
Is there a way i can seperate the Django stuff from my apps model
database?
What I'd prefer is to have two different databases (files), with one
containing the Django stuff and the other my own models.
Reason is that i develop a game and the database stores the game state
for a given time step. Ideally, i would like to have a different game
database file for each time step so i can go back in time when i like.

-- 
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.



Re: Have different databases using SQLite

2011-10-07 Thread Lars Ruoff
Many thanks, Tom!
Didn't notice this was covered in the docs.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Mue4TVMYw_0J.
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.