auto_now_add problems

2006-12-18 Thread Milton Waddams
Hi All, I've been noticing some strange behaviour with auto_now_add and date related functions and wasn't able to find anything about it. My server is set to CST as is my settings.py, the majority of the time it works correctly, however sometimes it uses a date which I can't workout why it would

Re: Re: What IDE do you use? (semi-OT)

2006-10-08 Thread Milton Waddams
I use eric3 for my python work, jEdit for templates. I only use the basic features of eric (projects and editing). I use it because it is easy and works well. I use Ubuntu. I think eric is available on windows (it's written in python) though I've never tried it. http://www.die-offenbachs.de/det

Re: Why I'm giving up on Django

2006-10-01 Thread Milton Waddams
Just on the Apache 1.3 issue, I had the same problem on one of the sites I developed, I was able to get the fastcgi module installed and the site runs fine (has had some decent traffic levels). --~--~-~--~~~---~--~~ You received this message because you are subscri

Re: Django patch!

2006-09-03 Thread Milton Waddams
> You mean two _reported_ false positives a week? > Or did someone read all the rejected posts to check that? > > I fear that many people will just go away if their bug report or patch > gets rejected like that, especially those that don't really "need" > Django. (I know I have done that at least

Re: displaying thumbnails in the admin

2006-09-02 Thread Milton Waddams
You'll need to render an image and insert that image in the admin html. So, you'll want a view for the admin html page and a view for the thumbnail image. As far as using foo.show() you'll instead need to write the image to either a file or a response. On 9/2/06, adamjspooner <[EMAIL PROTECTED]

Re: delete imagefield

2006-07-27 Thread Milton Waddams
just had this issue the other day, here's my crude hack. stick this in widget/file.html {% load admin_modify i18n %}{% if bound_field.original_value %} {% trans "Currently:" %} {{ bound_field.original_value|escape }} [remove] {% trans "Change:" %}{% output_all bound_field.form_fields %} {% els

Re: What server configuration to use

2006-05-26 Thread Milton Waddams
you'll probably want to detail expected traffic levels On 5/26/06, PythonistL <[EMAIL PROTECTED]> wrote: > > I am going to setup a server to use it with Django. > I am going to use: Trustix Linux (http://www.trustix.org) > mod_Python with Apache > > Is 1GB memory enough? --~--~-~--~~

Re: edit_inline broken

2006-03-21 Thread Milton
Sorry found it http://code.djangoproject.com/ticket/482 --~--~-~--~~~---~--~~ 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 th

edit_inline broken

2006-03-21 Thread Milton
I'm sure I'm missing something, since when I originally tried it when django was first launched it worked well. I need a poll in one of my projects and so I thought I'd just use the poll that comes in the tutorial, all worked well up until I came to editing the choices inline. I can only get one

Re: MD5 Password being changed to SHA1 and no longer working

2006-02-17 Thread Milton Waddams
> I'm only guessing, since while I've been around django, sha1 has been > used as the passwd hash function.. But could you check that if the > password actually fits in the space reserved for in the database? my > point is (if there is any;)) that md5 creates a 32 digit hash sum and > sha1 creates

Re: MD5 Password being changed to SHA1 and no longer working

2006-02-15 Thread Milton Waddams
On 2/16/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > Hmmm, I don't recall anybody having this issue, so I suspect it's > something with your code. Are you, perchance, subclassing the > auth.User model or doing anything else custom with the auth app? Nope, only thing I'm using auth for i

MD5 Password being changed to SHA1 and no longer working

2006-02-15 Thread Milton Waddams
Hi All, Apologies if this has been raised, I did a bit of searching without any luck :( I've recently upgraded to the latest release and one of the issues I've experienced is that my passwords which were in md5 work correctly, however immediately upon logging in they are changed to a SHA1 hash w

Re: truncate html filter?

2006-02-09 Thread Milton Waddams
On 2/9/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 2/8/06, Milton Waddams <[EMAIL PROTECTED]> wrote: > > I'm wondering if anyone has a filter which safely truncates html so as > > not to chop through tags. > > Hey Milton, > > You co

Re: Custom output formats in admin

2006-02-08 Thread Milton Waddams
> Does this cover what you are looking for? > > http://www.djangoproject.com/documentation/outputting_csv/ Doing the actual csv generation isn't a problem, I was wondering about making it automated so that each module in the admin had the export ability. In my case it's a CSV that I need to expo

Custom output formats in admin

2006-02-08 Thread Milton Waddams
Hi All, Apologies if I've missed something somewhere and that I haven't dug into the admin internals... I've got an upcoming project which I would like to use django for, one of the requirements is that they are able to export a CSV of the results on any of the pages that list a series of items i

truncate html filter?

2006-02-08 Thread Milton Waddams
Hi All, I'm wondering if anyone has a filter which safely truncates html so as not to chop through tags. A problem that I find I have quite often is that I want to provide a summary of the content (eg. on a homepage) with a more info link... I run into issues with the content being truncated mid

Re: ifequal

2005-12-16 Thread Milton Waddams
perfect, thanks! On 12/16/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > I just fixed this in the Django development version (trunk), so, if > you're using that, just "svn update". The problem was that the "1" in > that example was being compared as a string, not an integer.

Re: ifequal

2005-12-15 Thread Milton Waddams
good thinking, thanks :) > It's usually better practice to put rules like this into your Python code > rather than your template. Make your template say something like: > > {% if blog_post.allow_ad %}{% endif %} > > and do something like this in your Python code: > > for i, blog_post in

Re: ifequal

2005-12-15 Thread Milton Waddams
thanks Is there a way for me to achieve what I'm looking for? In my case I want to place an adsense ad between a couple of blog posts though want to make sure that I don't go over the 3 ads per page limit. On 12/15/05, kmh <[EMAIL PROTECTED]> wrote: > > Milton Waddams

ifequal

2005-12-14 Thread Milton Waddams
Can someone tell me why this doesn't work? {% ifequal forloop.counter0 1 %} there are enough loops and the output of {{forloop.counter0}} does print 1 at the appropriate place? By work I mean it is never equal, I've tried putting the 1 in quotes with no difference.

Re: What is the best way to do related items?

2005-12-01 Thread Milton Waddams
just what I needed, thanks! On 12/2/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 12/1/05, Milton Waddams <[EMAIL PROTECTED]> wrote: > > I've tried self.get_list though obviously it doesn't exist. > > Just plain "get_list" should work. Give that a shot.

What is the best way to do related items?

2005-12-01 Thread Milton Waddams
Hi All, I'm back around to working out how to best implement related items, since you can't manytomany join onto self I plan to do a calculation and cache the result. What I would like to do is to have a post (eg. a blog post) object and then be able to have something like the following in my te

Re: batched display

2005-11-24 Thread Milton Waddams
Can you provide more info about what type of records you are thinking of? There is a caching framework which can be used to only execute intensive code every so often. Alternatively just run a python script via cron and you can do pretty much whatever you want. On 11/24/05, Kenneth Gonsalves <[

Re: Performance tuning tips?

2005-11-23 Thread Milton Waddams
no idea why I put it there, I tried moving it to the top, the response times went back to around 3 seconds. On 11/24/05, Eugene Lazutkin <[EMAIL PROTECTED]> wrote: > > Interesting that the session middleware was the culprit. BTW, why did you > put it at the end of your middleware list? > > The de

Re: Performance tuning tips?

2005-11-23 Thread Milton Waddams
Yes I am running openload on localhost, I don't trust my DSL enough to get accurate results :( my MIDDLEWARE_CLASSES: "django.middleware.common.CommonMiddleware", "django.middleware.doc.XViewMiddleware", "django.middleware.sessions.SessionMiddleware", I'm caching on a view by view b

Re: Performance tuning tips?

2005-11-22 Thread Milton Waddams
sorry for the delay, got buried under a ton of work :( I haven't applied any patches to it (well except a couple of filters that I put into the default filters file). I switched to file based cache, results are below, sadly no great improvement. It may help to know that I'm running openload wit

Re: Performance tuning tips?

2005-11-21 Thread Milton Waddams
DOH! I thought I had listed all the important server side stuff MYSQL 4.0.24_Debian-10sarge1-log On 11/22/05, Eugene Lazutkin <[EMAIL PROTECTED]> wrote: > > Just out of curiosity: what db do you use for cache?

Performance tuning tips?

2005-11-21 Thread Milton Waddams
I'm having some issues with performance and wondering if there's anything I can do to speed things up. I'm using the db cache backend (memcached doesn't seem to want to work for me and my memory is running low enough as it is). The page I'm trying to speed up has a quite a bit of db interaction

Re: How do I do this? (Template Question)

2005-09-19 Thread Milton Waddams
perfect, thanks! On 9/20/05, Boffbowsh <[EMAIL PROTECTED]> wrote: > > I have this exact scenario in my project: > > {% if > forloop.counter0|divisibleby:"3" %}{% endif %} > >

How do I do this? (Template Question)

2005-09-19 Thread Milton Waddams
I've probably missed this somewhere though can't seem to workout how to do this. I want to have a list of products listed in a 3 column table with the number of rows growing to cover all the items. eg. product 1 product 2 product 3 product 4 product 5

Re: Money or Currency data type

2005-09-17 Thread Milton Waddams
if it had a currency associated with it then you could do all sorts of cool currency conversions/more finance oriented apps. Of course you could always just use a float and have a seperate currency field. > That's fine -- that's what we've always done. I'm not sure what the > point of a DollarFi

Recursive templates?

2005-09-10 Thread Milton Waddams
Hi All, I'm looking for advice on the best way to do the following. I'm creating a simple message board app and would like to be able to recursively display threads to an unlimited depth. The existing php version recursively selects and displays the child threads until there are no more (not very

Re: Name in admin for Foreign Key's

2005-09-08 Thread Milton Waddams
perfect, thanks :)On 9/8/05, Robert Wittams <[EMAIL PROTECTED]> wrote: I think this is a bug, but you can work around it usingCEO = meta.ForeignKey(User, verbose_name="CEO" )CFO = meta.ForeignKey(User, verbose_name="CFO" )I don't know why the name of the class is used in preference to the name of t

Name in admin for Foreign Key's

2005-09-07 Thread Milton Waddams
I'm trying to associate multiple users with a team and each user having a specific role within that team. eg. not my situation though easiest way to make it clear what I'm attempting to achieve... CEO = meta.ForeignKey(User) CFO = meta.ForeignKey(User) when I go to edit this in the admin area I g

Relating an object to itself, many-to-MANY

2005-09-04 Thread Milton
Is there a way to relate an object to many of itself. eg. I have a product and I want to relate a variable number of other products to it as related products. I've tried the 'self' method which works for ForeignKey, though manytomanyfield doesn't like having a string passed to it.

DB Api, OR queries?

2005-09-02 Thread Milton
Is it possible to do the following using the DB API or would I be better off running a manual sql query? from the docs it appears you can only do AND queries? select * from table where col='value' or col='value2' It's a simplified example. My goal is to be able to do keyword matching using "cont

Re: EmailFields and Spam

2005-08-24 Thread Milton Waddams
here's a quick filter I knocked up which will randomise the protection (add some more into the lists for better randomisation). There's probably a more correct place to put it, though I put it in django/core/defaultfilters.py def spamprotect(value, _): "Make Spam protected email address"

Re: What is this sites thing?

2005-08-18 Thread Milton Waddams
excellent, thanks :) > The Django convention is to set SITE_ID in your settings file and > then do stories.get_list(sites__id__exact=SITE_ID). If you do it > this way the more introspective parts of the admin (the auto-doc > system in particular) will work for you. > > Jacob >

Re: What is this sites thing?

2005-08-18 Thread Milton Waddams
I've been playing with it a little today and it appears to be perfect for what I was looking for. I need to build a couple of websites (may expand out to more in the future) which will be sharing a quite a few stories with a common administrator. so after fiddling with it a little bit and setting

Re: stripping malicious code?

2005-08-17 Thread Milton
sorry for being so quick to post, think I may have found what I was looking for... I think I was after the removetags filter

stripping malicious code?

2005-08-17 Thread Milton Waddams
Hi All, I'm wondering if there are any builtin methods for stripping malicious code from chunks of html (eg. script, iframe etc.), or would I be best served to check the form data and strip anything unwanted manually? many thanks

Re: Planet Django

2005-08-07 Thread Milton Waddams
any chance of an rss feed? On 8/7/05, jacobian <[EMAIL PROTECTED]> wrote: > > Right, I'm done: http://www.djangoproject.com/community/. Once again, > if you'd like your feed to be listed, drop me a (private, please) email. > >

Tags based website

2005-08-04 Thread Milton
Can anyone point me in the right direction for creating a tags based website using django? (eg. flickr, delicious, many blogs etc.)

Re: Planet Django

2005-08-03 Thread Milton Waddams
you can set keywords so that only posts with those keywords are included. I think it's a great idea (the python planet feed is how I found out about django). On 8/3/05, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > On 8/3/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > We haven't thought about