Re: Exception in template

2008-04-12 Thread Juanjo Conti
Perfect, I want the empty string :) I was just asking myself if I was forcing some extra processing. Seems not. Thanks both of you. Juanjo -- mi blog: http://www.juanjoconti.com.ar --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Templates won't translate

2008-04-12 Thread Kenneth Gonsalves
On 12-Apr-08, at 10:15 PM, Basti wrote: > Probably I'm only being stupid but I can't get my templates to be > translated. Everything else (translation in views etc.) works fine. does the template stuff appear in django.po? -- regards kg http://lawgon.livejournal.com

Re: Exception in template

2008-04-12 Thread Erik Vorhes
> {% for a in list %} > a.foo a.bar > {% endfor %} If you really need something to happen other than an empty string, you can always use the "if" tag: {% for a in list %} {% if a.foo %}{{ a.foo }}{% else %}Whatever exception text you want{% endif %} {{ a.bar }} {% endfor %}

Re: Exception in template

2008-04-12 Thread Malcolm Tredinnick
On Sat, 2008-04-12 at 22:13 -0300, Juanjo Conti wrote: > Suppose this template code: > > {% for a in list %} > a.foo a.bar > {% endfor %} > > The point is that only some elements of the "list" sequence have the > "foo" attribute, so a exception is thrown, but the template engine >

Re: Tag

2008-04-12 Thread Malcolm Tredinnick
On Sat, 2008-04-12 at 18:45 -0300, Claudio Escudero wrote: > Hi, > > Please, is there any way to put tag inside tag? No, this isn't possible. Use a block-like tag (something with a start tag and an end tag) if you want to do something like this. Regards, Malcolm -- The cost of feathers has

Exception in template

2008-04-12 Thread Juanjo Conti
Suppose this template code: {% for a in list %} a.foo a.bar {% endfor %} The point is that only some elements of the "list" sequence have the "foo" attribute, so a exception is thrown, but the template engine silence it. Is may template code correct or some check should be done to

Caching doesn't seem to work

2008-04-12 Thread Julien
Hi there, I've implemented caching on my site. It works on the local development environment as well as on the test online server. However it doesn't seem to work on the production server. Files are being created in the cache directory (I'm using file caching), but the page keeps being refreshed

Re: alternative to (r'^house/edit/(\d+)/$',ediHouse)?

2008-04-12 Thread J. Clifford Dyer
Heh. It should also be pointed out that security is not obfuscation. If your slug is a social security number, I don't care if you're using a one time pad for authentication, you're still going to have social security numbers in your browser history for the world to see. :) A mix of

Tag

2008-04-12 Thread Claudio Escudero
Hi, Please, is there any way to put tag inside tag? For example: {% formajax {"action": {% url inn %} } %} Displays this error: too many values to unpack Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: alternative to (r'^house/edit/(\d+)/$',ediHouse)?

2008-04-12 Thread ydjango
Agreed, for MLS records, newspaper stories, blogs entries etc. most likely there is no security issue with incrementing db ids in url, and might actually be useful in some cases as you pointed out. But substitute MLS for accounts, health records, employee records with salary information etc, and

Re: Templates won't translate

2008-04-12 Thread Basti
Never mind. I was being stupid after all. I forgot to restart the test server. Plus there was a #, fuzzy in my django.po file that led to the block not being translated. On 12 Apr., 18:45, Basti <[EMAIL PROTECTED]> wrote: > Hi there! > > Probably I'm only being stupid but I can't get my

Re: alternative to (r'^house/edit/(\d+)/$',ediHouse)?

2008-04-12 Thread James Bennett
On Fri, Apr 11, 2008 at 6:28 PM, ydjango <[EMAIL PROTECTED]> wrote: > currently I am using constructing url as /house/edit/123/ > where 123 is house data base primary key for that house. > > Can exposing the primary key in url be any security issue? > > (r'^house/edit/(\d+)/$',editHouse) > >

Re: template IndexError (list index out of range)

2008-04-12 Thread Jonathan Lukens
Of course. Thank you. I'm nearly braindead from doing taxes. On Apr 12, 11:12 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Sat, Apr 12, 2008 at 9:28 AM, Jonathan Lukens <[EMAIL PROTECTED]> > wrote: > > > > > > > I started getting an IndexError on a page today that has worked fine > > in

Re: UnicodeDecodeError: markdown failing to parse data fed by django

2008-04-12 Thread Ivan Sagalaev
fizban wrote: > On 12 Apr, 12:54, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: >> It sounds like you're using markdown 1.7. We haven't yet incorporated >> the patch necessary to handle markdown 1.7 along with the earlier >> versions. That will go in soon, though -- there's already a ticket in

Templates won't translate

2008-04-12 Thread Basti
Hi there! Probably I'm only being stupid but I can't get my templates to be translated. Everything else (translation in views etc.) works fine. I have the following structure for my project root |\__ blog |\__ some_other_app |\__ locale | \__ de |\__ ... \__ templates

Re: OS X install help --I think I broke something...

2008-04-12 Thread fizban
On 12 Apr, 18:10, superavit <[EMAIL PROTECTED]> wrote: > I have the same issues with my Leopard installation. I do have the > template loader settings as suggested and still nothing... I use Leopard on my mac as a test field for my code and I've never had an issue with it. I just grab django

Re: UnicodeDecodeError: markdown failing to parse data fed by django

2008-04-12 Thread fizban
On 12 Apr, 17:06, Jens Diemer <[EMAIL PROTECTED]> wrote: > > btw. ticket:http://code.djangoproject.com/ticket/6387 Thanks, got the .diff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: OS X install help --I think I broke something...

2008-04-12 Thread superavit
I have the same issues with my Leopard installation. I do have the template loader settings as suggested and still nothing... On Apr 9, 7:09 pm, "Justin Fagnani" <[EMAIL PROTECTED]> wrote: > Oops... it's the admin site... sorry 'bout that :/ > Check to see if you have: > >

Re: alternative to (r'^house/edit/(\d+)/$',ediHouse)?

2008-04-12 Thread J. Clifford Dyer
If your concern is people randomly (or intentionally) hitting your URLs, you might try creating a checksum of some kind on your primary key concatenated with a hidden salt string. Just make sure you keep that checksum in an index to your DB, so performance doesn't suffer as a result. There is a

Re: template IndexError (list index out of range)

2008-04-12 Thread Karen Tracey
On Sat, Apr 12, 2008 at 9:28 AM, Jonathan Lukens <[EMAIL PROTECTED]> wrote: > > I started getting an IndexError on a page today that has worked fine > in the past. The uses a wrapped object_list generic view to render a > template with the following loop: > >{% for baby in object_list %}

Re: UnicodeDecodeError: markdown failing to parse data fed by django

2008-04-12 Thread Jens Diemer
fizban schrieb: > On 12 Apr, 12:54, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: >> It sounds like you're using markdown 1.7. We haven't yet incorporated >> the patch necessary to handle markdown 1.7 along with the earlier >> versions. That will go in soon, though -- there's already a ticket in

Re: Django API interface adapter for Google App Engine

2008-04-12 Thread Chris Hoeppner
After looking into that for a while, I can't seem to understand what works and what not... ** From the file README within the project's checkout: The helper provides the following functionality: * The ability to use most manage.py commands * A BaseModel class that appears the same as the

template IndexError (list index out of range)

2008-04-12 Thread Jonathan Lukens
I started getting an IndexError on a page today that has worked fine in the past. The uses a wrapped object_list generic view to render a template with the following loop: {% for baby in object_list %} {% if baby.photo %} {% endif

Re: alternative to (r'^house/edit/(\d+)/$',ediHouse)?

2008-04-12 Thread Ned Batchelder
But this is exactly my point: the case you describe is not one of discovering ids by probing. If the employee knows the bosses' id, and can use it to see his salary, then you haven't got a secure system. Replacing the id with some random slug doesn't make it a secure system. You are talking

Re: I'd like to learn more about Django internals

2008-04-12 Thread Tim Chase
> You might be thinking of this flowchart: > http://www.djangobook.com/en/1.0/chapter03/#cn60 Yes, indeed. Must have had the wrong list of search-terms in Google's image-search. :) Thanks, -tim --~--~-~--~~~---~--~~ You received this message because you are

Re: How we can integrate Django app in Google appengine.

2008-04-12 Thread rajiv bammi
Oopsthanx a lot..great help ;) Got it.. i m trying to create and app with django in webapp ;) Catch u guys if face any issue ;) Thanks again On Sat, Apr 12, 2008 at 8:54 AM, shabda <[EMAIL PROTECTED]> wrote: > > [Shameless plug :)] > http://www.42topics.com/dumps/django/docs.html >

