Re: Your IDE of choice

2009-01-07 Thread Oscar Carlsson
ot;) > > os.system("/packages/bin/vim '+python from django import db' " + \ > " ".join(args[1:])) > else: > raise IOError("Django settings file not found") > > sys.exit(0) > --dvim-- > > I'm sure some lines are probably

Re: Django vs. Kohana

2008-07-17 Thread Oscar Carlsson
I've never used Kohana (or CodeIgniter), but I've used both PHP and Python - and even if Kohana is a really nice framework, Python is still a great advantage. Python is very friendly. And Django (totally) kicks ass :-) Oscar 2008/7/17 [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > > > Henrik

Re: NEED HELP

2008-07-16 Thread Oscar Carlsson
Please post the code at dpaste.com, and paste the URL in the mail :-) As Kenneth suggested, I think it looks like an indentation error, but it's hard to detect or confirm while the mail is displayed with a non-monospaced font. Oscar On Wed, Jul 16, 2008 at 7:39 AM, Kadusale, Myles <[EMAIL

Re: tree structured data

2008-07-13 Thread Oscar Carlsson
I believe there's a project called GeoDjango that's dealing with this very issue, you should check it out: http://code.djangoproject.com/wiki/GeoDjango Oscar On Mon, Jul 14, 2008 at 12:27 AM, MarC <[EMAIL PROTECTED]> wrote: > > Hello everybody, > > I'm trying to come up with the most django

Re: Creating a Scheduled Task

2008-07-13 Thread Oscar Carlsson
If you are on a *NIX platform (linux, freebsd, os x etc) the easiest way to schedule a task is using cron, and writing a python script that can be run from cron is trivial, even if you need to use django in this script. Just put the script in your project root, and follow these instructions:

Re: Template Language Design

2008-07-13 Thread Oscar Carlsson
Well, if you really need arbitrary logic in your templates, but like the django template syntax, you should take a look at Mako[0], but it might require some work in your views. But this separation of presentation (logic) and (business) logic is intentional, and if I have understood everything

Re: Visualization of databases

2008-07-12 Thread Oscar Carlsson
There are a number of different toolkits that could do this for you, here are three that looks usable: http://code.google.com/apis/chart/ http://developer.yahoo.com/yui/charts/ http://matplotlib.sourceforge.net/ With (at least) matplotlib you could make your charts automatically in your model,

Advice on on a flatpage menu

2008-07-10 Thread Oscar Carlsson
Hello everyone! I wrote a simple flatpage menu the other day (as a template tag), but I'm not sure if this is a optimal solution - it feels a bit hackish. Here's the code: http://dpaste.com/hold/62194/ This is how the tag is used in a template: {% load flatpage_menu %}{% get_flatpage_menu

Re: html templates - 'for' cycle without a variable

2008-07-06 Thread Oscar Carlsson
If you only need to repeat a div-tag 20 times, and don't need any data from any model, you could always do it with javascript. Oscar On Fri, Jul 4, 2008 at 6:07 PM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > Create a 20-elemnt list inside your view and set it as a context > variable? > >

Re: Make changes to model...

2008-07-02 Thread Oscar Carlsson
Unless you use django-evolution (http://code.google.com/p/django-evolution/, which I don't know much about) you have to make these changes yourself, but usually it isn't that hard. There is information on how to make these changes in the django book, chapter 5:

Re: memcache not used?

2008-07-01 Thread Oscar Carlsson
...you were very correct - I didn't have CacheMiddleware loaded, and when I loaded it... Everything worked. Thanks for all your help! :-) Oscar (I feel a bit stupid, tho) On Tue, Jul 1, 2008 at 11:10 PM, Steven Armstrong <[EMAIL PROTECTED]> wrote: > > Oscar Carlsson wrote on 07

Re: memcache not used?

2008-07-01 Thread Oscar Carlsson
che stays on 0.2% memory usage - ie, no change :( Oscar On Tue, Jul 1, 2008 at 9:56 PM, Steven Armstrong <[EMAIL PROTECTED]> wrote: > > Oscar Carlsson wrote on 07/01/08 21:48: > > I've checked the following logs, but nothing turned up: > > /var/log/nginx* > > /var/log/h

Re: memcache not used?

2008-07-01 Thread Oscar Carlsson
normal operations I also removed all *.pyc after adding 'debug=1'. Oscar On Tue, Jul 1, 2008 at 7:19 PM, Steven Armstrong <[EMAIL PROTECTED]> wrote: > > Oscar Carlsson wrote on 07/01/08 19:02: > > Heh, ops! > > > > That was a typo, but even after fixing it,

Re: memcache not used?

2008-07-01 Thread Oscar Carlsson
ile you have indicated that memcached is running on > port 112211 but your process listing shows it running on 11211. > > -Brian > > On Jul 1, 9:34 am, "Oscar Carlsson" <[EMAIL PROTECTED]> wrote: > > Hi! > > > > For some reason, django doesn't seem to ad

memcache not used?

2008-07-01 Thread Oscar Carlsson
Hi! For some reason, django doesn't seem to add anything to my memcache - the process is using 0.2% RAM (seems to be the absolute minimum on my system, FreeBSD 7 with 512 MByte RAM) and never starts using more memory. Why is this? I have no idea where to begin debug this, nothing ever shows up

Re: Thanks!!!!!!!!!!!!!!!!!

2008-06-20 Thread Oscar Carlsson
+1 Oscar On Fri, Jun 20, 2008 at 12:52 PM, Valts Mazurs <[EMAIL PROTECTED]> wrote: > Sure, me too :) > > > On Fri, Jun 20, 2008 at 1:32 PM, chris vigelius < > [EMAIL PROTECTED] <[EMAIL PROTECTED]>> wrote: > >> >> me2... >> >> Am Freitag, 20. Juni 2008 05:50:13 schrieb Juan Hernandez: >> > me 2

Re: Switched to Python2.5 now PIL has stopped working

2008-06-16 Thread Oscar Carlsson
I installed python + pil + django etc with MacPorts, and I have no problems with PIL, whatsoever. And you get all your custom installs in /opt/local, keeping your OS X installation clean... :) Oscar On Mon, Jun 16, 2008 at 6:50 PM, Jude <[EMAIL PROTECTED]> wrote: > > Thanks, you've been really

