Re: Collapsible fields

2009-11-09 Thread Lars Stavholm
Daniel Roseman wrote: > On Nov 9, 8:47 am, Lars Stavholm <st...@telcotec.se> wrote: >> Hi All, >> >> I'm looking to implement collapsible fields in a django powered >> page, so far with no luck. >> >> Any hints on the best way of doing it? >&g

Collapsible fields

2009-11-09 Thread Lars Stavholm
Hi All, I'm looking to implement collapsible fields in a django powered page, so far with no luck. Any hints on the best way of doing it? In the mean time, I checked out how it's done in the admin interface, and came up with a simple test page as follows:

django + mod_python + apache2 config problem

2009-10-19 Thread Lars Stavholm
Bit of an annoying problem with apache2 + mod_python configuration. I've got my django site setup and working. When adding a directive in the apache config which then includes authentication, the SetHandler None directive doesn't seem to work, i.e. I get a "Page not found" error in my django

Re: Flatpage on first page of a website

2009-10-16 Thread Lars Stavholm
Alessandro Ronchi wrote: > I need to put a flatpage on / > and make www.example.com > return the flatpage. > > Is it possible? What url must I put in flatpage admin? No flatpages in admin as far as I know. At the frontend (your web site www.example.com) however: 1. Create a flatpage for with

Re: Very bad experience in Django...

2009-06-26 Thread Lars Stavholm
Chris Withers wrote: > steveneo wrote: >> I try to use Django in a new project. Honestly, it is very bad >> experience. It looks not boosting my development speed. Today, I >> almost give up and begin to look up another Python framework > > Go for it :-) +1 /L

django-navbar

2009-06-18 Thread Lars Stavholm
Has anyone been able to use django-navbar successfully in latest Django 1.1 (from trunk)? Any ideas on how to use it appreciated. Or maybe there's a better navigation bar plugin? /Lars Stavholm --~--~-~--~~~---~--~~ You received this message because you

Re: Weird URL problem

2009-06-12 Thread Lars Stavholm
Lars Stavholm wrote: > Hi All, > > got a problem that's slowly driving me crazy: > > http://mbf takes me to my apache+mod_python+django application. > > However, if I click a link, e.g. http://mbf/jobs, I get the > following exception: > > TypeErro

Weird URL problem

2009-06-12 Thread Lars Stavholm
: http://mbfjobs/ [snip] Notice the Request URL, there's a slash missing, something along the way removed the slash. If I try http://mbf//jobs, I end up at the right place. Can anyone tell me what it is that is removing that slash? Any input appreciated /Lars Stavholm

Re: Displaying rows as columns

2009-05-02 Thread Lars Stavholm
e you'd be better of defining the model/record as being a week. Simply make things easier on yourself. Just my 2c /Lars Stavholm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

graph tools

2009-04-23 Thread Lars Stavholm
Hi All, looking to produce graphs within a django application, preferably within the admin site. django-graphs might be a contender, but it seems to be not fully completed yet. Anyone using it? Other django graph app's? Any advice appreciated /Lars Stavholm

Re: django-grappelli setup problem

2009-04-17 Thread Lars Stavholm
li google-group in the near future. until that, > use either this list or the google-code issue tracker. Good enough for me. I'm happy you were reading this list when helping me out. Thanks! /Lars > On Apr 17, 8:18 am, Lars Stavholm <st...@telcotec.se> wrote: >> p

Re: django-grappelli setup problem

2009-04-17 Thread Lars Stavholm
point in time? o is this mailing list the proper place for this conversation? Thanks! /L > however, I´ll take another look at that in order to simplify. > > thanks, > patrick > > > On 16 Apr., 21:44, Lars Stavholm <st...@telcotec.se> wrote: >> patrickk w

Re: django-grappelli setup problem

2009-04-16 Thread Lars Stavholm
's a mismatch of versions here. I use django-1.0.2 and I was led to believe that django-grappelli was developed towards the latest release of django, i.e. 1.0.2. /L > On 16 Apr., 18:44, Lars Stavholm <st...@telcotec.se> wrote: >> So that all went well. Now all I need now is the bookmarks &g

Re: django-grappelli setup problem

2009-04-16 Thread Lars Stavholm
So that all went well. Now all I need now is the bookmarks and the sidebar navigation box. They're not visible as of right now and I'm not sure what to do about it. The recommended fixtures are loaded. Any ideas anyone? /L Lars Stavholm wrote: > patrickk wrote: >> line 53 of

Re: django-grappelli setup problem

2009-04-15 Thread Lars Stavholm
structions by Chris Scott, and after a bit of fiddling, presto, I can see the light:) It looks brilliant! /L > On 15 Apr., 20:14, Lars Stavholm <st...@telcotec.se> wrote: >> patrickk wrote: >>> in order to use the admin, just use /admin/ (grappelli doesn´t change >>>

Re: django-grappelli setup problem

2009-04-15 Thread Lars Stavholm
ls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^grappelli/', include('grappelli.urls')), (r'^admin/(.*)', admin.site.root), ) /L > On 15 Apr., 10:06, Lars Stavholm <st...@telcotec.se> wrote: >> patrickk wrote: >>> w

Re: django-grappelli setup problem

2009-04-15 Thread Lars Stavholm
ld be mentioned in the docs, but I guess it´s pretty > obvious. I guess it is, admin up and running nicely without grappelli. /L > On Apr 14, 8:36 pm, Lars Stavholm <st...@telcotec.se> wrote: >> Hi All, >> >> I'm trying to get django-grappelli running, but after followi

django-grappelli setup problem

2009-04-14 Thread Lars Stavholm
Hi All, I'm trying to get django-grappelli running, but after following the installation instructions, I end up with a 404 and the following: Using the URLconf defined in bfact.urls, Django tried these URL patterns, in this order: 1. ^admin/(.*) 2. ^grappelli/ ^bookmark/add/$ 3.

Re: db API where ...or...

2008-12-15 Thread Lars Stavholm
Thanks Tim, works like a charm. /L Tim Chase wrote: >> when combining Django ORM criteria you get >> the "...WHERE...AND..." clauses. >> >> How do I get the "...WHERE...OR..." clauses? >> >> Resorting to raw SQL? > > > Use Q objects and OR them together: > >

Re: Django Forms Date Format

2008-12-15 Thread Lars Stavholm
Aldo wrote: > Yes I have tried that but still nothing - thats what lead me to > looking at this! Try with "USE_I18N = False" in settings.py. Some sort of known issue, I do believe there's a ticket somewhere confirming this. /L > On Dec 15, 3:28 pm, Lars Stavholm <st

db API where ...or...

2008-12-15 Thread Lars Stavholm
Hi all, when combining Django ORM criteria you get the "...WHERE...AND..." clauses. How do I get the "...WHERE...OR..." clauses? Resorting to raw SQL? Kinda' lost, any input appreciated /Lars --~--~-~--~~~---~--~~ You received this message because you are

Re: Django Forms Date Format

2008-12-15 Thread Lars Stavholm
Aldo wrote: > I am using django forms. I have created a model/form with 2 fields, > name and date. > > Prior to saving the form i check if the form is_valid? > > if form.is_valid(): > form.save() > > My problem is it wants the date in the format - MM/DD/ > Otherwise it will not see the

Re: Overriding admin templates

2008-11-27 Thread Lars Stavholm
t checked my settings.py, and batchadmin is last in the list of installed app's, and now it works. /L > On Nov 3, 5:02 am, Lars Stavholm <[EMAIL PROTECTED]> wrote: >> Lars Stavholm wrote: >>> Karen Tracey wrote: >>>> On Sat, Nov 1, 2008 at 5:54 PM, Lars Stavholm

Re: mark_safe() not working for me

2008-11-25 Thread Lars Stavholm
Right you are Daniel, works like a charm, thank you! /L Daniel Roseman wrote: > On Nov 25, 4:50 pm, Lars Stavholm <[EMAIL PROTECTED]> wrote: >> I'm trying to influence one of the admin interface change list >> fields by using the below get_progress() method in list_

mark_safe() not working for me

2008-11-25 Thread Lars Stavholm
I'm trying to influence one of the admin interface change list fields by using the below get_progress() method in list_display, and using mark_safe(). However, I can't get this to work: class Job(models.Model): progress = models.PositiveSmallIntegerField() def get_progress(self):

Progress bar widget

2008-11-24 Thread Lars Stavholm
Hi all, apologies for the newbie question, but... does anyone now if there's any progress bar widget available for a model to be displayed in the admin change list? I'm looking for something that can display for example a PositiveSmallIntegerField (0-100) as a progress bar (or something

Re: Keeping fields out of the Admin

2008-11-20 Thread Lars Stavholm
Epinephrine wrote: > I have a field that should never be edited by hand. It is basically > date_letter_sent, and it should be filled in by a view function when > it sends a letter. > > How can I keep the field from being editable in the Admin edit page > for that class? editable = False in the

Re: admin site problem

2008-11-17 Thread Lars Stavholm
Vicky wrote: > I tried to add some values to my table from admin site. Table has 3 > columns one of integer type and other two of string type. When i tried > to save my entries it giving an error as: > > "coercing to Unicode: need string or buffer, int found" > > How to solve it?

Re: Date Field question -

2008-11-16 Thread Lars Stavholm
Mahesh Vaidya wrote: > Hi, > I am going to used "DateField" in my model. Which format does date > field user is it DD/MM/ (European) or MM/DD/ (American) style > ? and is it customizable ? Have a look at... http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#date-format But

Re: Overriding admin templates

2008-11-03 Thread Lars Stavholm
Lars Stavholm wrote: > Karen Tracey wrote: >> On Sat, Nov 1, 2008 at 5:54 PM, Lars Stavholm <[EMAIL PROTECTED] >> <mailto:[EMAIL PROTECTED]>> wrote: >> >> Low Kian Seong wrote: >> > http://www.djangobook.com/en/1.0/chapter17/ >> >&g

Re: Overriding admin templates

2008-11-03 Thread Lars Stavholm
Karen Tracey wrote: > On Sat, Nov 1, 2008 at 5:54 PM, Lars Stavholm <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > > Low Kian Seong wrote: > > http://www.djangobook.com/en/1.0/chapter17/ > > Yes, thank you, that's it. > >

Re: Overriding admin templates

2008-11-01 Thread Lars Stavholm
Nov 1, 2008 at 6:20 PM, Lars Stavholm <[EMAIL PROTECTED]> wrote: >> Low Kian Seong wrote: >>> You are supposed to put the admin template you want to override in >>> your own template directory definition in settings.py >>> >>> So, if you defined it a

Re: Overriding admin templates

2008-11-01 Thread Lars Stavholm
Low Kian Seong wrote: > You are supposed to put the admin template you want to override in > your own template directory definition in settings.py > > So, if you defined it as /home/stava/ name>/template/admin/change_list.html Huh? /L > On Sat, Nov 1, 2008 at 5:32 PM, Lar

Overriding admin templates

2008-11-01 Thread Lars Stavholm
my app's templates/admin directory, which doesn't feel right. Any input appreciated /Lars Stavholm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: customize TimeField

2008-10-27 Thread Lars Stavholm
Arash wrote: > Hi Everybody, > Could you tell me please how can I customize TimeField. I need to get > ride of the seconds. I don't want seconds to appear on admin interface settings.py: TIME_FORMAT maybe. /L --~--~-~--~~~---~--~~ You received this message

Re: admin DATE_FORMAT not working?

2008-10-24 Thread Lars Stavholm
Low Kian Seong wrote: > Maybe this would shed some light: > http://code.djangoproject.com/ticket/2203 Yup, that explains it, thanks. /L > On Fri, Oct 24, 2008 at 4:57 PM, Lars Stavholm <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > I've got..

admin DATE_FORMAT not working?

2008-10-24 Thread Lars Stavholm
I've got... TIME_ZONE = 'Europe/Stockholm' DATE_FORMAT = "Y-m-d" TIME_FORMAT = "H:i" DATETIME_FORMAT = DATE_FORMAT + " " + TIME_FORMAT ...in my settings.py file, but no joy, these definitions are not used in the admin interface when running the development server. Instead I get the US format or

Re: Foreign key with tons of items

2008-10-23 Thread Lars Stavholm
Fabio Natali wrote: > Fabio Natali wrote: > [...] >> class Prod2(models.Model): >> name = models.CharField(max_length=30) >> >> class Prod1(models.Model): >> name = models.CharField(max_length=30) >> belongs_to = models.ForeignKey(Prod2) >> >> class Prod0(models.Model): >> name =

Newbie help with limit_choices_to on ManyToMany

2008-10-06 Thread Lars Stavholm
Hi All, I'm rather new to django (and python) so I tend to get lost sometimes: I'm looking to limit the choices in a ManyToMany relationship: class Computer(models.Model): host = models.CharField(max_length = 20, unique = True) def __unicode__(self): return self.host class

disable help_text

2008-10-05 Thread Lars Stavholm
Hi All, does anyone know of a way to turn off (disable/replace) the rather long help text message for ManyToManyField's, starting with "Hold down..."? Any input appreciated /Lars --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: UserProfile problem

2008-09-25 Thread Lars Stavholm
that, of course, worked just fine:) Thanks /Lars > On Sep 24, 7:03 pm, Lars Stavholm <[EMAIL PROTECTED]> wrote: >> Running django-1.0 out of svn trunk, just updated today (9084). >> >> I've defined my UserProfile according to the latest documentation: >>

UserProfile problem

2008-09-24 Thread Lars Stavholm
Running django-1.0 out of svn trunk, just updated today (9084). I've defined my UserProfile according to the latest documentation: class UserProfile(models.Model): user = models.ForeignKey(User, unique=True) dep = models.CharField("Department", max_length=20, blank=True) phone

Re: remove ^M: project moved from window to linux

2008-01-12 Thread Lars Stavholm
crybaby wrote: > What is the fastest way to remove ^M from every files in main project > folder and apps folders. Doing it by hand seems time consuming. Is > there a simple script take care of this? if I just leave the ^M in > python code, would it cause problems? If you're on a Linux box

Re: #! ??

2008-01-11 Thread Lars Stavholm
kbochert wrote: > I must be blind!! > > I have 2 files (screen capture from pico) > > > GNU nano 1.3.12 File: tmp2 > > #!/usr/local/bin/python2.5 > > print "Hello" > > > > > GNU nano 1.3.12 File: tmp3 > > #!/usr/local/bin/python2.5 > > print "Hi!" > >

Re: spam

2007-11-06 Thread Lars Stavholm
Michael Best wrote: > Jay Klehr wrote: >> Are the other lists powered by Google Groups? Are they as active as >> Django's list? >> >> Perhaps you should direct your complaints to Google, as I don't think >> the people on this list (or even the owners of the list) can do much >> about it

Re: spam

2007-11-06 Thread Lars Stavholm
Jeffrey Johnson wrote: > This is the ONE list where I consistently get porn spam in gmail. What gives? The format of these porn spam's is new, I do believe the filtering will take care of it soon enough. Takes a few of these to train the spam filter(s). /L > On Nov 6, 2007 9:52 AM

Re: spam

2007-11-06 Thread Lars Stavholm
Derek Anderson wrote: > ok, seriously, is there not something we can do about the porn spam? > some of us read this list at work on machine's we don't own. the image > stuff is becoming a serious problem. I do believe that Google groups are filtering out close to 99% of all spam (sign up for

Re: problem with svn checkout

2007-10-27 Thread Lars Stavholm
Kenneth Gonsalves wrote: > hi, > > I am having problems checking out the latest head (it could be due to > my present flaky internet connection). The failure message is: > > svn: REPORT request failed on '/svn/!svn/vcc/default' > svn: REPORT of '/svn/!svn/vcc/default': 200 OK (http:// >

Re: Multiple primary keys

2007-09-05 Thread Lars Stavholm
Leo wrote: > Lars, have you made any progress on this? I agree that only the Sorry to say: no progress at all:( > numeric types are interesting as multiple keys, so worrying about > URL encoding is pointless (i.e., there's no reason to worry about > supporting multiple arbitrary-string keys).

Re: Multiple primary keys

2007-08-14 Thread Lars Stavholm
Thanks, Michael, I'll give it a try. /Lars Michael Radziej wrote: > Hi Lars, > > I found myself in a similar position, and I'm also coming from the database > side ... funny ;-) > > I have attached a small patch that solved the problem for me and might be a > start for you, but be aware, it's

Re: Multiple primary keys

2007-08-13 Thread Lars Stavholm
Malcolm Tredinnick wrote: > On Tue, 2007-08-14 at 06:51 +0200, Lars Stavholm wrote: >> Malcolm Tredinnick wrote: >>> On Tue, 2007-08-14 at 08:47 +0800, Russell Keith-Magee wrote: >>> [...] >>>> You will have more difficulty with the Admin application and gen

Re: Multiple primary keys

2007-08-13 Thread Lars Stavholm
Malcolm Tredinnick wrote: > On Tue, 2007-08-14 at 08:47 +0800, Russell Keith-Magee wrote: > [...] >> You will have more difficulty with the Admin application and generic >> views. Both of these features rely upon the ability to install URLs >> like: >> >> /path/to/object/42/ -> edit object 42 >>

Multiple primary keys

2007-08-13 Thread Lars Stavholm
Hi all, first of all: django rocks! I'm a database application developer and not a web developer. I'm not even fluent in python. Despite that, the django framework has made it possible for me to develop web based database applications with relative ease. And, I can use the model and the database

Re: model subclassing

2007-07-13 Thread Lars Stavholm
Carl Karsten wrote: > I am experimenting with subclassing a model. The parent class will be an > abstract class that does not get 'managed' by django. Only the subclass > will, > and the table the subclass works with will have all the fields. > > syncdb was able to create the table I

The Book

2007-06-19 Thread Lars Stavholm
Just wanted to let you know that the Django Book seems to be due out June 26th, just got a mail from Amazon. /Lars --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Is composite primary key possible?

2007-06-07 Thread Lars Stavholm
Russell Keith-Magee wrote: > On 6/7/07, Lars Stavholm <[EMAIL PROTECTED]> wrote: >> And then I hit a snag: there's one table that uses a composite >> primary key made up of three fields. (the attachment table in trac.db) >> >> I've scanned the doco and I'v

Is composite primary key possible?

2007-06-06 Thread Lars Stavholm
. (the attachment table in trac.db) I've scanned the doco and I've googled, this is what I came up with: o define one of the fields as a primary o add the unique_together Meta constraint Is there another/better way? Any input appreciated. /Lars Stavholm

Re: SQLite - unsupported file format

2007-05-15 Thread Lars Stavholm
Panos Laganakos wrote: > OS: Mac OS X - 10.4 > SQLite: 3.1.3 > Django: 0.96 > Python: 2.5 > > I've set the DATABASE_ENGINE to 'sqlite3', and the db gets created > when I call > > $manage.py syncdb > > And the project/apps all work fine. > > When I try to connect to it from the commandline

Re: ERD

2007-05-12 Thread Lars Stavholm
Nowell wrote: > I believe you are referring to > http://code.djangoproject.com/wiki/DjangoGraphviz That's the one! Thanks /Lars > On May 12, 3:08 pm, Lars Stavholm <[EMAIL PROTECTED]> wrote: >> Hi all, >> >> I'm going bananas looking

ERD

2007-05-12 Thread Lars Stavholm
the django model and producing a brilliant ER-Diagram of said model. It was a simple python file, .py. Any one know where it can be found? Alternatives? Any help appreciated /Lars Stavholm --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: building a django rpm, probs with adding documentation

2007-03-25 Thread Lars Stavholm
Paul Rauch wrote: > Hello, > > I'm currently building a rpm of django for suse. > > But I can't figure out how to add the documentation, it doesn't get > added, when running "python setup.py build" Assuming that you've unpacked your source with... %prep %setup -q ...you should be able to

Re: Django Cheat Sheet

2007-02-13 Thread Lars Stavholm
John Sutherland wrote: > Hi all, > > Firstly, sorry for the cross-post. > > My employer, Mercurytide [1], as some of you may have seen in the > past, publishes white-papers on a monthly basis. This month it's > another Django themed one: a Django cheat sheet: > >

Re: Django on a server with thin clients

2006-12-14 Thread Lars Stavholm
Joseph Heck wrote: > You can avoid the test database issue by having the students use SQLite as > the database backend. They can store the database in their home directories > and be good to go. > > -joe In addition, depending on your thin client solution, if you start tracd locally on your

Re: How about a real django installer?

2006-11-14 Thread Lars Stavholm
Eugene Lazutkin wrote: > James Bennett wrote: >>> * Windows is apparently a horror story. I don't personally have access >>> to a Windows box (everything I work with is OS X or a Debian-derived >>> Linux distribution), so I don't even know where to begin. >>> >>> Anybody with experience on these

Re: How to svn -co Django sources

2006-11-14 Thread Lars Stavholm
telenieko wrote: > Hi, > From: http://www.djangoproject.com/documentation/install/ > [Installing the > development version], > > svn co > http://code.djangoproject.com/svn/django/trunk/ django_src > ln -s `pwd`/django_src/django