Re: Recommended Editor/IDE

2007-04-29 Thread jyunderwood
I like using Eclipse with PyDev, Subclipse, and Aptana. On Apr 29, 9:32 pm, Sat <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a recommended editor or IDE for windows that is django savvy? > Ideally, I am looking for one that handles bundles/snippets for django > as well as syntax highlighting and

Re: Django Aggregator Duex

2007-04-29 Thread [EMAIL PROTECTED]
Thanks Malcom! But how would I apply this? Here's my code: def main(request): feed_titles = Feed.objects.all() feed_list = FeedItem.objects.all() #for i in range (1,13): #feed_list.append(FeedItem.objects.filter(feed=i)[:7]) # doesn't work...why? t = loader.get_template

Re: Recommended Editor/IDE

2007-04-29 Thread James Bennett
On 4/29/07, Sat <[EMAIL PROTECTED]> wrote: > Is there a recommended editor or IDE for windows that is django savvy? > Ideally, I am looking for one that handles bundles/snippets for django > as well as syntax highlighting and code completion for django and > python. I believe ActiveState's Komodo

Recommended Editor/IDE

2007-04-29 Thread Sat
Hi, Is there a recommended editor or IDE for windows that is django savvy? Ideally, I am looking for one that handles bundles/snippets for django as well as syntax highlighting and code completion for django and python. Thanks in advance for your help. Sat --~--~-~--~~

Re: Example of passing initial value to SelectDateWidget?

2007-04-29 Thread Mike Thompson
Thank you Malcolm - and thanks for the suggestions on requesting help. I appreciate it. On Apr 29, 6:45 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2007-04-30 at 01:04 +, Mike Thompson wrote: > > Thanks Henrik - > > > I'm actually trying to pass initial data (a default date).

Re: Example of passing initial value to SelectDateWidget?

2007-04-29 Thread Malcolm Tredinnick
On Mon, 2007-04-30 at 01:04 +, Mike Thompson wrote: > Thanks Henrik - > > I'm actually trying to pass initial data (a default date). Right now, > the widget defaults to 'January 1, 2007'... and renders HTML with > 'selected' form attributes on that month, day and year. I would like > to pas

Re: Example of passing initial value to SelectDateWidget?

2007-04-29 Thread Mike Thompson
Thanks Henrik - I'm actually trying to pass initial data (a default date). Right now, the widget defaults to 'January 1, 2007'... and renders HTML with 'selected' form attributes on that month, day and year. I would like to pass, for example, '2007-04-15', to the render method of the SelectDate

Re: Dates and things

2007-04-29 Thread Gerry Steele
Damn, thats good. Guess I won't be writing it then. Django is gonna make me very lazy. Russell Keith-Magee wrote: > On 4/30/07, Gerry Steele <[EMAIL PROTECTED]> wrote: > >> The date filter is great, however i was wondering if there is a RoR type >> thing for expressing dates in human friendly

Re: User and generic views

2007-04-29 Thread Robin Percy
On 4/29/07, Ryan K <[EMAIL PROTECTED]> wrote: > > > On Apr 29, 4:26 am, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > On Sun, 2007-04-29 at 03:47 +, Ryan K wrote: > > > Hi all...quick question. If I have the auth app enabled, is the user > > > object automatically exposed to templates use

Re: Dates and things

2007-04-29 Thread Russell Keith-Magee
On 4/30/07, Gerry Steele <[EMAIL PROTECTED]> wrote: > > The date filter is great, however i was wondering if there is a RoR type > thing for expressing dates in human friendly, relative expressions such > as "2 days" ago. or "5 minutes" etc. Check out timesince and timeuntil - they sound like the

Re: building a menu dynamically based on user info

2007-04-29 Thread Marco Gabriel
Robin Percy schrieb: > Here's a simplified custom tag example using is_authenticated(): > > class TestTagNode(template.Node): > def render(self,context): > return "User is authenticated? %s" % > context['user'].is_authenticated() Thanks a lot, I was close, argh! :) --~--~-

Re: building a menu dynamically based on user info

2007-04-29 Thread Robin Percy
Here's a simplified custom tag example using is_authenticated(): def test_tag(parser, token): return TestTagNode() class TestTagNode(template.Node): def render(self,context): return "User is authenticated? %s" % context['user'].is_authenticated() register.tag('test_tag',test_tag

Re: building a menu dynamically based on user info

2007-04-29 Thread Marco Gabriel
Robin Percy schrieb: > It sounds like you're trying to access the user as an attribute rather > than a key in your tag renderer. Make sure you're using the syntax > context['user'] as opposed to context.user. > I tried both, but if I use context['user'] I could not find a way to apply is_authe

Re: building a menu dynamically based on user info

2007-04-29 Thread Robin Percy
It sounds like you're trying to access the user as an attribute rather than a key in your tag renderer. Make sure you're using the syntax context['user'] as opposed to context.user. - Robin On 4/29/07, Marco Gabriel <[EMAIL PROTECTED]> wrote: > > > Hi everyone, > > Scenario: I want to build a ma

Re: import problem

2007-04-29 Thread kamil
Hi Michael. You are right there was module named utils (coincidentally same name as django module) in the nesh thumbnail app. Problem resolved :) Thank You Very Much for the time You dedicate me. I feel in debt with U and I feel really happy to feel such a feedback in django community. On Apr 25,

Re: Dates and things

2007-04-29 Thread Gerry Steele
Was this meant to be blank? Cinzano wrote: > Gerry Steele ha scritto: > > >> The date filter is great, however i was wondering if there is a RoR type >> thing for expressing dates in human friendly, relative expressions such >> as "2 days" ago. or "5 minutes" etc. >> >> I'd be happy to do work

building a menu dynamically based on user info

2007-04-29 Thread Marco Gabriel
Hi everyone, Scenario: I want to build a main menu with several entries. Some of the entries should only be displayed if the user is logged in (profile, settings), some only if it's an anonymous user (register, log in) and some entries should be always visible (home, ...). I tried it several

Re: Dates and things

2007-04-29 Thread Cinzano
Gerry Steele ha scritto: > The date filter is great, however i was wondering if there is a RoR type > thing for expressing dates in human friendly, relative expressions such > as "2 days" ago. or "5 minutes" etc. > > I'd be happy to do work on this this summer if not, if someone was to > give me

Dates and things

2007-04-29 Thread Gerry Steele
The date filter is great, however i was wondering if there is a RoR type thing for expressing dates in human friendly, relative expressions such as "2 days" ago. or "5 minutes" etc. I'd be happy to do work on this this summer if not, if someone was to give me a poke in the right direction. -G

Re: Example of passing initial value to SelectDateWidget?

2007-04-29 Thread Henrik Lied
> > > Is anyone able to provide an example of passing initial data to the > > > SelectDateWidget in newforms.extras.widgets (or to the DateField that > > > uses that widget)? I've tried many different approaches, but am > > > totally stuck. This won't work? birthdate = forms.DateField(label='

Re: ./manage loaddata (fixtures) problem with postgresql

2007-04-29 Thread Vinay Sajip
On Apr 29, 9:42 pm, Michel Thadeu Sabchuk <[EMAIL PROTECTED]> wrote: > Sorry by the late response, I'm too busy these days. I try to load > fixtures from xml data (instead of json data), I got the same error. I > put a sample application for download on the following address: I believe this is

Re: ./manage loaddata (fixtures) problem with postgresql

2007-04-29 Thread Michel Thadeu Sabchuk
Hi Russell! Sorry by the late response, I'm too busy these days. I try to load fixtures from xml data (instead of json data), I got the same error. I put a sample application for download on the following address: http://portaldoescritorio.com.br/testapp.tgz I wrote the model and the dump data

Re: Django Aggregator Duex

2007-04-29 Thread [EMAIL PROTECTED]
Thanks Malcolm! Python code: def main(request): feed_titles = Feed.objects.all() feed_list = FeedItem.objects.all().order_by('feed_id') #i tried a for loop here appending feed_list to a list...but template wouldn't see list as object...? t = loader.get_template('aggregator/

Re: Example of passing initial value to SelectDateWidget?

2007-04-29 Thread Mike Thompson
Thanks for your help. I've tried that, and have examined the source thoroughly. I've tried passing data to the render method. No matter how I pass the initial data, the form reads January 1, 2007. I've seen the following ticket: http://code.djangoproject.com/ticket/3852 and have applied the

Re: Example of passing initial value to SelectDateWidget?

2007-04-29 Thread daev
'2007-04-29' The most simpliest way to solve such problems is to view django source code. On Apr 29, 8:59 pm, Mike Thompson <[EMAIL PROTECTED]> wrote: > Is anyone able to provide an example of passing initial data to the > SelectDateWidget in newforms.extras.widgets (or to the DateField that > us

Re: Django Aggregator Duex

2007-04-29 Thread [EMAIL PROTECTED]
Thanks Malcolm! Would I make a variable like this? FeedItems.objects.filter(feed_id='%s').order_by('feed_id')[:8] ??? I want this to loop through rows in my table with different values for %s...should I do this through my view or template? Thanks for the help! On Apr 29, 2:29 am, Malcolm Tre

Example of passing initial value to SelectDateWidget?

2007-04-29 Thread Mike Thompson
Is anyone able to provide an example of passing initial data to the SelectDateWidget in newforms.extras.widgets (or to the DateField that uses that widget)? I've tried many different approaches, but am totally stuck. Thank you! --~--~-~--~~~---~--~~ You received

Re: Django unit tests and unicode problem

2007-04-29 Thread Eugene Morozov
Hmm, I've figured how to inspect context in the test by reading django sources. But that didn't help greatly, because context['translation'].content (translation is a model for translated pages content) still returns doubly encoded utf-8 data. By the way, the page in browser is rendered correctly.

Re: User and generic views

2007-04-29 Thread Ryan K
On Apr 29, 4:26 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2007-04-29 at 03:47 +, Ryan K wrote: > > Hi all...quick question. If I have the auth app enabled, is the user > > object automatically exposed to templates used with generic views? I > > want to display a login link if

Re: can'tr start django server

2007-04-29 Thread Grigory Fateyev
Hello Gerry Steele! On Sat, 28 Apr 2007 12:54:03 +0100 you wrote: > > Are you sure it isn't this http://code.djangoproject.com/ticket/4179 > > Which we discussed this morning? I have mysql-server-4.1 and mysqldb-python upgrade via egg, now mysql backend work fine running django like dev server

Django unit tests and unicode problem

2007-04-29 Thread Eugene Morozov
Hello, I'm new to django (using it only for two weeks and I was reading django tutorial, documentation and book for the first week). I'm writing unit tests for my CMS similar to built-in flatpages CMS, but with builtin i18n features and other things required for full- fledged CMS. I cannot use s

Django unit tests and unicode problem

2007-04-29 Thread Eugene Morozov
Hello, I'm new to django (using it only for two weeks and I was reading django tutorial, documentation and book for the first week). I'm writing unit tests for my CMS similar to built-in flatpages CMS, but with builtin i18n features and other things required for full- fledged CMS. I cannot use s

Re: Django Schema Migration

2007-04-29 Thread daev
Here is Schema Evolution Project home site: http://code.google.com/p/django-schemaevolution/ Any feedbacks are welcome daev wrote: > It's very funny but couple of dayes ago I start to write some schema > wvolution framework for django. I've read articles in django-code wiki > about schema evolu

Re: Django Aggregator Duex

2007-04-29 Thread Malcolm Tredinnick
On Sun, 2007-04-29 at 07:29 +, [EMAIL PROTECTED] wrote: > Hi everyone, > > Django/python newbie but I'm enjoying it so far! > > Quick question: > > How would I write this > > SELECT * FROM aggregator_feeditems WHERE feed_id = 1 ORDER BY feed_id > LIMIT 0,7 > > in either a view or template

Re: User and generic views

2007-04-29 Thread Malcolm Tredinnick
On Sun, 2007-04-29 at 03:47 +, Ryan K wrote: > Hi all...quick question. If I have the auth app enabled, is the user > object automatically exposed to templates used with generic views? I > want to display a login link if no one is logged in and a logout link > if a user is. Providing you have

Django Aggregator Duex

2007-04-29 Thread [EMAIL PROTECTED]
Hi everyone, Django/python newbie but I'm enjoying it so far! Quick question: How would I write this SELECT * FROM aggregator_feeditems WHERE feed_id = 1 ORDER BY feed_id LIMIT 0,7 in either a view or template where the feed_id value would be updated in a loop? Thanks! --~--~-~--~-

Re: TIME_ZONE Error? Anyone ever get this?

2007-04-29 Thread Sam Morris
On Sun, 29 Apr 2007 00:43:52 +, Roboto wrote: > I'm using Piotr Diamanda MyghtyBoard and I keep running into this error > when I try this 1 particular view... I've asked Piotr directly and he > indicated it could be a django/server issue. Any thoughts? Set log_min_error_statement = error i