Re: Removing old permissions from auth_permission

2006-08-24 Thread Sean
Call './manage.py shell': from django.contrib.auth.models import Permission for perm in Permission.objects.all(): perm.delete() and then call './manage syncdb' This rebuilds the permission table. If you want it done some other way, you will probably have to wait for the SchemaEvolution

Re: Dynamic Menus...

2006-08-24 Thread Sean
Not really django related, but here goes: It depends on how you want to implement the form. 1. Using javascript and implementing a dynamic option list. You can find enough examples on dynamicdrive.com and other sites 2. Using Javascript an ajax you could hook into the onchange event of the

Re: Passing user.is_superuser through form

2006-08-24 Thread Sean
Just stumbled upon this: http://www.rossp.org/blog/2006/aug/23/changemanipulators-only-part-model/ Could be of use to some. Scott Paul Robertson wrote: > On Thu, Aug 24, 2006 at 10:46:25AM -, cyberco wrote: > >> What works is this: >> >> = >>

Re: Lost in the Admin section...

2006-08-23 Thread Sean Schertell
On Aug 23, 2006, at 5:32 PM, Reinhard Knobelspies wrote: Thanks for all your help so far everyone. So I'm still in search of answers to these questions: (2) The 24 hour clock widget doesn't work for me. This is a nightclub so shows are almost always listed as 7:00pm or 12:30am etc. (am/pm).

Lost in the Admin section...

2006-08-22 Thread Sean Schertell
lepath -- any way to get it to display the actual photo instead? (8) Any way to make the file upload a little nicer? Like to give you some indication that something is happening (ideally a progress bar)? Sorry to overwhelm the list with noobie questions -- I promise to help out other noobs

Re: Django Models, DRY, Scalability

2006-08-22 Thread Sean Perry
bayerj wrote: > As soon as I change my database schema, I have several possibilites to > get my app up again: > (a) Change the model. Then drop the current db schema, fire up the new > one. Drawback: I lose my data. > (b) Change the model and change the schema manually. Drawback: I am > repeating

Re: [Fwd: multiple forms]

2006-08-22 Thread sean
That seems to work, thanks. --~--~-~--~~~---~--~~ 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

Re: Admin section: Possible to integrate image manipulation?

2006-08-21 Thread Sean Schertell
I need. Sean On Aug 22, 2006, at 8:55 AM, Bryan Chow wrote: > > On 8/21/06, Sean Schertell <[EMAIL PROTECTED]> wrote: >> ... I need my client to be able to upload some images in >> the admin section, then have Python do some resizing >> and cropping behind

Admin section: Possible to integrate image manipulation?

2006-08-21 Thread Sean Schertell
for this? Or is there some way to add that kind of functionality to the django admin section? Any tips would be very helpful (this is my first django project). Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

[Fwd: multiple forms]

2006-08-21 Thread Sean
right away? This is probably more a python question than a django-related one Any help appreciated, Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: Easy template vars question

2006-08-18 Thread Sean Schertell
of variables there is the better way to go after all. Thanks for the tips. Sean On Aug 18, 2006, at 5:28 PM, Malcolm Tredinnick wrote: > > On Fri, 2006-08-18 at 12:14 +0900, Sean Schertell wrote: >> Hi folks, >> >> Okay, so I got my little staticpages app working (thanks a

Easy template vars question

2006-08-17 Thread Sean Schertell
t the page title, body id, etc without using blocks and without writing view methods? Cheers, Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: [Solved] Re: Django chokes on template blocks?

2006-08-17 Thread Sean Schertell
Thanks Malcom :-) On Aug 18, 2006, at 10:58 AM, Malcolm Tredinnick wrote: > > On Fri, 2006-08-18 at 09:51 +0900, Sean Schertell wrote: >> Yay!!! It works like magic! >> >> Would anyone be so kind as to reveal the mysteries of this "Context >> ()" f

[Solved] Re: Django chokes on template blocks?

