Re: Distribute Django program to run on a local computer

2006-07-31 Thread Frank Stüss
Maybe i misunderstood but what about then? You run a linux web server with django and could start it from theoretically every platform linux runs on. In parallel to the host system, not as 'live' system. You can access it via the host systems browser, so this should be

Re: INSTALLED_APPS partially shown in admin with mod_python

2006-07-31 Thread favo
I got the same error, Kilian, you fix it. it's very strange mod_python didn;t work as intergated server! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dja

Re: Distribute Django program to run on a local computer

2006-07-31 Thread Rob Hudson
Malcolm Tredinnick wrote: > Live CDs have a slight drawback in that they take over your computer > whilst you are using them, so evaluating a submission whilst taking > notes requires two computers and you lose the ability to cut and paste > and easily take screenshots, etc, without a lot of fiddl

Re: IronPython 1.0 release candidate

2006-07-31 Thread Eugene Lazutkin
Jeremy Dunck wrote: > On 7/31/06, Eugene Lazutkin <[EMAIL PROTECTED]> wrote: >> I tried it before --- IronPython didn't support Python standard library. > > Hmm, I haven't tested yet, but this email thread suggests that most of > the standard library should work as-is: > > http://www.mail-archiv

Re: Simplifying template?

2006-07-31 Thread Todd O'Bryan
I would actually be okay writing the function in the view code, if we had a map filter. {{ s.teachers|map:list_func|join:";" }} Then add the following to the context: "list_func": lambda(x): x.userinfo.informal_name() How hard would that be to implement, and is it potentially useful enough

Re: Scandinavian characters in .po files and timezones

2006-07-31 Thread Jorge Gajon
Hi, Take notice that there is also a 'fileencoding' setting in vim. When you create a new file in vim, 'fileencoding' will not be set and so it will take the current value from 'encoding'. When you open an existing file, vim will try to determine its encoding and set 'fileencoding' accordingly.

Re: Database API question: I am not able to return a QuerySet

2006-07-31 Thread Suriya
DavidA wrote: > Suriya, > > You will probably have to do this in custom SQL or using extra(). Your > query requires a subselect to get the "current B's" (B's with max(date) > for each A). > > Here's the SQL that I think you need (if I understand the problem > correctly): > > select * from _A join

Re: Django on win xp

2006-07-31 Thread limodou
On 7/22/06, Kevin Menard <[EMAIL PROTECTED]> wrote: > > On 7/22/06, Tyson Tate <[EMAIL PROTECTED]> wrote: > > > > Wait, Linux or XP? > > > > Regardless, you might want to read the documentation first: > > > > http://www.djangoproject.com/documentation/install/ > > Be sure to read the comments, too

Re: Django on win xp

2006-07-31 Thread Jan Claeys
Op vr, 21-07-2006 te 22:37 -0700, schreef Tyson Tate: > Wait, Linux or XP? Or Linux _on_ XP: ? :-) -- Jan Claeys --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Re: Distribute Django program to run on a local computer

2006-07-31 Thread Malcolm Tredinnick
On Mon, 2006-07-31 at 16:52 -0700, Joseph Heck wrote: > I've been doing exactly that myself - I have a VMWare image (not > exactly LiveCD, but VMWare player is free...) that I use for a > development environment. At OSCON I was taking briefly about it. I > need to clean it up and post it. Right no

Re: Distribute Django program to run on a local computer

2006-07-31 Thread Joseph Heck
I've been doing exactly that myself - I have a VMWare image (not exactly LiveCD, but VMWare player is free...) that I use for a development environment. At OSCON I was taking briefly about it. I need to clean it up and post it. Right now it's sort of beleagured with all my additional stuff. -joeOn

Re: Database API question: I am not able to return a QuerySet

2006-07-31 Thread SmileyChris
Suriya wrote: > This returns the list of rows in table A that have status > in table B set to 1 at some point in the past. What I want > is the latest status from table B. I see. Yes, you can either use a (grouping) custom SQL query or refactor. How I would do it is to have just one model (B)

Re: Is Django the framework I've been looking for?

2006-07-31 Thread Jan Claeys
Op vr, 21-07-2006 te 05:58 +0300, schreef Elver Loho: > SciTE for my code, though, which is pretty much just glorified Notepad > with syntax hightlighting :P That's what it looks like at first sight; when you look deeper, it's more like an alternative to vim or emacs, except it doesn't run in a

Re: Distribute Django program to run on a local computer

2006-07-31 Thread Facundo Casco
maybe this make no sense to you but what about making a custom Linux liveCD with everything you need installed. All the end-user has to do is know how to boot from CD, no install, nothing left on their systems. Facundo Joseph Heck wrote: > It's a little more tricky than just packaging Django up n

Re: Multiple copies of a Block in my Template

2006-07-31 Thread limodou
On 8/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Have you looked at template tags? > > Chris Maybe you should see the catchtag that I written to see if it suit for you. http://code.djangoproject.com/wiki/CatchTag -- I like python! My Blog: http://www.donews.net/limodou My Django Sit

Re: Tracking views or clicks

2006-07-31 Thread Ian Holsman
have a look at http://svn.zyons.python-hosting.com/trunk/zilbo/common/counter/and the blog entries I wrote about this yesterday: http://zyons.com/blog/status/a-better-stat-page/ and http://zyons.com/blog/status/where-have-you-been/it is a more general approach than what you propose, as it tracks mu

Re: Using Swish-e with django...

2006-07-31 Thread Eric Walstad
On Monday 31 July 2006 14:07, Istvan Albert wrote: > > I am expecting an answer like: "You are crazy: db native searches will > > always be faster" > > You are crazy: swish-e searches will always be faster. > > Swish-e was created for indexing/searching documents. The only issue at > hand is wheth

Re: Using Swish-e with django...

2006-07-31 Thread Istvan Albert
> I am expecting an answer like: "You are crazy: db native searches will always > be faster" You are crazy: swish-e searches will always be faster. Swish-e was created for indexing/searching documents. The only issue at hand is whether the speedup you get is worth the trouble of having to integ

Re: Weird slowdown with dev server behind nat

2006-07-31 Thread Adrian Holovaty
On 7/31/06, Akatemik <[EMAIL PROTECTED]> wrote: > I'm running the basic django server and everything works fine from lan. > But from outside every request has a three second overhead, even if > it's just a 304. This means that a small html-page with three JS-files > and a stylesheet takes 15 secon

Re: Multiple copies of a Block in my Template

2006-07-31 Thread [EMAIL PROTECTED]
Have you looked at template tags? Chris --~--~-~--~~~---~--~~ 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

Re: Tracking views or clicks

2006-07-31 Thread Guillermo Fernandez Castellanos
What about this? (disclaimer: I'm just starting in Django) First, we create a model where you simply have the name of the view and the number of times hitted. This model increases it's "counter" variable each time it is saved. class NbViews(models.Model) viewname=models.TextField(maxlength=30

Multiple copies of a Block in my Template

2006-07-31 Thread Siah
I can think of instances where you would need multiple copies of a given block. For instance, I am want to show a page counter (Page 1, (2), 3, 4, 5, 6) both on top and bottom of my page. I had to use the {% include %} tag twice to load it. Except, I realized I want my template for both standard v

Re: Tracking views or clicks

2006-07-31 Thread Jay Klehr
I'm interested in what the community suggests on this topic, as it's something I'd like to implement as well. However, one word of advice if you're using MySQL and its Query Cache... try to keep the "views" column outside of your models table since updating that table on every hit would basi

Re: Distribute Django program to run on a local computer

2006-07-31 Thread Joseph Heck
It's a little more tricky than just packaging Django up nicely because of the external dependencies. I have a set of windows installers that I have bundled up for myself to drop onto windows machines to get them set up with a dev environment (sqlite3 based). It's a little tricker on the Mac - but o

Re: Using Swish-e with django...

2006-07-31 Thread Eric Walstad
On Monday 31 July 2006 11:04, Kevin wrote: > My use of swish-e is clearly different that yours. The indexer part of > swish-e is run only periodically (say, nightly) with a `swish-e -S prog > -i ./generate_index.py` > > this creates an index file that the SwishE python api queries Hey Kevin,

Re: IronPython 1.0 release candidate

2006-07-31 Thread Jeremy Dunck
On 7/31/06, Eugene Lazutkin <[EMAIL PROTECTED]> wrote: > I tried it before --- IronPython didn't support Python standard library. Hmm, I haven't tested yet, but this email thread suggests that most of the standard library should work as-is: http://www.mail-archive.com/users@lists.ironpython.com

Tracking views or clicks

2006-07-31 Thread [EMAIL PROTECTED]
Any suggestions on how I could track how many times an object has loaded and/or been clicked? I mean, obviously in my model I'd need something like class Item(models.Model): views = IntegerField() but how would I update views when Item was loaded on a page? --~--~-~--~~-

Re: Using Swish-e with django...

2006-07-31 Thread Kevin
My use of swish-e is clearly different that yours. The indexer part of swish-e is run only periodically (say, nightly) with a `swish-e -S prog -i ./generate_index.py` this creates an index file that the SwishE python api queries --~--~-~--~~~---~--~~ You rec

Re: IronPython 1.0 release candidate

2006-07-31 Thread Eugene Lazutkin
Jeremy Dunck wrote: > http://www.eweek.com/article2/0,1895,1994994,00.asp > > ...In my copious free time, I think I'll try to get django to run on the CLR. > If anyone else gets there first, I'd love to hear about it. I tried it before --- IronPython didn't support Python standard library. Unle

Re: Distribute Django program to run on a local computer

2006-07-31 Thread [EMAIL PROTECTED]
Don't have any experience with this. Some options I've come across, that may or may not work: 1) http://www.py2exe.org/ - Never used it, but have it bookmarked for when I do need it. Like py2app but creates exe 2) http://www.voidspace.org.uk/python/programs.shtml#movpy -- From the website: "Movab

Re: django server tree organization

2006-07-31 Thread Guillermo Fernandez Castellanos
It's much clear now. Everyone seems to agree the second solution is better. I've been searching at the same time for the svn, and I've found that no one does it the same way. But's also true an important number of the projects are still in pre-magic state. In the mean time I've also found 'Do's

Distribute Django program to run on a local computer

2006-07-31 Thread Rob Hudson
Quick version: Is there a way to bundle up a Django application, maybe wrap an installer around it if need be, and distribute it by CD to install and run on a person's local system. Preferrably cross platform (Windows and Mac). Long version that helps explain why we need this: I work for a compa

Re: json serialization

2006-07-31 Thread Gábor Farkas
Jyrki Pulliainen wrote: > 2006/7/31, Gábor Farkas <[EMAIL PROTECTED]>: >> >> datetime.datetime inherits from datetime. >> > > Definetly not > sorry, of course i meant "datetime.datetime inherits from datetime.time" gabor --~--~-~--~~~---~--~~ You received thi

Re: editable=False and "Could not find Formfield or InlineObjectCollection named ..."

2006-07-31 Thread Corey
Malcolm, Thanks for the info. By modifying the fields attribute, I meant to say that I merely added a fields attribute to the admin class. It would be nice to have disabled fields showing, but I understand that there are probably some more pressing issues. Thanks, Corey --~--~-~--~--

Re: json serialization

2006-07-31 Thread Jyrki Pulliainen
I filed a ticket for this, see http://code.djangoproject.com/ticket/2460 -- Jyrki // [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

IronPython 1.0 release candidate

2006-07-31 Thread Jeremy Dunck
http://www.eweek.com/article2/0,1895,1994994,00.asp ...In my copious free time, I think I'll try to get django to run on the CLR. If anyone else gets there first, I'd love to hear about it. (Has anyone tried running it under Jython?) --~--~-~--~~~---~--~~ You rec

Re: django server tree organization

2006-07-31 Thread Kenneth Gonsalves
On 31-Jul-06, at 1:45 AM, Guillermo Fernandez Castellanos wrote: > Or more like: > /site1/templates > /media > /urls.py > /site2/templates > /media > /urls.p this makes sense to me, with common stuff somewhere else central -- regards kg http://lawgon.livejourn

Re: json serialization

2006-07-31 Thread Jyrki Pulliainen
2006/7/31, Gábor Farkas <[EMAIL PROTECTED]>: > > siniy wrote: > > Hi all, > > I've downloaded today a new release of Django and played with json > > serialization. I found that if you use DateTime field the resulting > > json string contains only date, but not all datetime. So I viewed a > > sourc

Re: json serialization

2006-07-31 Thread Gábor Farkas
siniy wrote: > Hi all, > I've downloaded today a new release of Django and played with json > serialization. I found that if you use DateTime field the resulting > json string contains only date, but not all datetime. So I viewed a > source code of django/core/serializers/json.py and found that: >

Re: Project when using multiple sites

2006-07-31 Thread Jay Parlar
Eww, the title of this thread was *supposed* to be "Project layout when using multiple sites". Gotta remember to proof-read the subject line before submitting! Jay P. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Project when using multiple sites

2006-07-31 Thread Jay Parlar
I've recently been looking at the docs, trying to grok the Sites framework. What is the recommended way of laying out the filesystem when doing multiple sites? Let's say I have two sites, "foo" and "bar", with URLs foo.com and bar.com. Would you put all the files for both sites into one Django p

Re: django server tree organization

2006-07-31 Thread Miguel Hernández
Hi,On 7/30/06, Guillermo Fernandez Castellanos <[EMAIL PROTECTED] > wrote:>    I'm going to have a server with several domain names serve a few >    applications (blog, photo gallery,...). But I'm a bit at a loss when>    dealing with how to organize the different files.I prefer your second solutio

Re: Weird slowdown with dev server behind nat

2006-07-31 Thread Akatemik
I wasn't running Apache with Django, just confirming that there isn't a connection problem with my normal pages. Hmm, I'll look into the source and see if I can make the server print something. If it doesn't work, I guess I just have to set Apache up. Wouldn't think that as necessary though, sinc

Re: Database API question: I am not able to return a QuerySet

2006-07-31 Thread DavidA
Suriya, You will probably have to do this in custom SQL or using extra(). Your query requires a subselect to get the "current B's" (B's with max(date) for each A). Here's the SQL that I think you need (if I understand the problem correctly): select * from _A join _B on _B.a_id = _A.id where _B.

Re: Weird slowdown with dev server behind nat

2006-07-31 Thread Malcolm Tredinnick
On Mon, 2006-07-31 at 03:04 -0700, Akatemik wrote: > I'm running the basic django server and everything works fine from lan. > But from outside every request has a three second overhead, even if > it's just a 304. This means that a small html-page with three JS-files > and a stylesheet takes 15 se

Weird slowdown with dev server behind nat

2006-07-31 Thread Akatemik
I'm running the basic django server and everything works fine from lan. But from outside every request has a three second overhead, even if it's just a 304. This means that a small html-page with three JS-files and a stylesheet takes 15 seconds to load. With apache everything works fine even from

Re: json serialization

2006-07-31 Thread limodou
On 7/31/06, Jyrki Pulliainen <[EMAIL PROTECTED]> wrote: > > 2006/7/31, siniy <[EMAIL PROTECTED]>: > > I know that isinstance(o, datetime.date) returns "True" even "o" is a > > datetime object. But I don't know - may be it's a python bug? My python > > version 2.4.3 from Ubuntu Dapper. I think you

Re: Installed Apps in settings.py

2006-07-31 Thread limodou
On 7/31/06, Technofreak <[EMAIL PROTECTED]> wrote: > > > limodou wrote: > > > > > How do you create your project, using: django-admin.py startproject > > XXX? If you did like this, the settings.py should include default > > apps. > > > Ya, I did create using 'django-admin.py startproject XXX' but

Re: json serialization

2006-07-31 Thread Jyrki Pulliainen
2006/7/31, siniy <[EMAIL PROTECTED]>: > I know that isinstance(o, datetime.date) returns "True" even "o" is a > datetime object. But I don't know - may be it's a python bug? My python > version 2.4.3 from Ubuntu Dapper. I can confirm this behaviour with Debian Testing's Python 2.3.5 too. -- Jy

Re: Installed Apps in settings.py

2006-07-31 Thread Technofreak
limodou wrote: > > How do you create your project, using: django-admin.py startproject > XXX? If you did like this, the settings.py should include default > apps. > Ya, I did create using 'django-admin.py startproject XXX' but I din't get the default apps included in the settings.py. Thats the b

json serialization

2006-07-31 Thread siniy
Hi all, I've downloaded today a new release of Django and played with json serialization. I found that if you use DateTime field the resulting json string contains only date, but not all datetime. So I viewed a source code of django/core/serializers/json.py and found that: def default(self, o

Re: django server tree organization

2006-07-31 Thread Guillermo Fernandez Castellanos
Thanks. But afterwards, with the second model, how can you integrate it for a webpage to work? Imagine a webpage that uses several distinct applications, each one with different templates, media,... In the webserver you will still have only one template subdirectory and one media subdirectory. H

Re: unable to runser ?

2006-07-31 Thread Geert Vanderkelen
Hi Rajeshwar, On Jul 26, 2006, at 5:42 AM, Rajeshwar Singh Jenwar wrote: > Hi Bruno, > > I m using mysql-standard-5.0.22-linux-i686 and MySQL-python-1.2.1_p2. > Are they not compatible ? Please suggest something. All i want to > setup djnago environment and start developing my website. I'm a

Re: editable=False and "Could not find Formfield or InlineObjectCollection named ..."

2006-07-31 Thread Malcolm Tredinnick
On Sun, 2006-07-30 at 17:46 -0700, Corey wrote: > When I set editable=False in a model and modify the "fields" attribute > of the Admin class, a "Could not find Formfield or > InlineObjectCollection named ..." is generated. It's not quite clear *how* you modify the fields attribute. However, if y