Re: Start server

2008-06-16 Thread Oscar Carlsson
No, you don't have to load everything by hand - there is another way :) http://superjared.com/entry/django-and-crontab-best-friends/ Oscar On Mon, Jun 16, 2008 at 11:33 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Mon, Jun 16, 2008 at 3:50 PM, Molly <[EMAIL PROTECTED]> wrote: > >> >> Hey

Re: Django HTML Editor

2008-06-14 Thread Oscar Carlsson
I would go for Textmate (haven't tried E tho) even if it costs some money - it's a superb text editor! There are a few plugins for VIM that are very useful (especially http://tinyurl.com/cm4nm) for this kind of editing, but Textmate is a lot better. Oscar On Sat, Jun 14, 2008 at 1:19 PM,

Re: SQLobject vs SQLAlchemy

2008-06-13 Thread Oscar Carlsson
I'm wondering - are there any performance related reasons to switch from Django ORM to say sqlalchemy? Why does this discussion reoccur every once in a while if there is nothing to gain? Are there other Good Reasons (tm) to switch? Oscar On Fri, Jun 13, 2008 at 8:49 AM, James Bennett <[EMAIL

Re: How to mark compulsory fields in admin interface?

2008-06-06 Thread Oscar Carlsson
It's HTML - ie, the required fields are in *bold* (I'm not sure google groups accepts inline HTML, tho). Good luck :) Oscar On Fri, Jun 6, 2008 at 10:12 PM, Cliff <[EMAIL PROTECTED]> wrote: > > Hi Cory, > Thanks for your reply. Can you please be more precise? I am still on > the level of

Re: Django and Linux distros

2008-05-18 Thread Oscar Carlsson
I use OS X + (vim|mysql|svn) while developing and (FreeBSD|Gentoo) in production :) The only thing I'm missing is omnicompletion for django, haven't been able to figure out how to do it myself :( Oscar JonSidnell wrote: > Hi everyone > > I'm suddenly struck by the notion that I would like to

Re: Xcode as Django IDE

2008-02-14 Thread Oscar Carlsson
I mostly use textmate, but I know that (Mac)Vim with omnicompletion and snippetsEmu is quite usable. http://code.djangoproject.com/wiki/UsingVimWithDjango Oscar On Wed, Feb 13, 2008 at 01:57:38PM -0800, zombat wrote: > > Hi Djangonauts. > > I was looking around for a good IDE for the Mac

Re: Web Development with Django: Windows vs Linux/Mac OS X

2008-02-10 Thread Oscar Carlsson
Another cool editor is Scribes ( http://scribes.sourceforge.net/ ), at least last time I tried it. Might take some configuring, but it might be worth it :) On Sun, Feb 10, 2008 at 10:12:02PM +0530, Ramdas S wrote: > I know its no replacement, but try scite editor. Its cool and is used by > many

Re: Web Development with Django: Windows vs Linux/Mac OS X

2008-02-09 Thread Oscar Carlsson
Why choose one when you can have both? I'd vote for OS X. Nice UNIX-ness, _really_ nice fonts, superb hardware support and good looking hardware...and with VMWare Fusion / Parallells virtualisation is simple and fast. And Photoshop works really well is OS X :) On Thu, Feb 07, 2008 at 12:49:27AM

Re: Simple markup language?

2008-01-21 Thread Oscar Carlsson
Another alternative could be using BeautifulSoup to find all tags in the data and replace all non-approved tags with nothing. Oscar On Mon, Jan 21, 2008 at 04:03:54PM -0700, Jeff Anderson wrote: > If you've already looked at the regular bunch: textile, markdown, rst, > etc... > And you just