Re: [newforms-admin] using multiple AdminSites

2008-05-04 Thread Derek Hoy
On Sat, May 3, 2008 at 11:05 PM, derek.hoy <[EMAIL PROTECTED]> wrote: > - if you register models to basic-admin, they won't show automatically > in advanced-admin and vice-versa Looks like you can register a model with more than one AdminSite. Derek

Re: Large file upload to Amazon S3?

2008-04-27 Thread Derek Hoy
I'm using boto for uploading short mp3 files of around 20MB and it's working fine. It's easy to use so you should be able to test it without much trouble. The main things with s3 is to sort out the location of your buckets (US or European...) and remember to set the permissions on each file you

Re: How to serve robots.txt for Django?

2008-02-15 Thread Derek Hoy
It's not as efficient as the methods already described, but you can do this in Django if it's easier. Just set up a redirect (django.contrib.redirects) for robots.txt pointing to a flatpage (django.contrib.flatpages). for example, /robots-txt/ Derek

Re: Best way to template "," and "and" separated lists?

2008-02-07 Thread Derek Hoy
How about putting the separator before the link? if first, put nothing else if last put 'and' else put a ', ' Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Variables available to all templates

2007-06-29 Thread Derek Hoy
How are you producing your index page? If you look in the docs, you'll see the warning about needing a RequestContext- if that's not being used in the view that is loading the index.html into a response then the template won't have any user info even if you are logged in.. Hope that makes some

Re: Variables available to all templates

2007-06-28 Thread Derek Hoy
Take a look at this: http://www.djangoproject.com/documentation/authentication/#authentication-data-in-templates You can use this to put something in a base template that all your site templates can be based on. Derek --~--~-~--~~~---~--~~ You received this

Re: 'module' object has no attribute 'urlpatterns'

2007-06-25 Thread Derek Hoy
Meant to add that this was definitely something in r5516 - it appeared consistently going between r5515 and r5516. sorry haven't had time to poke about at the cause- got a demo of the project this afternoon :) If I can help track it down, let me know. Derek

Re: 'module' object has no attribute 'urlpatterns'

2007-06-25 Thread Derek Hoy
On 6/24/07, brian corrigan <[EMAIL PROTECTED]> wrote: > > Hi Malcom, > > Thanks for getting back to me so quickly. Updatting to r5520 has fixed > my problem. Good work on you fix so :) Fixed here too. I'm on fcgi + lighttpd and was just getting a 500 server error on any URL in the project,

Re: Search feature

2007-03-21 Thread Derek Hoy
Another option for search is to use the google co-op thing- look in your google services. If your site is public, then it could be all you need. I've used it on 2 sites and they're non-commercial so I can switch off the ads. It took some time for google's indexing to settle down, but it seems

Re: MySQLdb version

2007-03-21 Thread Derek Hoy
On 3/21/07, worksology <[EMAIL PROTECTED]> wrote: > > I have the exact same issue, also with Dreamhost. I tried the > "mysql_old" thing, but still got the same error. Malcolm has just checked in a fix. this has saved My_old backend :) Derek

Re: Hard coded instances of model classes

2006-11-27 Thread Derek Hoy
I am doing something a little similar, although actually the site is about what you would call 'scale development', so the resulting forms aren't used for data collection. But maybe it's of interest? I use xml to define a template, composed of elements and groups. The xml is just stored in a

Re: get the content-type in a template?

2006-09-27 Thread Derek Hoy
On 9/26/06, Gábor Farkas <[EMAIL PROTECTED]> wrote: > > hi, > > i many times use the object's content-type's "model" attribute, > when generating URLs for certain actions. > > and i many times need to get the given object's content-type > in the template. > > unfortunately i haven't found any way

Re: Creating graphs in Django application

2006-09-08 Thread Derek Hoy
On 9/7/06, Devraj <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > I am attempting to create graphs in my Django app.to provide reporting > features. Are there any libraries available to do this in Python or > Django? haven't used it, but there's also Ploticus: - http://ploticus.sourceforge.net/

Re: TemplatePages directory

2006-08-27 Thread Derek Hoy
On 8/25/06, Baurzhan Ismagulov <[EMAIL PROTECTED]> wrote: > I add /dir to PYTHONPATH. In this layout, I have to put the html > templates to /dir/verdjnlib/templatepages/templates/templatepages. How > can I customize the directory without modifying verdjnlib for each > project? It will

Re: Post to PayPal with urlllib [newbie question]

2006-08-24 Thread Derek Hoy
On 8/25/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > In that situation, I guess you just wouldn't ship the order if the > customer underpays (by tweaking the payment amount), right? Unless it was you :) -- Derek --~--~-~--~~~---~--~~ You received this

Re: Post to PayPal with urlllib [newbie question]

2006-08-24 Thread Derek Hoy
On 8/24/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > On 8/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > I thought about trying to post all the data to a form in the view page, > > then automatically submit the form using JavaScript, but it seems like > > such a cludgy solution. >

Re: FreeComment doesn't work with slugs?

2006-08-24 Thread Derek Hoy
On 8/24/06, DavidA <[EMAIL PROTECTED]> wrote: > > Yes, and that's how I learned about the problem. If you would have > stumbled upon this later post, you would have seen that I ran into it > when I added comments: > > http://davidavraamides.net/blog/2006/05/13/adding-comments/ ah well, that's

Re: FreeComment doesn't work with slugs?

2006-08-24 Thread Derek Hoy
On 8/24/06, DavidA <[EMAIL PROTECTED]> wrote: > > The FreeComment model assumes the primary key of the object it refers > to is an integer, so you can't make the primary key of your model a > slug, but you can still use a slug on your model: > > class Post(models.Model): > slug =