Re: I'd like to learn more about Django internals

2008-04-12 Thread shabda
I have been meaning to learn the code in django.db, but I can never get my head around metaclasses enough to do so. Anything you can suggest, Malcom? On Apr 12, 5:52 pm, "Erik Vorhes" <[EMAIL PROTECTED]> wrote: > You might be thinking of this >

Re: How we can integrate Django app in Google appengine.

2008-04-12 Thread shabda
[Shameless plug :)] http://www.42topics.com/dumps/django/docs.html http://www.42topics.com/dumps/appengine/doc.html On Apr 12, 4:49 pm, Chris Hoeppner <[EMAIL PROTECTED]> wrote: > I'm not sure wether you're asking how to run django on GAE [1], or how > to do that using appengine's webapp

Re: I'd like to learn more about Django internals

2008-04-12 Thread Erik Vorhes
You might be thinking of this flowchart: http://www.djangobook.com/en/1.0/chapter03/#cn60 Erik On Sat, Apr 12, 2008 at 7:00 AM, Tim Chase <[EMAIL PROTECTED]> wrote: > > > As the subject says, I'd love to learn more about how django > > works internally. > > One of the best pages I've found

Re: How we can integrate Django app in Google appengine.

2008-04-12 Thread Chris Hoeppner
I'm not sure wether you're asking how to run django on GAE [1], or how to do that using appengine's webapp framework [2]. [1] http://code.google.com/appengine/articles/django.html [2] http://code.google.com/appengine/docs/gettingstarted/ Bear in mind that AFAIK right now there's no official way

How we can integrate Django app in Google appengine.

2008-04-12 Thread rajiv bammi
Dear developers, Just a basic query, i am still not able to understand that how we can integrate Django app with Google appengine.. Let say we have a simple program in Django which says hello world.. how using django i can do it in Google Appengine.. Thanks & Regards Rajiv

Re: I'd like to learn more about Django internals

2008-04-12 Thread Chris Hoeppner
Thanks for your kind reply, Malcolm. I think I'll just take the "roll up your sleeves" way and dive in. Try to poke at the code, change things, see what happens (as in, what is affected by the change I've made, discover dependencies and usage of code pieces), and maybe give things like backends

Re: Django API interface adapter for Google App Engine

2008-04-12 Thread Eric
Here's a project being developed by Google. Guido is even involved: http://code.google.com/p/google-app-engine-django/ On Apr 12, 5:58 am, Chris Hoeppner <[EMAIL PROTECTED]> wrote: > Great stuff, man! > > I'll try to have an in-depth look this weekend and I'll se if I can help > with anything.

Re: I'd like to learn more about Django internals

2008-04-12 Thread Tim Chase
> As the subject says, I'd love to learn more about how django > works internally. One of the best pages I've found detailing this: http://www.b-list.org/weblog/2006/jun/13/how-django-processes-request/ There was a nice image/flowchart I stumbled across once, but I can't disinter it from the

Re: I'd like to learn more about Django internals

2008-04-12 Thread Malcolm Tredinnick
On Sat, 2008-04-12 at 11:15 +0100, Chris Hoeppner wrote: > Hi there, > > As the subject says, I'd love to learn more about how django works > internally. I've been doing python stuff for about a year or more, but > still can't seem to get my head around a big part of the black magic. I > wonder

I'd like to learn more about Django internals

2008-04-12 Thread Chris Hoeppner
Hi there, As the subject says, I'd love to learn more about how django works internally. I've been doing python stuff for about a year or more, but still can't seem to get my head around a big part of the black magic. I wonder if there's something I'm missing? ~ Chris

Re: Using property fields in Models:'_QuerySet' object has no attribute 'new_summary' error

2008-04-12 Thread Malcolm Tredinnick
On Fri, 2008-04-11 at 22:11 -0700, ydjango wrote: > I defined two property fields in my model as below > > but TableName.objects.all() or filter() is not retrieving them. > It is retrieving only the regular model fields. What do you mean by "not retrieving them"? They are properties defined on

Re: UnicodeDecodeError: markdown failing to parse data fed by django

2008-04-12 Thread fizban
On 12 Apr, 12:54, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > It sounds like you're using markdown 1.7. We haven't yet incorporated > the patch necessary to handle markdown 1.7 along with the earlier > versions. That will go in soon, though -- there's already a ticket in Trac > for it.

Re: Django API interface adapter for Google App Engine

2008-04-12 Thread Chris Hoeppner
Great stuff, man! I'll try to have an in-depth look this weekend and I'll se if I can help with anything. This seems like a nice solution, until someone pokes up a proper backend (stating that I'm not sure if that's possible, bearing in mind that GAE's datastore is not a RDBM). ~ Chris El

Re: UnicodeDecodeError: markdown failing to parse data fed by django

2008-04-12 Thread Malcolm Tredinnick
On Sat, 2008-04-12 at 03:24 -0700, fizban wrote: > I've fixed my issue by replacing smart_str with force_unicode in > django.contrib.markup (the portion about markdown obviously). > > Why is django (latest svn trunk) passing bytestring to markdown, which > is supposed to be fed by ascii or

Re: UnicodeDecodeError: markdown failing to parse data fed by django

2008-04-12 Thread fizban
I've fixed my issue by replacing smart_str with force_unicode in django.contrib.markup (the portion about markdown obviously). Why is django (latest svn trunk) passing bytestring to markdown, which is supposed to be fed by ascii or unicode? :\ Should I fill a ticket or is there a valid reason

UnicodeDecodeError: markdown failing to parse data fed by django

2008-04-12 Thread fizban
Hi, I'm having some trouble using django.contrib.markup -- I try to use the markdown filter and eveything works fine until I try to feed it "weird" chars (accented letters). When I do so (via the admin interface) and I access the page, markdown fails miserably and the template won't show the

Caching generic views

2008-04-12 Thread Julien
Hi there, I've been able to cache some views individually using the cache_page decorator, for example: @cache_page(60 * 15) def frontpage(request): blabla... But now I'd like to cahe some generic views that I'm using. Here are the url patterns: urlpatterns =

Re: Images and Stylesheets

2008-04-12 Thread andy baxter
Greg Lindstrom wrote: > Hello Everyone- > > I started learning Django at PyCon in Chicago and have worked most of > the way through the "Django Book" and Sams "Teach Yourself Django", as > well as "Head First HTML with CSS and XHTML". It's been quite a lot > for this old dog, but I'd like to

Re: Looking for Conferences/Events on Django, Python, MySQL, etc in Europe 2008?

2008-04-12 Thread Nicola Larosa (tekNico)
Simone Brunozzi wrote: > I'm looking for conferences or events about Django, Dabatases, Mysql, > PHP, Python, Ruby in Europe in 2008. The second Italian Python conference, with two talks on Django, one on Google App Engine, lots of other good stuff, and instant English translation of many talks: