Re: help with keeping a counter in a template

2006-01-20 Thread Amit Upadhyay
On 1/21/06, coowwa <[EMAIL PROTECTED]> wrote: datelists = dailytodos.get_list(order_by=["-date"])My question: if I want to limit the number of todo items that displayson this page to say 20You are looking for http://www.djangoproject.com/documentation/db_api/#limiting-selected-rows-- Amit Upadhyay

help with keeping a counter in a template

2006-01-20 Thread coowwa
I have a model like this (this is a simplified abstraction of what I'm really doing): class DailyTodo(meta.Model): date = meta.DateField(verbose_name = 'date', name = 'date', unique = True) class META: admin = meta.Admin( ordering = ['-date'], list_filter

Re: Django and MS SQL

2006-01-20 Thread Jeremy Dunck
On 1/20/06, Cheng Zhang <[EMAIL PROTECTED]> wrote: > > Adapter class over adodbapi where supported, falling back to pymssql? > > I think they (ado_mssql and pymssql) are meant for different OS > platforms, in that ado_mssql is for Django running on Windows to > connect to SQL Server since it only

Re: Django and MS SQL

2006-01-20 Thread Cheng Zhang
On Jan 13, 2006, at 12:40 AM, Jeremy Dunck wrote: On 1/12/06, Rich Bakos <[EMAIL PROTECTED]> wrote: The pymssql driver only supports DB-LIB, which is way outdated and you wont have access to functionality added to MSSQL after version 6.5. This is not the best option IMHO. Adapter class o

Re: Django and MS SQL

2006-01-20 Thread Cheng Zhang
Actually that's incorrect. Pymssql is only a thin wrapper around FreeTDS library (http://www.freetds.org/). AFAIK, FreeTDS works with SQL-Server 2000 pretty well. - Cheng On Jan 13, 2006, at 12:15 AM, Rich Bakos wrote: Jeroen Ruigrok van der Werven wrote: Hi Jeroen, Can a bunch of us ge

Re: RoR Ajax helpers port to Django tags?

2006-01-20 Thread ToddG
For a head start take a look here: http://pylonshq.com/project/pylons/browser/RailsHelpers Pylons being an in-development python "mega" framework (not a fan of that term!). I don't know anything of licensing or credit issues, but they're ported from Rails, so... maybe ask Ben over there, he did

RoR Ajax helpers port to Django tags?

2006-01-20 Thread Louis
Hi, Has anybody ported RoR's JavascriptHelper functions to Django's tag library? Just want to make sure before I begin. Thanks.

Re: glitches in admin interface

2006-01-20 Thread oggie rob
Hi Luke, You need "blank=True" instead of "null=True" for CharFields and TextFields (they should be non-null even if nothing is typed in there). -rob

Re: Managing static media urls

2006-01-20 Thread Kevin
I think the question at hand is not where to store and serve the media files, but how to write an app that can easily support accessing media files from different urls. I had this same issue between my development and production apache servers: Dev Site localhost/mysite/images/whatever.gif Prod

Re: Managing static media urls

2006-01-20 Thread Nebojša Đorđević
Afternoon wrote: I'm not just using this for media (despite the subject line!). I also the URLBASE for building absolute urls in models and in templates. MEDIA_URL generally ends up as something like: MEDIA_URL = URLBASE + "/media/" Yes, I also hit the same problem, but because I ha

Re: Dreamhost - a note for Windows users

2006-01-20 Thread PythonistL
iGL,Thank you for your help. Meanwhile the problem was solved with help of guys from IRC . I had to use symbolick link /home/bmabma/TEMPLATES/Static/ to egsmtrade.com/Media rewrite RewriteRule ^(media/.*)$ - [L] to RewriteRule ^(Media/.*)$ - [L] and use MEDIA_URL = "/Media/"

Re: Dreamhost - a note for Windows users

2006-01-20 Thread iGL
Hi PythonistL, I gues you should either rename the directory /home/bmabma/TEMPLATES/Static/ as /home/bmabma/TEMPLATES/media/ and change in settings.py MEDIA_ROOT = "/home/bmabma/TEMPLATES/Static/" as MEDIA_ROOT = "/home/bmabma/TEMPLATES/media/" or change rewrite rull as RewriteRule ^(S

psycopg2 with Django

2006-01-20 Thread Chris Leonello
There was a previous post on using psycopg2 with Django here: http://groups.google.com/group/django-users/browse_thread/thread/dc2197f0de69072a/d801feabc1144518 Note, with psycopg2, an additional argument seems to get passed (a reference to the current cursor) to the typecast_* functions in dja

Re: Dreamhost - a note for Windows users

2006-01-20 Thread PythonistL
Hello iGL, thank you for your help. I corrected the settings.py but I still have a problem with media and admin. As to media,images are not displayed. I have in my settings.py ## MEDIA_ROOT = "/home/bmabma/TEMPLATES/Static/" MEDIA_URL = "http://www.egsmtrade.com"; but when

Re: Django and MS SQL

2006-01-20 Thread Adrian Holovaty
On 1/20/06, Cheng Zhang <[EMAIL PROTECTED]> wrote: > Just a quick report on the status on pymssql backend, after being > busy for nearly 2 weeks, today I finally found a big trunk of time > (~10 hrs) to hack it, and the result is that there are only 4 errors > (shown below) out of all Django docte

Re: Managing static media urls

2006-01-20 Thread Afternoon
I'm not just using this for media (despite the subject line!). I also the URLBASE for building absolute urls in models and in templates. MEDIA_URL generally ends up as something like: MEDIA_URL = URLBASE + "/media/" Something like Rails' routing would be really interesting for me,

glitches in admin interface

2006-01-20 Thread Luke Skibinski Holt
I'm getting some weird things happening in my admin interface. Fields marked with null=True are failing with no content and I'm getting repeating lines results in some list pages and not in others. like: Alice's Blog Johannes blog Alice's Blog Johannes blog Alice's Blog Johannes blog 2 blogs and

Re: Admin functionality available on public site

2006-01-20 Thread stava
Well, I'm interested too, and apparently "You can do that", so: details? R/LarS

Re: Posting form data across urls

2006-01-20 Thread [EMAIL PROTECTED]
Argh a whole morning lost to an AWOL trailing / Thank you so much that was really begining to frustrate. Probably should have read the newbie gaffs wiki before I even started

Re: Posting form data across urls

2006-01-20 Thread Andreas Stuhlmüller
On 1/20/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm probably missing the point here but I'm having a problem with > posting data to other URLs I only seem to be able to access > request.POST (infact reuest.POST is only True ) when I post a form back > to itself using action="." > > If I

Re: Admin functionality available on public site

2006-01-20 Thread [EMAIL PROTECTED]
Hi if your just looking to steal great swathes of the fabulous admin code the clever people at django wrote then I did find a natty way of doing that. In my views.py I created functions that look a bit like this from django.contrib.admin.views.main import add_stage, change_stage def do_change_s

Posting form data across urls

2006-01-20 Thread [EMAIL PROTECTED]
Hi I'm probably missing the point here but I'm having a problem with posting data to other URLs I only seem to be able to access request.POST (infact reuest.POST is only True ) when I post a form back to itself using action="." If I try action="/some/other/url" where in url.py (r'^some/other/url

Re: Django and MS SQL

2006-01-20 Thread Cheng Zhang
Just a quick report on the status on pymssql backend, after being busy for nearly 2 weeks, today I finally found a big trunk of time (~10 hrs) to hack it, and the result is that there are only 4 errors (shown below) out of all Django doctests left. :-) Anyway it's late night already and my