2006-08-17 Thread Sean Schertell
Yay!!! It works like magic! Would anyone be so kind as to reveal the mysteries of this "Context ()" function? I'd love to know what this code is doing and why it fixes my problem. Thanks again everyone -- especially you Adrian H. -- you're too much! :-D Sean On Aug 18, 2006,

Re: Django chokes on template blocks?

2006-08-17 Thread Sean Schertell
rafb.net/paste/results/X5LCeK54.html Sean --~--~-~--~~~---~--~~ 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 g

Django chokes on template blocks?

2006-08-17 Thread Sean Schertell
: - AttributeError at / 'NoneType' object has no attribute 'push' - Huh? Here's a screenshot that should clarify: http://datafly.net/django-error.png Anybody got any idea why I can't use blocks in my templates? What am I doing wrong? :-) Sean

OT: Sort messages by thread in OS X Mail

2006-08-15 Thread Sean Schertell
t select your django mailbox, then choose "sort messages by thread" from the View menu. Neato! I'm sure you can probably do this in Thunderbird, Kmail, etc. But I didn't know OS X Mail had this feature (and it's really nice too).

Re: Yet another "directory sutructure" question

2006-08-15 Thread Sean Schertell
Thanks a lot for the tips Malcolm... "suck and see", eh? Okay, will do ;-) That said, I'm still very interested to see anyone else's approach to this basic organization question. Any other thoughts out there? Cheers, Sean On Aug 16, 2006, at 9:26 AM, Malcolm Tredinnick wrote:

Yet another "directory sutructure" question

2006-08-15 Thread Sean Schertell
(media) goes in www/ Does this seem like a sane/workable approach? Anyone got a better way? Thanks, Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Creating a "mostly static" site with Django -- dumb idea?

2006-08-15 Thread Sean Schertell
Wow! Ask and ye shall receive! TemplatePages is *precisely* what I was looking for :-) I can't wait to get to the office and try it out. Yay! Sean On Aug 16, 2006, at 6:33 AM, Bryan Chow wrote: > > On 8/15/06, Sean Schertell <[EMAIL PROTECTED]> wrote: >> I'd really

Creating a "mostly static" site with Django -- dumb idea?

2006-08-15 Thread Sean Schertell
atic-page6.py blog/ view.py list.py (or something) Am I just totally barking up the wrong tree here? How do you guys do it? Thanks! Sean --~--~-~--~~~---~--~~ You received this message b

Re: put some initial data in the db

2006-08-02 Thread Sean
You could try this: http://www.djangoproject.com/documentation/django_admin/#sqlinitialdata-appname-appname Sean Gennan Chen wrote: > Hi! > > is there any way to put some initial data in the db by using "syncdb" > option? Or I need to

Re: hiding fields in admin

2006-07-27 Thread sean
You should fix those things, editable didn't work because 'False' with quotes isn't a valid boolean value. The prepopulate is probably not necessary, because all it does is include some javascript that fills the field for you as you edit the other fields. Best just to overrride the save method

Re: hiding fields in admin

2006-07-27 Thread Sean
That's weird, because it hides it for me. I have a field like this: objects_path = models.CharField(maxlength=50, null=True, editable=False) and it is clearly not visible in the admin. Tamara D. Snyder wrote: > It just makes the field not editable. Actually, it looks like you > can edit the

Re: hiding fields in admin

2006-07-26 Thread Sean
Tamara D. Snyder wrote: > Thank you, this works pretty well. > > Actually, "editable=false" does not hide the field from the admin > But what else does it do? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: hiding fields in admin

2006-07-26 Thread Sean
Maybe you would want the "editable=False" parameter in your model, which hides the field from the admin. Then simply populate the field in the save method. Tamara D. Snyder wrote: > Hi all, > > In my "Event" model I have a slug field that is automatically > generated from another field. I

Re: Related objects in generic views

2006-07-26 Thread Sean
j.objects.all().get(pk=..) behind the scene. Thanks again for the clarification. Regards, Sean --~--~-~--~~~---~--~~ 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: render_to_response equivalent in urls.py?

2006-07-25 Thread Sean
Could you be looking for something like direct-to-template? http://www.djangoproject.com/documentation/generic_views/#django-views-generic-simple-direct-to-template Guillermo Fernandez Castellanos wrote: > hi, > > I have an index.html file with django template language. > I could do a wrapper

Re: Simple: How do you organize your directories?

2006-07-25 Thread Sean Schertell
Thanks guys! Very helpful tips :-) Sean On Jul 25, 2006, at 6:03 PM, Ivan Sagalaev wrote: > > Sean Schertell wrote: >> In the tutorial, it says to not keep your app in the document root >> for security reasons. Okay that makes sense. But what *does* go in >> the docum

Simple: How do you organize your directories?

2006-07-25 Thread Sean Schertell
/ application/ public/ ...then just configure my vhosts to serve whatever.com/public as the document root. Is this a good way to do it in Django? Thanks, Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Related objects in generic views

2006-07-24 Thread sean
. In the tutorial the info_dict is built with something like Polls.objects.all(). Is this query ever evaluated, because it would seem a waste of ressources to select all objects just to get the object_detail view to work? It seems to me that I am missing something quite obvious. regards, sean Malcolm

Related objects in generic views

2006-07-24 Thread sean
+)/$', 'django.views.generic.list_detail.object_list', info_dict), Any suggestions? thanks, sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: Rich HTML Editting in Admin Interface

2006-07-23 Thread sean
You might want to try one of these approaches: http://code.djangoproject.com/wiki/CookBookAdminTools I haven't tried any of these yet myself, but those links could be a starting point. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Any good Python book recommendations?

2006-07-23 Thread Sean Schertell
Thanks all, I'm leaning towards "Beginning Python: From Novice to Professional". The Amazon reviews sound right up my alley. Anyone had any experience with this one? Sean On Jul 23, 2006, at 3:11 PM, Alessandro Bottoni wrote: > > Sean Schertell ha scritto: >> An

Any good Python book recommendations?

2006-07-22 Thread Sean Schertell
Hi guys, I've downloaded Dive into Python and it looks good. But I need something I can read on the subway or in the bathtub. Something I can dog-ear and highlight -- a real book! Any recommendations? I'm brand new to Python and want to learn for use with Django. Thanks! Sean

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

2006-07-22 Thread Sean Schertell
my hands a little dirty. Anyway cheers for the tips! Sean --~--~-~--~~~---~--~~ 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 unsubs

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

2006-07-20 Thread Sean Schertell
Thanks so much for your reply Adrian! Can you also please comment a bit on how well Django works in a shared environment? > How about memory footprint? Can I run 100+ > Django sites on a shared server and expect smooth sailing? Thanks!

Is Django the framework I've been looking for?

2006-07-20 Thread Sean Schertell
Sorry for the looong post. Any feedback at all would be very much appreciated! Cheers! Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

Re: Alternative to PIL (Python Imaging Library)?

2006-07-13 Thread Sean Perry
Carlos Yoder wrote: >>> Is there a way around PIL? Can Django use another kind of library? If >>> not, has anyone got around this? Maybe by getting a precompiled Linux >>> PIL? > >> http://packages.debian.org/unstable/python/python-imaging >> ? > > Don't think so. I don't have root access to my

Re: Splitting the databases

2006-06-23 Thread sean
don't do any harm, but as I use postgresql I'm kind of worried that the autovacuum function bails out and somehow leaves the db in an unstable state. This has improved a lot in recent versions, but there still seem to be some problems from time to time. sean Jay Parlar wrote: > Jason Pelle

Re: Splitting the databases

2006-06-23 Thread sean
Ok. Thanks for the quick reply. --~--~-~--~~~---~--~~ 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

Re: installing docutils on Dreamhost

2006-06-04 Thread Sean R.
Hello - I'll be releasing a full howto on django and Dreamhost (yeah another one) later this week. It will show how to handle docutils and all those other packages with much less work. I'll post here whenever I've cleaned it up. -- Sean R. RĂ©mi wrote: > On 2 Jun 2006, at 18:31, [EM

Re: Adding a specialized database type

2006-05-29 Thread Sean
s probably not really good, but I can't really tell, because at the moment the site is for internal use only. Would be interesting to see some other solutions. cheers, Sean Scott Anderson wrote: > Hi all, > > I'd like to add a specialized data type for PostgreSQL: the > contrib/ltre

Re: authentication style select box

2006-05-17 Thread Sean
: > Sean, > > You're looking for the filter_interface argument for the ManyToManyField: > http://www.djangoproject.com/documentation/model_api/#many-to-many-relationships > > On 5/17/06, Sean <[EMAIL PROTECTED]> wrote: > >> Hi, >> I was wondering if the search

authentication style select box

2006-05-17 Thread Sean
n't feel up to the challenge to hack that into admin. cheers, Sean --~--~-~--~~~---~--~~ 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 T

Re: Tutorial 2 - Admin

2006-05-03 Thread Sean Perry
Luke Plant wrote: > On Wednesday 03 May 2006 17:51, Kenneth Gonsalves wrote: > >> when making major upgrades, sometimes old .pyc files remain giving >> errors like this. Nuking subversion is the best solution > > Or, if you use *nix this will be a bit less drastic and faster: > > find

trunk doc confusion

2006-05-03 Thread Sean Perry
Following the new tutorial this morning I ran into a few problems: * tutorial and other docs go back and forth between Poll and Blog apps. Choosing one would be nice. * __str__ vs __repr__ The tutorial01 says defining __str__ will then cause Model.objects.all() to show a human readable string,

Re: create models from the admin page?

2006-05-03 Thread Sean Perry
James Bennett wrote: > Going further, it seems to me that, rather than encouraging the design > of good, well-thought-out models, building models through a web > interface would encourage a slapdash "if we get it wrong we'll just go > into the web interface and change it" mentality, which would

db-api.txt bug

2006-05-03 Thread Sean Perry
save_FOO_file(filename, raw_contents) - For every ``FileField``, the object will have a ``get_FOO_filename()`` method, where ``FOO`` is the name of the field. This saves the given file to the filesystem, using the given filename. If a file with the given

Re: Upcoming project... 0.91 or svn or magic-removal?

2006-02-08 Thread Sean Perry
ToddG wrote: I'm going to be starting a project in the next few weeks, and I was wondering what people recommend building on at this point. I've been exploring with the svn of trunk, but I'm not sure on what version of the codebase would be best to start a "real" project with. Any suggestions?

Re: rss problem

2006-01-26 Thread Sean Perry
While on the subject, my Nokia 770's RSS reader always believes there are new versions available of the main Django and the Django community blogs.

Re: making photo gallery

2006-01-05 Thread Sean Perry
Sean Perry wrote: Kevin wrote: return map(*([None] + [value[i::cols] for i in range(0, cols)])) Nice, but why use all of that magic? return [value[i:i+cols] for i in range(0, len(value), 4)] your version actually returns [(1,2), (3,4)], iow a list of tuples. where that last 4

Re: making photo gallery

2006-01-05 Thread Sean Perry
Kevin wrote: return map(*([None] + [value[i::cols] for i in range(0, cols)])) Nice, but why use all of that magic? return [value[i:i+cols] for i in range(0, len(value), 4)] your version actually returns [(1,2), (3,4)], iow a list of tuples.

Re: understanding regroup

2005-11-15 Thread Sean Perry
Robert Wittams wrote: Would: {% regroup user.get_thing_list|dictsort:"category_id" by category_id as grouped %} {% for category in grouped %} {{ category.list.0.get_category.description }} {% for entry in category.list %} {% endfor %}

Re: no one-to-many methods?

2005-10-23 Thread Sean Cazzell
obvious it was the reload and not the changed import that fixed things! Mea Culpa, Sean Cazzell Adrian Holovaty wrote: On 10/21/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: You won't have the get_reporter() method unless you have also imported the reporter module. That is, if you j

<    1   2   3