Re: Post to PayPal with urlllib [newbie question]

2006-08-23 Thread Derek Hoy
On 8/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > ... I should be able to > capture and modify the post data, then urlencode the post values using > urllib, but I cannot figure out how to post the form data AND redirect > the page to the paypal URL in one shot. I'm just about to do

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

2006-08-21 Thread Derek Hoy
On 8/15/06, Bryan Chow <[EMAIL PROTECTED]> wrote: > > Ian Clelland and I wrote a Django app that does just that (mapping > URLs to mostly-static templates). Our code also takes several other > issues into consideration, such as sanitizing the URL so that > arbitrary files on the filesystem won't

Re: Creating User Accounts

2006-08-04 Thread Derek Hoy
On 8/4/06, Dave <[EMAIL PROTECTED]> wrote: > > > I think your best bet is to override the save() method of your model. > > This worked perfectly. It didn't even occur to me that I could do that. > Thanks so much for the suggestion. Just be careful, because the save() will be called if you update

Re: Protecting files

2006-08-02 Thread Derek Hoy
Sorry, this doesn't help with your problem with Apache, but Lighttpd has this: http://lighttpd.net/documentation/secdownload.html -- Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: M2M intermediary tables, looking up objects

2006-07-20 Thread Derek Hoy
On 7/20/06, markguy <[EMAIL PROTECTED]> wrote: > > Derek, > > I appreciate the followup. That works, but I have to say, I don't > understand *why* it works! that's good :) The thing that's hard to pick up is that the ORM (db) stuff isn't quite object-oriented, in the sense that you can't just

Re: M2M intermediary tables, looking up objects

2006-07-20 Thread Derek Hoy
On 7/20/06, markguy <[EMAIL PROTECTED]> wrote: > > I'm not sure I understand. Would the template have it's ingredient info > when it gets to the template? I'm off to mess about with this now, but > I don't see... If your LabelIngredient model has an attribute 'ingredient' (which is a

Re: M2M intermediary tables, looking up objects

2006-07-20 Thread Derek Hoy
On 7/20/06, markguy <[EMAIL PROTECTED]> wrote: > > Actually, that leaves out the order information from LabelIngredients. > I had tried to do this with select_related(), but I couldn't get it to > follow the ForeignKey into Ingredients. > > Further wizardy (and explanation) would be greatly

Re: User never logs out

2006-07-10 Thread Derek Hoy
On 7/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Not quite... it does save the username/password for forms but I'm > unaware of such a feature in Firefox. AFAIK the only way autologin is > possible is by using a cookie which is something I haven't implemented > (yet). If you're

Re: User never logs out

2006-07-09 Thread Derek Hoy
On 7/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: ... > The problem is that when I click on the browser's back button, > user.is_anonymous returns False, therefore the user is infact logged > in. To make things worse, if I manually type in the URL for the index > page after logging out, the

Re: Django t-shirts: your ideas wanted!

2006-06-28 Thread Derek Hoy
On 6/28/06, Julio Nobrega <[EMAIL PROTECTED]> wrote: > Django | Python: We indented jazz (some people say jazz' magic is > the space between the notes, a definition that I love) that's great :) I had 'the Djoy of Django' in my head as a title for The Book. -- Derek

Re: Root URI in templates

2006-06-22 Thread Derek Hoy
Or just use the templatetag approach mentioned earlier. -- Derek --~--~-~--~~~---~--~~ 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

Re: OT: Re: ANN: Screencast demo of the WebFaction control panel

2006-06-22 Thread Derek Hoy
rimu have some useful info for a VPS setup: http://rimuhosting.com/howto/memory.jsp -- Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Problem with overriding save() and related objects

2006-06-20 Thread Derek Hoy
On 6/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: ... > Now, if I set up a join table (a DocumentRecipient model with Document > and Recipient as foreign keys) and override the DocumentRecipient > save() function to send the email, that works, but that seems like a > clunky way to do

Re: combining models in something like a queryset?

2006-06-05 Thread Derek Hoy
Don't put the title in the song model- just have a Title model instead of Alias. Then you just list the titles... -- Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Ajax support, there is no need for reinventing the wheel

2006-06-05 Thread Derek Hoy
On 6/5/06, Scott Anderson <[EMAIL PROTECTED]> wrote: > > I'm sorry, but I can't agree. I've used DWR as well, and the "server > generates your Javascript to include" model really creates a lot of > problems, both with versioning and performance. > > Simple is best. I've had the best luck with

Re: freecomments not displaying after magic-removal

2006-06-03 Thread Derek Hoy
I had to mess around with the syntax a bit to get it to work after moving to MR. Here's an example of what works for me: {% get_free_comment_list for workgroups.workgroup group.id as comment_list reversed %} workgroups is the appname workgroup is the module name - (model is WorkGroup, I don't

Re: Ajax support, there is no need for reinventing the wheel

2006-06-03 Thread Derek Hoy
I used DWR for a java project I finished last year - http://getahead.ltd.uk/dwr/ It really simplifies the client-server ajax stuff. It lets you fetch an object from the server and have it available in the client as a js object, with properties and methods all available in your client code. DWR

Re: Good VPS and/or django hosting?

2006-06-02 Thread Derek Hoy
On 6/2/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > I use rimu as well and am happy with it. I just don't run django on > it (yet). I've been with them for over a year- big advantage of a VPS setup- when django came along, I could just install it. I use the Debian setup, because I already

Re: Good VPS and/or django hosting?

2006-06-02 Thread Derek Hoy
On 6/2/06, mamcxyz <[EMAIL PROTECTED]> wrote: > > Somebody have experience with a good VPS hosting provider? rimuhosting.com excellent responsive support. -- Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups