creating a composite primary key, for a field that isn't in the database...

2009-06-10 Thread tonemcd
Hi all, We have a situation where; 1. we have a database that has several tables that use composite primary keys 2. the database *cannot* be munged to add an auto increment integer field (sadly, otherwise this would be a very short post) 3. we don't need to write back to the database 4. we don't n

Re: Newcastle, UK Django positions (was "Some django-based jobs available")

2009-04-16 Thread tonemcd
n over which we have no control. They've obviously not heard of SEO! Regarding the jobs: I don't think we can go for telecommuting at the moment, but it's something we're willing to consider in the future. thanks again for your help, Tone On Apr 16, 1:55 pm, Tim Chase wr

Some django-based jobs available

2009-04-16 Thread tonemcd
I hope I'm not breaching etiquette here. We have two jobs going at the moment, where a large proportion of the work will be in Django. To apply, you *must* go through our University online system. Sorry about that. The URLs are; Infrastructure Development Officer: http://is.gd/sJW9 and Web Dev

Re: _clone method in list_detail (generic views) loses information?

2009-03-30 Thread tonemcd
rties extensively before and it never occurred to me to use them this time sigh. Cheers, Tone On Mar 30, 12:38 pm, tonemcd wrote: > Hi, > I'm used to doing things like this; > > resources = Resource.objects.all() > for resource in resources: >     if reso

_clone method in list_detail (generic views) loses information?

2009-03-30 Thread tonemcd
Hi, I'm used to doing things like this; resources = Resource.objects.all() for resource in resources: if resource.thetype == 'url': resource.link = '/access/redirect?location=%s' % resource.uuid else: resource.link = '/access/download/%s/%s' % (resource.uuid, resource.file

Any django training available in the UK?

2008-10-26 Thread tonemcd
Hi all, Is anyone doing any django training in the UK? I need F2F and possibly remote *as backup to F2F* for my team. They are very familiar with Zope, and we are a linux-based shop. We have facilities on-site for training. We are based in the North East of England. Please get in contact and I

Re: Django new comments framework error

2008-08-30 Thread tonemcd
...and of course, I find that http://code.djangoproject.com/ticket/8221 is now fixed! That should help clear up an awful lot of confusion. As of r8672, it's in the trunk. Cheers, Tone On Aug 29, 7:40 am, tonemcd <[EMAIL PROTECTED]> wrote: > Also > seehttp://groups.google

Re: Photologue Error: NoReverseMatch -- Reverse for 'pl-gallery' not found.

2008-08-30 Thread tonemcd
The link would help :rolls eyes: http://groups.google.com/group/django-users/browse_thread/thread/eb5db61766a5dc07/a32ec2de4bd9ff0f?lnk=gst&q=noReverseMatch#a32ec2de4bd9ff0f On Aug 30, 3:12 pm, tonemcd <[EMAIL PROTECTED]> wrote: > Check out this link, apply the patch and I think y

Re: Photologue Error: NoReverseMatch -- Reverse for 'pl-gallery' not found.

2008-08-30 Thread tonemcd
Check out this link, apply the patch and I think you'll see the problem (basically, whatever is being passed to {% url ... %} does not match the regex in urls.py). Cheers, Tone On Aug 30, 12:25 am, Jacolyte <[EMAIL PROTECTED]> wrote: > Here's a pastebin of the traceback:http://pastebin.com/m43f

Re: Django new comments framework error

2008-08-28 Thread tonemcd
Also see http://groups.google.com/group/django-users/browse_thread/thread/1f4bb991f9f0f7b5/62005ad4330c4884?lnk=gst&q=noReverseMatch#62005ad4330c4884 Short summary: maybe your named url regexes aren't matching the variables passed to them in the {% url ... %} tag. Apply the patch from http://cod

Re: Random NoReverseMatch

2008-08-28 Thread tonemcd
#x27; with arguments '(u'st4gp4&5',)' and keyword arguments '{}' not found. Now *that* would have saved a heap of time earlier on today ;) Ticket 8221 is down for the 1.0 release, so hopefully, we'll have that in trunk ready for the big release of V1.0. HTH

Re: site using Django/mod_python/apache2 randomly showing "It worked!" page

2008-08-28 Thread tonemcd
Does Apache have mod_wsgi? If so, you can get them to make a change to your .conf file as detailed at http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode This means you only need to 'touch' the .wsgi file specified by the WSGIScriptAlias to get your Apache process to restart. Works a treat

Re: Random NoReverseMatch

2008-08-28 Thread tonemcd
Well, this bit me a while back when I svn-up'ed from trunk and I got fed up of changing my django.pth to point to trunk_r7971, so I was determined to get it sorted out. The first thing is that the NoReverseMatch error seems to be a catch- all for a variety of exceptions, so if you can, check out

Re: Having trouble with per-view caching

2007-11-04 Thread tonemcd
Hugo, check this out:- http://groups.google.com/group/django-users/msg/581a32c198e6ae07 Not sure cache decorators have arguments... Cheers, Tone On Nov 4, 11:13 pm, "Hugh Bien" <[EMAIL PROTECTED]> wrote: > Hi, > I've emailed a few questions to this mailing list already and I've gotten > great

Re: ADMIN_MEDIA_PREFIX setting weirdness

2007-09-29 Thread tonemcd
This may not be relevant, but I've had no end of confusion with ADMIN_MEDIA_PREFIX. What I've found is this; If you're running the development server, the value of ADMIN_MEDIA_PREFIX is effectively ignored. Look at the code in django/ core/servers/basehttp.py, in AdminMediaHandler and you'll see

Re: can´t do django update: propfind request failed

2007-09-23 Thread tonemcd
Check your ~/.subversion/servers file. Any proxy requirements (such as would be in the environment variable 'http_proxy') need to be replicated there. ie ... ... [global] # http-proxy-exceptions = *.exception.com, www.internal-site.org http-proxy-host = yourcache.yoursite.com http-proxy-port = 80

Re: Need Customized Forms which look very much like Django admin interface ...

2007-01-25 Thread tonemcd
Drat! - I went into auto-reply mode there. You're quite right, it's oldforms and I haven' updated it for the newforms framework (in fact, I don't know where to start). Tone On Jan 25, 4:25 pm, "Michel Thadeu Sabchuk" <[EMAIL PROTECTED]> wrote: > Hi! > > > See > > here:http://groups.google.com/g

Re: Need Customized Forms which look very much like Django admin interface ...

2007-01-25 Thread tonemcd
See here: http://groups.google.com/group/django-users/browse_frm/thread/3328829f1ed7f788/a980f983c5fc1bad Cheers, Tone On Jan 25, 8:01 am, "Praveen Swaminathan" <[EMAIL PROTECTED]> wrote: > I am trying to write a form which has multiple elements. One of them is a > Date field. How do I do it so

Re: How to create a simple PDF

2007-01-16 Thread tonemcd
I was going to suggest looking at a Java-based system called Jasper reports, which we got into because we found ourselves spending too much time writing ReportLab scripts to generate PDFs (Jasper has a wysiwyg interface and connects to databases directly). However, seeing Chris' email reminded m

Re: ViewDoesNotExist at /admin/

2006-12-20 Thread tonemcd
Two things; 1) you don't have anything setup in TEMPLATE_DIRS - may be important... 2) what does this give you; % ls -l /home/miiandu/django_src/django/contrib you want admin to look something like this; ... drwxr-xr-x 7 miiandyou 4096 Dec 4 18:19 admin ... and; % ls -l /home/miiandu/django

gotapi.com - python there, no django (yet)

2006-12-09 Thread tonemcd
http://www.gotapi.com/ - very neat, lots of APIs to go through (HTML, Javascript etc) and now including python. No django as yet. :( However, you can't download copies of XML formats to see how others have done it (eg python). Cheers, Tone --~--~-~--~~~---~--~~

Re: Simple CAS 1.0 authentication

2006-12-04 Thread tonemcd
Brian, Just a quick note to say *thankyou very much* for making this available. I installed it into one of my development sites over the weekend and it works like a charm. I only tried the middleware version (which is probably more appropriate for an authentication backend) and found it to work ju

Re: Database optmization guru needed...

2006-11-18 Thread tonemcd
Perhaps something from here will help? http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/59883 Where your list is an xrange(min...max) of id's from your database table. That is, do it in python, not with your database... Or maybe this, http://www.petefreitag.com/item/466.cfm - which *does

advice needed - how to manage 100+ django sites in a scaleable, manageable setup

2006-10-17 Thread tonemcd
Hi all, We're about to put our first django site online on Monday, which is a major departure for us. We currently host 100+ Zope instances, almost all of which are load balanced over more than one physical server using pound. Our databases are MySQL and increasingly, PostgreSQL, and these are als

Re: Having problems getting started with Zyons

2006-07-19 Thread tonemcd
Quick update, Ian has updated the source in svn to fix the glitch. I've svn-uped and it everything is hunky-dory... Thanks very much Ian, from a reported glitch at 10:16 through to resolution by 12:31. Nice one! Cheers, Tone --~--~-~--~~~---~--~~ You received t

Re: Having problems getting started with Zyons

2006-07-19 Thread tonemcd
I've posted a ticket at http://zyons.python-hosting.com/ticket/3 with a description of the problem and a possible solution based on the SQL alias. Funny, I would have thought there were more MySQL 4.0-4.1 people around than that (which would have shown the glitch earlier), guess I really do need

Re: Having problems getting started with Zyons

2006-07-19 Thread tonemcd
Thanks Ian, Malcolm, this works!; mysql> select content_type_id, object_id, sum( unique_views) as sum_uv from counter_objecthourcounter where site_id=1 and effective_date >= '2006-07-18 09:50:07' and content_type_id in (30) group by content_type_id, object_id order by sum_uv desc LIMIT 40; Emp

Re: Having problems getting started with Zyons

2006-07-19 Thread tonemcd
I dug around a little, http://archives.neohapsis.com/archives/mysql/2005-q2/1966.html";>this helped a lot - and I found that this works (4.1.18-standard); mysql> select content_type_id, object_id, sum( unique_views) from counter_objecthourcounter where site_id=1 and effective_date >= '2006-07-1

Re: Having problems getting started with Zyons

2006-07-19 Thread tonemcd
Ian, I think that's it - it definitely causes an SQL error on MySQL 4.1.18-standard. Drat. Our main systems (where I intend to run django 'for real') are stuck on the 4.1 series for the time being (hence why my machine is still running 4.1.18-standard). However, as I make the final decisions on w

Re: Having problems getting started with Zyons

2006-07-19 Thread tonemcd
Sorry Ian, I didn't mean to diss your application in the main discusssion forum! I just thought it might be a stupid user problem (I couldn't find it in the zyons.com forum). I've been watching the development of zyons for a while with a view to using it for the first stage of our Zope migration

Having problems getting started with Zyons

2006-07-19 Thread tonemcd
Hi all, I'm trying to get the Zyons community/bulletin board system up and running - we think it could be extremely useful for a large part of our education community, and will assist us in migrating from Zope to Django. Trouble is, I can't get it to work on my machine (MacBook Pro, Python 2.4.3/M

Re: Wiki or Blogs done with django

2006-05-29 Thread tonemcd
Possibly the quickest blog to get up and running is by Ross Poulton - http://www.rossp.org/ - his code has not had the magic removed yet though... Paul Bissex - http://e-scribe.com/news/171 - has done a *very* small Wiki implementation. Cheers, Tone --~--~-~--~~~---

Feedjack - A Django+Python Powered Feed Aggregator (Planet)

2006-05-28 Thread tonemcd
Now this looks like a really cool django application. http://tabo.aurealsys.com/software/feedjack/ Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Re: Limiting selection in admin pages [NEWBIE]

2006-05-16 Thread tonemcd
Good question - short answer is it's not anything I tried to do, so I don't know... Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-use

Re: Limiting selection in admin pages [NEWBIE]

2006-05-16 Thread tonemcd
Sorry Q, I forgot to add the WorkGroup definition; class WorkGroup(models.Model): groupName = models.CharField(maxlength=50) def __str__(self): return "%s" % self.groupName That's where the 'groupName' is coming from in my lookup. I'm using rev 2900 (ie the merged MR trunk) so

Re: Limiting selection in admin pages [NEWBIE]

2006-05-15 Thread tonemcd
This works (it's the pa - personal assistant - bit you want); class Person(models.Model): firstName = models.CharField(maxlength=50) lastName = models.CharField(maxlength=50) organization = models.ManyToManyField(Organization, related_name = 'organization') emailAddress = models.E

Re: ANN: magic-removal branch merged to trunk

2006-05-02 Thread tonemcd
Ditto to that - I've been watching the activity on code.djangoproject.com, and there's been a huge amount of work done recently. Thanks again guys, this is a great framework! Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: FileField fieldRequired error

2006-05-02 Thread tonemcd
Take it easy You'll not make friends if people think you're shouting... This works for me with an ImageFile field. FileField should work the same... Template snippet: Title: {{ form.title }} Post date: {{ form.postdate_date }} Post tim

Re: Google SoC: Call for student applications

2006-05-02 Thread tonemcd
There's some seriously cool projects in that list! --~--~-~--~~~---~--~~ 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 gr

Re: Passing variables to include?

2006-04-21 Thread tonemcd
And enlightenment descends ;) Cheers for the pointer Ivan! Tone --~--~-~--~~~---~--~~ 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 unsubscri

Re: Passing variables to include?

2006-04-21 Thread tonemcd
I don't understand why a more generic form of this tag isn't available; {% datatofillinthetemplate "templates/macrosnippet.html" %} Is there a philosophical reason why this doesn't exist? Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you

Re: Trac error on code.djangoproject.com

2006-04-20 Thread tonemcd
It's back online and all is well with the world... Cheers, Tone --~--~-~--~~~---~--~~ 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 unsubscrib

Re: Django vs Rails

2006-04-13 Thread tonemcd
That's a really good screencast - the Java-based frameworks come out particularly badly (but the author is looking more at the rapid applications development model, where multiple XML configs and compiling certainly doesn't help matters) I was surprised at how well Zope (Plone actually) comes out

Re: Feed rss and xml

2006-04-10 Thread tonemcd
Err, before running off into XSL land, you might want to try a few things beforehand. Why not add some CSS to your XML feed, many newer browsers will render the XML using the CSS to give a human-readable output. I'd definitely do that before getting involved with XSL transforms (you'll likely ha

Re: Query for "missing" information

2006-04-10 Thread tonemcd
Dunno about the ORM, but the DB API exposes raw 'selects' as well; http://www.djangoproject.com/documentation/db_api/ (under 'Other Lookup Options') Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: Modify pulldown contents in admin interface

2006-04-10 Thread tonemcd
If you're using magic removal, this thread outlines a nice solution; http://groups.google.com/group/django-users/browse_frm/thread/f8dace4668c0c2b1/d9ad4190912c0bd1?q=limit_choices_to&rnum=3#d9ad4190912c0bd1 Cheers, Tone --~--~-~--~~~---~--~~ You received this m

Re: Advice on 'voting' system that excludes previous voters

2006-04-09 Thread tonemcd
Ok, really last post... There's a problem with my code, voter.id is not right, voter.voter_id is correct. def alreadyvoted(post, voterid): voters = post.vote_set.all() print "len(voters)", len(voters) for voter in voters: print "voter:", post, voter.id, vo

Re: Advice on 'voting' system that excludes previous voters

2006-04-09 Thread tonemcd
Now this is getting silly ;) But, there is one thing I'd like to add. By adding the logic into the view and adding a new attribute, 'alreadyvoted', to my existing model, I've managed to make the template very light. This is very different from the sort of thing you would do in Zope (using PageTem

Re: Advice on 'voting' system that excludes previous voters

2006-04-09 Thread tonemcd
Replying to your own posts is so uncool ;) Here's something that works, I have no idea whether it's efficient or not - any ideas?. This code is in my views.py Essentially what's happening is that I'm adding another attribute called 'alreadyvoted' to each one of the 'posts'. This is then availab

Advice on 'voting' system that excludes previous voters

2006-04-09 Thread tonemcd
Hi all, I am working on a voting system based on a model with three classes, Post (the thing people will be voting on), Vote (the vote itself) and Person (the voter and the poster). I've put simplified version at the end of this post. To get all the posts, I use posts = Post.objects.all() in my v

Re: Relationship with self with relationship data in app.py

2006-04-04 Thread tonemcd
I wish I'd known about the forward reference method a bit earlier, would have saved a lot of hair-pulling. It seems that most of my hiccups with django seem to be related to data models and accessing that data using the ORM (I'm a Zope guy, and you don't do it that way there...) Cheers, Tone --

Re: 0.91 vs SVN vs m-r

2006-04-04 Thread tonemcd
This is another +1 for MR. It is a 'moving target', but it's not that bad to keep up with, and the benefits (cleaner DB API, properties in models etc) are well worth having. Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Brain fried - need help with M2M and MR

2006-04-03 Thread tonemcd
Yes, of course - it all makes sense now after some sleep. Thanks for the hint on ipython Luke, I've had it installed for ages wth django, and it is *extremely* helpful, but I just couldn't see the wood for the trees. For the record for anyone else doing this, here's how I did it with generic vie

Re: Brain fried - need help with M2M and MR

2006-04-03 Thread tonemcd
<2001> It's all so much clearer to me now... My headache has cleared up now, and I can see exactly what you mean Derek. It works fine now, thanks! Here's a snippet for others; urls.py (r'^electives/tag/(?P[0-9A-Za-z-]+)', 'site1.elective.views.tag'), site1.electives.views.tag def tag(re

Brain fried - need help with M2M and MR

2006-04-03 Thread tonemcd
My head hurts (really, it does, I think I've given myself a headache trying to figure this out) I'm using magic-removal and have a 'simple' model for a tag-based posting system (which will turn into a voting and image uploading system). Here's the model (slightly cut down to save space); class

Re: Anyone using RazorLogix for hosting?

2006-04-02 Thread tonemcd
Hmm, I've had Zope instances that grow to 2 gigs of memory (but are mainly around the 200-300 Meg region). Most of our Apache instances have been about 2-8 Megs (php and gd installed), but I've not done work with mod_python yet, so I have no numbers there. Thanks for the info. Tone. --~--~

Re: mini-wiki advice

2006-04-02 Thread tonemcd
Here's something I'm using in an application - it uses the 'Textile' engine so that the person entering the markup doesn't have to worry about HTML. Works well! It's in a model, and this is all MR by the way; class Person(models.Model): ... expectations = models.TextField('Expectations body'

Re: How to exclude in limit_choices_to (magic removal)

2006-04-02 Thread tonemcd
Same here Jacob - can you shed some light on this please? - ;) (ie __exclude doesn't work) Cheers, Tone --~--~-~--~~~---~--~~ 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: A model which is recursively referring to itself in Magic Removal

2006-04-02 Thread tonemcd
Yes, it's definitely MR - revision 2530 - I just 'svn up' to 2605 and the admin interface still works the same. I've just realised that's not what your problem is, although there are plenty of posts where the word 'parent' is mentioned... Here's the relevant model definitions for a 'Person'. Work

Re: A model which is recursively referring to itself in Magic Removal

2006-04-02 Thread tonemcd
Try replacing 'Item' with 'self' - that works for me. Cheers, Tone --~--~-~--~~~---~--~~ 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 unsubsc

Re: How to exclude in limit_choices_to (magic removal)

2006-04-02 Thread tonemcd
I tried __ne and (somewhat naively) __exclude and neither works. The Wiki documentation at http://code.djangoproject.com/wiki/RemovingTheMagic#Changedtemplatenamesingenericviews says that 'ne is no longer a valid lookup type' I had a look around and in the MR version of the file db/backends/mysq

Anyone using RazorLogix for hosting?

2006-04-01 Thread tonemcd
Hi all, Razorlogix, http://www.razorlogix.net/?do=features, looks quite a neat hosting service (mod_python, one slick installs for django, trac, svn, MySQL and PostGres etc.) Does anyone have any opinions on them? Thanks a lot in advance, Tone. --~--~-~--~~~---~--~-

Re: limit_choices_to

2006-03-27 Thread tonemcd
Well Luke (the author) might have a better idea than me, but I'll have a go ;) Put it anywhere in your applications folder structure, Luke chose cciw/middleware because his app is called 'cciw' - but it doesn't matter because in his model file, he has the following... .. ... import cciw.middlewa

Re: Assigning default value for field in admin

2006-03-26 Thread tonemcd
This looks like it might help, http://lukeplant.me.uk/blog.php?id=1107301634 although it's not exactly what you're after... Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Showing admin-style forms on regular user forms?

2006-03-26 Thread tonemcd
Check this out - http://groups.google.com/group/django-users/browse_frm/thread/3328829f1ed7f788/a980f983c5fc1bad It's very rushed, as I was on the way to the airport and just wanted to get the post made before I forgot it, but it does work... Cheers, Tone --~--~-~--~~~-

Re: limit_choices_to

2006-03-26 Thread tonemcd
I think that this http://lukeplant.me.uk/blog.php?id=1107301634 might be helpful. There's also been some traffic on limit_choices_to in the group recently (although not strictly relevent to your problem I think) Cheers, Tone --~--~-~--~~~---~--~~ You received thi

Re: Advice on developing with django for a team of 10+

2006-03-25 Thread tonemcd
Ah, that explains things, thanks for that Fredrik. I guess I'm showing my Zope roots - not too much is done on the command line with Zope ;) Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django use

Re: SQL Debugging and limit_choices_to in MR Branch

2006-03-23 Thread tonemcd
Way-Hay!, this works pa = models.ForeignKey("self", blank=True, null=True, limit_choices_to = {'groups__groupName__exact' : 'Administration'}) # PA for this person Now the only people who are in the popup are those who are in the group 'Administration'. Very neat ;) Cheers, Tone --~--~--

Re: Advice on developing with django for a team of 10+

2006-03-23 Thread tonemcd
I'm still finding my feet with svn Eric ;) I don't want my .pyc files being put into the repository, and I thought a recursive svn property ignore would do the trick. I used the info from http://www.nedbatchelder.com/text/quicksvn.html, specifically; $ svn propset -R svn:ignore . -F ignore.txt

Re: Django API doc

2006-03-23 Thread tonemcd
Daniel, this is terrific work!, I definitely agree with John that you should file this into trac. I can see it saving people a mountain of time! Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: SQL Debugging and limit_choices_to in MR Branch

2006-03-23 Thread tonemcd
Thanks for the patch ChaosKCW, I still can't get this to work though, pa = models.ForeignKey("self", blank=True, null=True, limit_choices_to = {'groups__exact' : 'Administration'}) # PA for this person I'm now getting mesages about an m2m table not existing. What I'd like to do is some

Re: Help getting admin and non-admin app running in Apache

2006-03-23 Thread tonemcd
I've found that it's better to have __repr__ return a string whether our not the field is a string or not; def __repr__(self): return "%s" % self.modelField hth Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: Advice on developing with django for a team of 10+

2006-03-23 Thread tonemcd
Oooh, now that's neat. My own tinkering with svn to ignore .pyc files hasn't worked out so well... % svn proplist Properties on '.': svn:ignore % svn st M magic/site1/modeltest/models.pyc hmmm... --~--~-~--~~~---~--~~ You received this message because you

Re: SQL Debugging and limit_choices_to in MR Branch

2006-03-21 Thread tonemcd
I have a similar problem with limit_choices_to and MR. Within the admin interface I'd like to limit the choices for a persons 'personalAssistant' to come from a group called 'Administration'. At the moment, it doesn't work, all 'Persons' are shown in the 'personalAssistant' popup, and I know I ha

Re: Recursive ForeignKey with blank=True

2006-03-19 Thread tonemcd
This works for me David, class Staff(models.Model): name = models.CharField(maxlength=50) reportsTo = models.ForeignKey("self", blank=True, null=True) def __repr__(self): return "%s" % self.name class Admin: list_display = ('name',) This is with the magic-remova

Re: django for sysadmin

2006-03-16 Thread tonemcd
Come on Kenneth, you can't post something like that without providing *something* like a screenshot or more details? ;) Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Advice on developing with django for a team of 10+

2006-03-16 Thread tonemcd
Hi Eric! ;) 1. Well, you certainly have an interesting setup there - it's similar to something I was thinking we would have to do. I use OS-X and am *very* aware of what's needed to get mod_python and postgres working on that platform ;) - at the moment I'm using the development server, and that

Re: Advice on developing with django for a team of 10+

2006-03-16 Thread tonemcd
Julio, This is really helpful - thanks very much for the information. We're very used to having NFS mounts and the three platforms we use; PC, Mac and Linux, can all access that very well, so we can access file structures in the way you've outlined. As for Apache rewrites, we've been doing those

Re: Advice on developing with django for a team of 10+

2006-03-16 Thread tonemcd
Our developers get involved in a lot of projects Tom - so it's almost a combinatorial explosion situation! I've been using subversion to get the latest django updates and have found it pretty approachable, so that's a big plus. We've not decided on django yet ;) there's still Zope3, TurboGears a

Advice on developing with django for a team of 10+

2006-03-16 Thread tonemcd
Hi, Hopefully, by this time next week we will have a dedicated server (Sunfire 4100) running django and support stuff. I'd then like to start developing new applications as soon as possible after that. I've been playing around with django on my AlPB for about 6 months now and have learnt a fair b

Re: magic-removal: from django.parts.media.photos import get_thumbnail_url

2006-03-15 Thread tonemcd
Jeremy, You might want to raise a ticket on this so the development team will know about it. Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to d

Re: Changing filenames on an upload...

2006-03-12 Thread tonemcd
Ahhh... Should have said I was using magic-removal, and that this is within the admin interface. The reason for the uuid filename is because I'm thinking of having a lot of files uploaded and I could end up with dozens of files called 'TEST.DOC' and this is one way of guaranteeing that the filen

Changing filenames on an upload...

2006-03-12 Thread tonemcd
Hi all, I have this model class Photo(models.Model): name = models.CharField(maxlength=20) image = models.ImageField(upload_to="cetl/") def save(self): import commands self.image = 'cetl/%s' % commands.getoutput("uuidgen") super(Photo, self).save() def __

Re: table needs all fields filled in?

2006-03-09 Thread tonemcd
Hi, blank=True should allow you to submit a partially-filled form, but you have a lot of core=True fields in there as well, perhaps you have too many? From the Model Reference documentation http://www.djangoproject.com/documentation/model_api/; core For objects that are edited inline to a related

Re: Django filter hack

2006-03-08 Thread tonemcd
This is very nice - very helpful! Cheers, Tone --~--~-~--~~~---~--~~ 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

Re: Attn. Dreamhost users

2006-03-08 Thread tonemcd
Doesn't DreamHost allow you to download your own copy of lighttpd and install that? Of course, if lighttpd needs root access, the standard plans at DreamHost won't work - I think I've answered my own question... Cheers, Tone --~--~-~--~~~---~--~~ You received th

Re: weird learning thingie

2006-03-05 Thread tonemcd
I see a lot of thumbnails on the page (looks like a terrific place too!), click on one of them and get a full sized image. I'm using Safari 2.0.3 - ok (also works in Shiira 1.2.1) however Firefox 1.5.0.1 and Camino 1.0 - behaviour you describe Hmm, could be a browser problem? hth Cheers, Tone

Re: caching questions

2006-03-03 Thread tonemcd
Have you seen this Fredrik? http://djangoutils.python-hosting.com/wiki/Utils --~--~-~--~~~---~--~~ 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

Re: date time errors: please explain?

2006-02-28 Thread tonemcd
I'm pretty sure that fields defined as DateTimeField in your model are converted to python datetime objects when read from the database. That means you can use all the datetime methods on it, like datetime.timedelta for example. Check out http://groups.google.com/group/django-users/browse_frm/th

Re: Request for ideas

2006-02-14 Thread tonemcd
Authentication. There's some documentation, and it's pretty good. Having more won't hurt though and will definitely help the people considering migrating to django with their decisions. I'd suggest external (ie different to the settings.py 'django' database) MySQL/Postgres databases, LDAP and (if

Re: scale of auth system

2006-02-07 Thread tonemcd
Just a quick note from someone with a lot of Zope experience finding the world of Django very very interesting... In Zope, there is a *lot* of flexibility in terms of authentication/authorization. I couldn't say whether it is full ACL or not, but it certainly seemed it to me. However, we rarely

Re: Do I use @login_required to extend authentication?

2006-02-02 Thread tonemcd
Jason F. McBrayer wrote: > "tonemcd" <[EMAIL PROTECTED]> writes: > > > You do mention that every entry in LDAP must also exist in the django > > users table as well - is that a fundamental requirement? > > I've written very similar django-to-ldap glue

Re: Paginator Documentation

2006-02-02 Thread tonemcd
Thanks a lot! - that's just what I needed. Cheers, Tone

Re: A couple of post magic removal questions

2006-02-01 Thread tonemcd
It looks like magic-removal doesn't allow more than one database connection 'out of the box', but I guess you could use a view that has something like; import MySQLdb result = curs.fetchall() in it and carry on from there, with judicious use of result['fieldname'] in the newobj.save() argum

Re: Paginator Documentation

2006-02-01 Thread tonemcd
I got to a similar state, but I couldn't figure out what the template should look like! (dumb, I know). Do you have an example you can post? I'm trying to implement parts of the admin system into my own apps, and the paginator is a core part of that (looking at migrating from Zope, and the 'batch

Re: Do I use @login_required to extend authentication?

2006-02-01 Thread tonemcd
Ooh, that's neat Jason! - certainly our guys can get their teeth around that code. Authentication of django apps is going to be one of our biggest issues, and examples like this can only help. It's just the sort of thing that deserves an entry in the wiki http://code.djangoproject.com/wiki. You

Re: You want some of that 'adminy' goodness in your own apps?

2006-02-01 Thread tonemcd
Hadn't thought of that Brian, I'll have a go at putting something a bit more sensible into the Wiki (I was in a hurry to go to a meeting and wanted to get the content online somewhere before it left me completely!). Come to think of it, I may try diffing against the original docs and submitting i

You want some of that 'adminy' goodness in your own apps?

2006-01-31 Thread tonemcd
Here's what I've found... Start with the very useful tutorial at http://www.djangoproject.com/documentation/forms/ - in general it's very helpful, but there are some small gaps in the documentation, which would certainly have helped me #1: I'd emphasize that this document (http://www.djangoproje

Re: FileField :: mx file size

2006-01-30 Thread tonemcd
Cheers Adrian, that's very handy to know.. Tone

Re: assign or rename a variable in templates

2006-01-30 Thread tonemcd
Bryan, If you can handle Zope PageTemplates, the plugin from Stefan might be useful: http://www.zope.org/Members/shh/DjangoPageTemplates That allows for variable creation, but of course you don't get the django templates... Cheers, Tone

  1   2   >