Re: Connecting to AS400

2008-09-12 Thread Brett H
Yes - the trick is with slow odbc interfaces is to differentiate between auto-increment/log style source tables and those which may update any record. Also try and pick your tables and fields to sync judiciously and work out your sync cycle based on how expensive in time it is to retrieve all the

Re: How to prevent URL HTML encoding?

2008-09-12 Thread Ross
The URL encoding is not causing any problems in my code. Splitting the parameter on '+' works the same whether the address is 'Goo+Goo+Dolls' or 'Goo%2BGoo%2BDolls'. I can certainly add additional expressions to catch URLs with and without the trailing slash, I was just hoping there was an

Re: Django 1.0 lighttpd FastCGI redirect issue

2008-09-12 Thread Anders Bergh
On Sat, Sep 13, 2008 at 4:23 AM, Ramiro Morales <[EMAIL PROTECTED]> wrote: > Have you tried what's suggested in > > http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#ChangedthewayURLpathsaredetermined > > (under the "lighttpd + fastcgi (and others)" sub-section)? > Ack, I was a

Re: Django 1.0 lighttpd FastCGI redirect issue

2008-09-12 Thread Anders Bergh
On Sat, Sep 13, 2008 at 4:23 AM, Ramiro Morales <[EMAIL PROTECTED]> wrote: > Have you tried what's suggested in > > http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#ChangedthewayURLpathsaredetermined > > (under the "lighttpd + fastcgi (and others)" sub-section)? > Thanks! I had

Re: akismet and the new comments app

2008-09-12 Thread Thejaswi Puthraya
On Sep 12, 7:09 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: > Has anyone tried using akismet with the new comments contrib app? I've   > set up a signal handler to run on 'comment_will_be_posted' and check   > the comment with akismet, and the service is insisting my test   > comments are spam

Re: Custom Comment Form - post_comment()

2008-09-12 Thread Thejaswi Puthraya
On Sep 12, 4:55 pm, tom17 <[EMAIL PROTECTED]> wrote: > I have a similar problem like oversize. > like you said, > > "If the user is logged in and you've RequestContexts enabled, then you > can > easily pass the username like request.user.username " > > seems like it is easy but I am sorry I

Re: Uploading JPEG image problem

2008-09-12 Thread Rodney Topor
Thanks TiNo and Gremmie. Rodney On Sep 11, 12:21 pm, Rodney Topor <[EMAIL PROTECTED]> wrote: > I've installed the Python Imaging Library (PIL) so that I could upload > and display images (for the first time).  Everything works fine when I > upload PNG or GIF or TIFF files (from my Mac), but

djangoamf doesn't work with models with ImageField

2008-09-12 Thread euglena
Hi everybody, I have a model like this: class Product(models.Model): ... icon = models.ImageField(upload_to='icons/', blank=True) ... And I want my dangoamf to get a list of this model's objects. I always get an AttributeError: 'list' object has no attribute 'creation +counter' if I

Re: How to prevent URL HTML encoding?

2008-09-12 Thread Karen Tracey
On Fri, Sep 12, 2008 at 6:06 PM, Ross <[EMAIL PROTECTED]> wrote: > > The problem is it looks bad! It makes the URL unreadable, which is > what I want to prevent. For example, last.fm uses '+' symbols to > separate band names. > > http://www.last.fm/music/Goo+Goo+Dolls pretty obviously takes you

Re: Using slug in comments urls

2008-09-12 Thread Eric Abrahamsen
On Sep 13, 2008, at 8:32 AM, Shantp wrote: > > Hi, > > I did a lot of searching on this and can't figure out what I'm doing > wrong. Here's what's in my urls.py: > > share_detail = { > 'queryset': Share.objects.all(), > } > > (r'^comments/', include('django.contrib.comments.urls')), >

Re: Django 1.0 lighttpd FastCGI redirect issue

2008-09-12 Thread Ramiro Morales
On Fri, Sep 12, 2008 at 9:33 PM, Anders Bergh <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm trying to host a Django 1.0 project on lighttpd 1.4.19 on Linux, > following the lighttpd FastCGI in the Django documentation. However, > it doesn't work, it seems to redirect to /mysite.fcgi for almost >

Django 1.0 lighttpd FastCGI redirect issue

2008-09-12 Thread Anders Bergh
Hi, I'm trying to host a Django 1.0 project on lighttpd 1.4.19 on Linux, following the lighttpd FastCGI in the Django documentation. However, it doesn't work, it seems to redirect to /mysite.fcgi for almost anything I do. Here's the config: $HTTP["host"] == "labs.lamepunch.org" {

Template.render and custom tags

2008-09-12 Thread akonsu
hello, is there a way to make my custom tags and filters available to a template that i create from a string like this: template = Template(string) template.render(context) i know that i can use the "load" tag in the template, but suppose that the strings that i create templates from do not

Map API's and Django, preferences?

2008-09-12 Thread chiggsy
I'm working on a little idea. I need to display data on a map. Now, I have been reading over the gis stuff in django, I've set up PostGIS , and now i'm trying to work out how do display the data. What are some opinons on Google maps vs yahoo maps, for ease of django development ? (I am brand

Re: Setting up Admin on Fedora 9

2008-09-12 Thread Keith Eberle
The path to the admin media files is: ../site-packages/django/contrib/admin/media If you did not touch ADMIN_MEDIA_PREFIX in your project's settings.py, it should be '/media/' All you have to do is create a link. For Ubuntu, it would look like this: $ ln -s

Using slug in comments urls

2008-09-12 Thread Shantp
Hi, I did a lot of searching on this and can't figure out what I'm doing wrong. Here's what's in my urls.py: share_detail = { 'queryset': Share.objects.all(), } (r'^comments/', include('django.contrib.comments.urls')), (r'^comments/(?P[-\w]+)/?$',

Re: Customized ManyToMany in Admin

2008-09-12 Thread phred78
I followed Karen and TiNo's suggestion and added this to the Product class: def __unicode__(self): return ("%s | %s") % (self.title, self.language) It works. When listing products in classes that have "product" as a ManyToManyField, it lists them in the select box, just as I wanted. But

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread n00m
On Sep 12, 8:04 pm, David Thole <[EMAIL PROTECTED]> wrote: > Just curious,  are you using the django built in web server for > development?  The reason why I'm asking is because I don't recall > having any problems at all when changing a view and it not picking up > the change.  Every time I

Setting up Admin on Fedora 9

2008-09-12 Thread Tom MacKenzie
Hi All, I am able to view the admin pages correctly via python's development server. Once I set up in Apache it looses its format. I have tinkered with the settings.py and /etc/httpd/conf.d/python.conf so much my eyes are starting to cross :) can anyone help out a newb and post instructions

Save raises Exception exceptions.SystemError: 'error return without exception set' when bypassing Manage.py

2008-09-12 Thread emc
I am using version 1.0 and MySQL When I try to update a record in a model outside the manage.py file I get the following exception: "Exception exceptions.SystemError: 'error return without exception set' in ignored" File Structure Python |-rc1_test |-app1 save_test.py I am

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread Graham Dumpleton
On Sep 12, 11:36 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Hi, > > I use apachemod_wsgi(WSGIDaemonProcess) and for development > maximum-requests=1. > > This way I don't need to change any code for reloading: Just hit ctrl-r > (reload in firefox). I would recommend against

Re: Random NoReverseMatch

2008-09-12 Thread [EMAIL PROTECTED]
I had this problem as well. I switched to lighttpd + fast_cgi and haven't had the problem since. On 28 Aug, 11:48, tonemcd <[EMAIL PROTECTED]> wrote: > I've just come across this ticket,http://code.djangoproject.com/ticket/8221, > which has a patch attached. I've just applied the patch and

Re: How to prevent URL HTML encoding?

2008-09-12 Thread Ross
The problem is it looks bad! It makes the URL unreadable, which is what I want to prevent. For example, last.fm uses '+' symbols to separate band names. http://www.last.fm/music/Goo+Goo+Dolls pretty obviously takes you to the page for the band "Goo Goo Dolls".

Re: how to use never_cache?

2008-09-12 Thread V
Sorry, here comes the form definition class AttachForm(forms.Form): file = forms.FilePathField(label=_('Select a file to attach'), path=POSTIMAGE_ROOT, recursive=True, required=True) alt = forms.CharField(_('Description (Alternative text)'), initial=_('Image'))

Re: Customized ManyToMany in Admin

2008-09-12 Thread TiNo
I know ModelAdmin accepts a list_select_related option, for in the admin change list. I don't know if that applies in this situation though. On Fri, Sep 12, 2008 at 8:10 PM, felix <[EMAIL PROTECTED]> wrote: > > > now this will hit the database for each item in the select, to go > fetch the

Re: How to prevent URL HTML encoding?

2008-09-12 Thread julianb
A '+' doesn't have to be encoded, but it should be if it has no special meaning, maybe that's the problem here. http://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters Why does APPEND_SLASH even percent-encode? --~--~-~--~~~---~--~~ You

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread James Matthews
He might be using --no-reload On Fri, Sep 12, 2008 at 10:04 AM, David Thole <[EMAIL PROTECTED]> wrote: > > Just curious, are you using the django built in web server for > development? The reason why I'm asking is because I don't recall > having any problems at all when changing a view and it

Re: Creating an Archive

2008-09-12 Thread James Matthews
I would make a script that ran through my database and flagged this as archived (this should be a boolean flag) On Fri, Sep 12, 2008 at 1:33 PM, djandrow <[EMAIL PROTECTED]> wrote: > > Do i need to pass the months into the view using extra_context? > > Andrew > > > --

Re: Creating an Archive

2008-09-12 Thread djandrow
Do i need to pass the months into the view using extra_context? Andrew --~--~-~--~~~---~--~~ 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: Displaying a list of lists?

2008-09-12 Thread Lance F. Squire
On Sep 12, 8:32 am, Daniel Roseman <[EMAIL PROTECTED]> wrote: > You need the ifchanged tag: > > > {% for items in list %} > {% if changed items.0 %}{{ items.0 }}{% endifchanged %} td>{{ items.1 }} > {% endfor %} > Thats what I went with! Looks like it would use less processor cycles to do

Re: autofill user

2008-09-12 Thread [EMAIL PROTECTED]
On Sep 11, 11:11 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2008-09-11 at 22:16 +0200, Stephan Hoyer wrote: > > Hi All > > > i want to store the add and changetime an user to some models, therefor > > i created a abstract class to inherit from: > > > class

Re: Help: Running 1.0 and 0.96 side by side?

2008-09-12 Thread Kevin Teague
On Sep 12, 10:06 am, "Matt Conrad" <[EMAIL PROTECTED]> wrote: > On Fri, Sep 12, 2008 at 11:15 AM, Jeff Anderson > > <[EMAIL PROTECTED]> wrote: > > You can influence what this list is, by setting the PYTHONPATH > > environmental variable. All you need to do is set your PYTHONPATH > >

Re: dynamic upcast

2008-09-12 Thread dadapapa
> It does not work at all. For some reason, final_type also gets > upcasted to MediaObject?! I found the solution, now. The problem was that the __init__ method of a Model is also called when objects are restored from the database. So when the base class gets initialized by the QueryManager, it

Re: cannot import name entrys

2008-09-12 Thread KillaBee
On Sep 8, 6:13 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Mon, Sep 8, 2008 at 6:06 PM, KillaBee < > > > > [EMAIL PROTECTED]> wrote: > > On Sep 8, 3:26 pm, Daniel Roseman <[EMAIL PROTECTED]> > > wrote: > > > On Sep 8, 9:16 pm, KillaBee <[EMAIL PROTECTED]> > > > wrote: > > > > > I keep

Re: How to prevent URL HTML encoding?

2008-09-12 Thread Karen Tracey
On Fri, Sep 12, 2008 at 1:49 PM, Ross <[EMAIL PROTECTED]> wrote: > > Karen, you were exactly right: APPEND_SLASH is the culprit here. If > you hit '/search/hotel+air/', the address stays that way. Hitting '/ > search/hotel+air' though redirects you to '/search/hotel%2Bair/' > > I am using '+'

Re: Customized ManyToMany in Admin

2008-09-12 Thread felix
now this will hit the database for each item in the select, to go fetch the language object to get the language name. so for extra credit, where do we add a select_related() for the widget ? On Sep 12, 7:43 pm, TiNo <[EMAIL PROTECTED]> wrote: > Probably more like: > def __unicode__(self): >  

Re: how to cache form request in Django?

2008-09-12 Thread julianb
On Sep 12, 4:17 pm, Ross <[EMAIL PROTECTED]> wrote: > If you create restful URLs that your forms forward to, the restful > URLs could be cached. (I'm not sure if restful is the real term, but > that's what I've heard them called.) Instead of your form directing to > >

Re: How to prevent URL HTML encoding?

2008-09-12 Thread Ross
Karen, you were exactly right: APPEND_SLASH is the culprit here. If you hit '/search/hotel+air/', the address stays that way. Hitting '/ search/hotel+air' though redirects you to '/search/hotel%2Bair/' I am using '+' because it logically makes sense for what I am trying to do. I am doing a

Re: Customized ManyToMany in Admin

2008-09-12 Thread TiNo
Probably more like: def __unicode__(self): return u'%s | %s' % (self.title, self.language.name) because self.language is the language object, not the name (or title) string. On Fri, Sep 12, 2008 at 7:32 PM, phred78 <[EMAIL PROTECTED]> wrote: > > Oh, I see! > You mean something like > > def

Re: Customized ManyToMany in Admin

2008-09-12 Thread phred78
Oh, I see! You mean something like def __unicode__(self): return self.title + ' | ' + self.language --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread David Thole
Just curious, are you using the django built in web server for development? The reason why I'm asking is because I don't recall having any problems at all when changing a view and it not picking up the change. Every time I save a file, the build in web server automatically updates it. If

Re: Customized ManyToMany in Admin

2008-09-12 Thread Karen Tracey
On Fri, Sep 12, 2008 at 12:40 PM, phred78 <[EMAIL PROTECTED]> wrote: > > Hello all, > > I've been googling for hours and I can't figure this out. I'm working > on my first real project and came across a problem that some of you > might have already solved. > > I have a table called Products and

Re: Help: Running 1.0 and 0.96 side by side?

2008-09-12 Thread Matt Conrad
On Fri, Sep 12, 2008 at 11:15 AM, Steve Holden <[EMAIL PROTECTED]> wrote: > > Matt Conrad wrote: >> 2008/9/12 Jarek Zgoda <[EMAIL PROTECTED]>: >>> Use virtualenv (http://pypi.python.org/pypi/virtualenv) with separate >>> environments for each django version. >> >> Thanks Jarek. I will try the

Re: How to prevent URL HTML encoding?

2008-09-12 Thread Karen Tracey
On Fri, Sep 12, 2008 at 12:31 PM, Ross <[EMAIL PROTECTED]> wrote: > > Sorry, Julian, I misunderstood what you wrote. I see the Django HTML > escaping doesn't change the '+' symbol, which makes this even more > confusing... Even more strangely, this only happens intermittently. > I'd guess this

Re: Help: Running 1.0 and 0.96 side by side?

2008-09-12 Thread Matt Conrad
On Fri, Sep 12, 2008 at 11:15 AM, Jeff Anderson <[EMAIL PROTECTED]> wrote: > You can influence what this list is, by setting the PYTHONPATH > environmental variable. All you need to do is set your PYTHONPATH > appropriately, and point it to the appropriate place, depending on which > Django

Re: Apache and mod_python trouble

2008-09-12 Thread mccomas . chris
Looks like you're trying to call /polls/ but your urls.py has the directory as /poll/ On Sep 12, 12:36 pm, Tonu Mikk <[EMAIL PROTECTED]> wrote: > Karen Tracey wrote: > > On Fri, Sep 12, 2008 at 11:47 AM, Tonu Mikk <[EMAIL PROTECTED] > > > wrote: > > >     Hello, > > >  

Re: Apache and mod_python trouble

2008-09-12 Thread Tonu Mikk
Karen Tracey wrote: > On Fri, Sep 12, 2008 at 11:47 AM, Tonu Mikk <[EMAIL PROTECTED] > > wrote: > > > Hello, > > I am having trouble configuring Apache and mod_python to work with my > project. > > I am using Ubuntu Linux 7.10 with Apache 2. My project

Customized ManyToMany in Admin

2008-09-12 Thread phred78
Hello all, I've been googling for hours and I can't figure this out. I'm working on my first real project and came across a problem that some of you might have already solved. I have a table called Products and one called Language. The client will insert several products per language. This is

Re: How to prevent URL HTML encoding?

2008-09-12 Thread Steve Holden
Ross wrote: > Sorry, Julian, I misunderstood what you wrote. I see the Django HTML > escaping doesn't change the '+' symbol, which makes this even more > confusing... Even more strangely, this only happens intermittently. > "+" might be a bad choice of separator anyway, given that the plus sign

Re: BooleanField trouble

2008-09-12 Thread Gremmie
On Sep 12, 11:14 am, Jason <[EMAIL PROTECTED]> wrote: > yeah, that did work .. I'm just surprised I have to go through that > extra step now, when > before 1.0 release it seems I didn't have too :/ Great, but why would you think assigning a string to a Boolean field would work in the first

Re: My CACHE FAQ ... A for Asked (Not Answered)

2008-09-12 Thread Gremmie
On Sep 12, 11:11 am, vbgunz <[EMAIL PROTECTED]> wrote: > > > > Q. At what point in time do the query arguments come into play for > > > CACHE_BACKEND? Is it only a certain combination of arguments? Does > > > CacheMiddleware, UpdateCacheMiddleware, FetchFromCacheMiddleware play > > > any part at

Re: How to prevent URL HTML encoding?

2008-09-12 Thread Ross
Sorry, Julian, I misunderstood what you wrote. I see the Django HTML escaping doesn't change the '+' symbol, which makes this even more confusing... Even more strangely, this only happens intermittently. On Sep 12, 11:04 am, julianb <[EMAIL PROTECTED]> wrote: > On Sep 12, 4:22 pm, "Norman

Re: How to prevent URL HTML encoding?

2008-09-12 Thread Ross
http://www.w3schools.com/TAGS/ref_urlencode.asp http://en.wikipedia.org/wiki/Percent-encoding The URL percent encoding for '+' is '%2B'. Norman, I understand how to mark variables as safe inside templates, but the problem I am having is with the URL in your browser bar after hitting a URL like

Re: Help: Running 1.0 and 0.96 side by side?

2008-09-12 Thread Steve Holden
Matt Conrad wrote: > 2008/9/12 Jarek Zgoda <[EMAIL PROTECTED]>: >> Use virtualenv (http://pypi.python.org/pypi/virtualenv) with separate >> environments for each django version. > > Thanks Jarek. I will try the directory based approach first, but also > keep this in mind. > OK, here's why you

Re: Help: Running 1.0 and 0.96 side by side?

2008-09-12 Thread Jeff Anderson
Matt Conrad wrote: > Thanks for the reply. I don't quite understand yet. Let's see how close I am. > > I have a Python application directory (on my machine, > C:\apps\Python25\). Inside that directory I have > \Lib\site-packages\django, which is currently v0.96. > > Right now, the PYTHONPATH

Re: BooleanField trouble

2008-09-12 Thread Jason
yeah, that did work .. I'm just surprised I have to go through that extra step now, when before 1.0 release it seems I didn't have too :/ Anyways, thanks for the thoughts :) On Sep 12, 6:15 am, Gremmie <[EMAIL PROTECTED]> wrote: > On Sep 11, 11:55 pm, Jason <[EMAIL PROTECTED]> wrote: > > > > >

Re: My CACHE FAQ ... A for Asked (Not Answered)

2008-09-12 Thread vbgunz
> > I was reading the Django definitive guide and practicing on 0.96.2 > > *but* caching is seriously broken on that version. I mean seriously. > > Almost all of my issues were gone with a simple upgrade. I switched > > from the book to the docs but still have questions. I would really > >

Re: Accessing field names and data from a queryset in a generic template

2008-09-12 Thread Norman Harman
SnappyDjangoUser wrote: > I am a new django user so please excuse my naive question. > > I have a generic view function (see below) which is used to perform a > query on one of many tables (depending on the "model" argument) and > then render the results to a single template file

Re: How to prevent URL HTML encoding?

2008-09-12 Thread julianb
On Sep 12, 4:22 pm, "Norman Harman" <[EMAIL PROTECTED]> wrote: > http://docs.djangoproject.com/en/dev/ref/templates/builtins/#safe > > http://docs.djangoproject.com/en/dev/topics/templates/#id2 HTML escaping doesn't make %2B out of '+'... --~--~-~--~~~---~--~~ You

Re: Apache and mod_python trouble

2008-09-12 Thread Karen Tracey
On Fri, Sep 12, 2008 at 11:47 AM, Tonu Mikk <[EMAIL PROTECTED]> wrote: > > Hello, > > I am having trouble configuring Apache and mod_python to work with my > project. > > I am using Ubuntu Linux 7.10 with Apache 2. My project is in > /var/www/polls directory. This is also where the settings.py

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread n00m
On Sep 12, 6:11 pm, "Keith Eberle" <[EMAIL PROTECTED]> wrote: > i don't think he marked it as spam, but rather "spam assassin" did... > > keith If so then my sincere apologies to Thomas Guettler --~--~-~--~~~---~--~~ You received this message because you are

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread n00m
Much better just to keep in views.py a "secret", not for public, "reloader" page: === views.py === import views_base def reloader(request): reload(views_base) return

Re: cannot log a user in right after creating them :/

2008-09-12 Thread vbgunz
Regarding this thread posted on Google http://groups.google.com/group/django-users/browse_thread/thread/9ba514c46d9fd2b3/e64ba2c91cc16a0a#e64ba2c91cc16a0a (cannot log a user in right after creating them :/) This very same code does not work in 0.96.2 but upgrading to 1.0 and without modifying

Re: Help: Running 1.0 and 0.96 side by side?

2008-09-12 Thread Matt Conrad
2008/9/12 Jarek Zgoda <[EMAIL PROTECTED]>: > > Use virtualenv (http://pypi.python.org/pypi/virtualenv) with separate > environments for each django version. Thanks Jarek. I will try the directory based approach first, but also keep this in mind. Matt

Re: Help: Running 1.0 and 0.96 side by side?

2008-09-12 Thread Matt Conrad
Thanks for the reply. I don't quite understand yet. Let's see how close I am. I have a Python application directory (on my machine, C:\apps\Python25\). Inside that directory I have \Lib\site-packages\django, which is currently v0.96. Right now, the PYTHONPATH environment variable is not set

Apache and mod_python trouble

2008-09-12 Thread Tonu Mikk
Hello, I am having trouble configuring Apache and mod_python to work with my project. I am using Ubuntu Linux 7.10 with Apache 2. My project is in /var/www/polls directory. This is also where the settings.py file is. This directory and all files and directories are owned by www-data (the

Re: The User mess

2008-09-12 Thread coulix
I m interested in these questions too. I had three completely different types of profile and i used a generic relationship on a CommeProfile model. I had to do stuff like: user.get_profile().content_object.profile_foo_attribute Its not too much of a pain but i wish there were some better ways.

Re: Help: Running 1.0 and 0.96 side by side?

2008-09-12 Thread Jarek Zgoda
Use virtualenv (http://pypi.python.org/pypi/virtualenv) with separate environments for each django version. Wiadomość napisana w dniu 2008-09-12, o godz. 16:51, przez Matt: > > I'm slowly learning Django. I'd like to run 1.0 and 0.96 side by > side, running on Windows XP. Right now, I only

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread Keith Eberle
i don't think he marked it as spam, but rather "spam assassin" did... keith On Fri, Sep 12, 2008 at 10:47 AM, n00m <[EMAIL PROTECTED]> wrote: > > > This way I don't need to change any code > > Seems you absolutely misunderstand what I was talking about but > you dared, in bold manner, to label

Re: status of per-object-level permission

2008-09-12 Thread dadapapa
> > I was wondering if per-object-level (aka row-level) permissions have > > been included into this release. > > if not, is there any plan to include > > them, > > You say "them" as if there's an existing working addition to Django that > supports this and is in some way the obviously correct

Re: Help: Running 1.0 and 0.96 side by side?

2008-09-12 Thread Jeff Anderson
Matt wrote: > Does anyone have ideas on running 0.96 and 1.0 side by side safely? > All I've done in the past is set my PYTHONPATH based on which checkout/release of Django I want used in a particular instance. It works quite well, even in production. Jeff Anderson signature.asc

Help: Running 1.0 and 0.96 side by side?

2008-09-12 Thread Matt
I'm slowly learning Django. I'd like to run 1.0 and 0.96 side by side, running on Windows XP. Right now, I only have version 0.96 installed. My ideal scenario would be to be able to use either: from django096.conf.urls.defaults import * or from django.conf.urls.defaults import * to switch

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread n00m
> This way I don't need to change any code Seems you absolutely misunderstand what I was talking about but you dared, in bold manner, to label my subject as a spam. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread n00m
Hi, Tom! Now imagine production environment on an hoster machine on which Apache is running in 24/7 mode. === Of course, I didn't mean my trick for home/localhost Cheers! --~--~-~--~~~---~--~~ You received this message

dynamic upcast

2008-09-12 Thread dadapapa
Dear all, I am playing around with model inheritance introduced in django 1.0. In particular, I am trying to achieve something that might be called dynamic-casts (with reference to C++). Consider the following example type hierarchy: MediaObject | +-- ImageObject | | |

Re: how to use never_cache?

2008-09-12 Thread Karen Tracey
On Fri, Sep 12, 2008 at 4:21 AM, Vikti <[EMAIL PROTECTED]> wrote: > Hi! > > I am trying to write a simple app on top of admin [1] that lists a > directories content using a FilePathField element. > > It works kind of alright except that the list isn't updated. I presume that > this is something

Re: Core = True replacemente

2008-09-12 Thread Alessandro Ronchi
2008/9/12 Karen Tracey <[EMAIL PROTECTED]>: > > You don't need to replace it, just delete it. (In old admin it was used to > decide when an intline-edited object should be deleted. New admin has an > explicit 'delete' checkbox for this, so core is no longer necessary.) Simply beautiful! --

Re: How to prevent URL HTML encoding?

2008-09-12 Thread Norman Harman
Ross wrote: > I setup a URL that accepts any number of characters and the '+' > symbol, which works just fine. > > /search/pets/dog+cat > /search/pets/turtle > /search/pets/turtle+cat+mouse > > All of those URLs go to the same view. The view splits the third > argument on the '+' symbol and

Re: how to cache form request in Django?

2008-09-12 Thread Ross
http://docs.djangoproject.com/en/dev/topics/cache/#the-per-site-cache The cache documentation says, "The cache middleware caches every page that doesn't have GET or POST parameters." If you create restful URLs that your forms forward to, the restful URLs could be cached. (I'm not sure if

how to cache form request in Django?

2008-09-12 Thread zwu
Hey django guys, I'm trying to cache requests with the same form query strings. Is there any ideas to enable such caching? The cache control seems to be not working when the url is form requests. Anybody know this problem are highly appreciated. Thanks. zlwu

akismet and the new comments app

2008-09-12 Thread Eric Abrahamsen
Has anyone tried using akismet with the new comments contrib app? I've set up a signal handler to run on 'comment_will_be_posted' and check the comment with akismet, and the service is insisting my test comments are spam no matter what. I'm using the voidspace python akismet API, and

How to prevent URL HTML encoding?

2008-09-12 Thread Ross
I setup a URL that accepts any number of characters and the '+' symbol, which works just fine. /search/pets/dog+cat /search/pets/turtle /search/pets/turtle+cat+mouse All of those URLs go to the same view. The view splits the third argument on the '+' symbol and uses the list to do some work.

Re: Core = True replacemente

2008-09-12 Thread Karen Tracey
On Fri, Sep 12, 2008 at 9:38 AM, Alessandro <[EMAIL PROTECTED]>wrote: > How can I replace the core=True keyword in django 1.0 ? > The backwards incompatible changes page doesn't explain how to do the > same thing without the constructor keyword... > > You don't need to replace it, just delete it.

Core = True replacemente

2008-09-12 Thread Alessandro
How can I replace the core=True keyword in django 1.0 ? The backwards incompatible changes page doesn't explain how to do the same thing without the constructor keyword... -- Alessandro Ronchi Skype: aronchi http://www.alessandroronchi.net SOASI Soc.Coop. - www.soasi.com Sviluppo Software e

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread Thomas Guettler
Hi, I use apache mod_wsgi (WSGIDaemonProcess) and for development maximum-requests=1. This way I don't need to change any code for reloading: Just hit ctrl-r (reload in firefox). Thomas n00m schrieb: > 1. > Rename views.py to (say) views_base.py > > 2. > Create a new views.py file, with

A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread n00m
1. Rename views.py to (say) views_base.py 2. Create a new views.py file, with code like this: import os.path import views_base def test(request): if os.path.isfile(__file__ + '1'): reload(views_base) return views_base.test(request) def tables(request, table_name=None,

Outputting id or class attributes in tags generated by as_ul

2008-09-12 Thread fvox13
Is there a way to make django include id or class attributes in the tags it generates with form.as_ul? Or any of the form rendering shortcuts? I'm having trouble styling radio buttons in a form, and if I could style the tags for the radio buttons separately from every other tag in the form, it

Re: Uploading JPEG image problem

2008-09-12 Thread Gremmie
On Sep 10, 9:21 pm, Rodney Topor <[EMAIL PROTECTED]> wrote: > And by the way, what is the recommended way to resize images to a > desired maximum size after uploading?  E.g., using an appropriate PIL > function? > I can't directly answer that, but you may want to check out the Photologue

Re: BooleanField trouble

2008-09-12 Thread Gremmie
On Sep 11, 11:55 pm, Jason <[EMAIL PROTECTED]> wrote: > I have a "true" or "false" string coming in from an ajax call to my > view. I'm then turning around and directly assigning that string from > the front end to my model object and saving it. > > Before the upgrade to django 1.0, the database

need help

2008-09-12 Thread vytautas
{% ifnotequal CurrentComponent None %} {% for key in ComponentDict %} {{ComponentDict.CurrentComponent}} // CurrentComponent = 'project' {% endfor %} {% endifnotequal %} I write this code to the template code, but this does not work. Wenn I write this: {%

Re: My CACHE FAQ ... A for Asked (Not Answered)

2008-09-12 Thread Gremmie
On Sep 11, 7:58 am, vbgunz <[EMAIL PROTECTED]> wrote: > I was reading the Django definitive guide and practicing on 0.96.2 > *but* caching is seriously broken on that version. I mean seriously. > Almost all of my issues were gone with a simple upgrade. I switched > from the book to the docs but

Re: Displaying a list of lists?

2008-09-12 Thread Steve Holden
Daniel Roseman wrote: > On Sep 12, 1:04 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> [OT question: Why does top-posting seem to be the default response mode on >> this list?] >> As a follow-up to this question, how would one cast the output as a table >> where the major field is only

Re: DjangoCon video

2008-09-12 Thread Daniel Hepper
I'm also looking forward to the videos and just wanted to share this: "Videos should be available around Monday next week." http://twitter.com/djangocon/statuses/918620831 Daniel Am Donnerstag, den 11.09.2008, 19:25 +0700 schrieb Ronny Haryanto: > On Thu, Sep 11, 2008 at 5:28 PM, Petar Marić

Re: Displaying a list of lists?

2008-09-12 Thread Daniel Roseman
On Sep 12, 1:04 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > [OT question: Why does top-posting seem to be the default response mode on > this list?] > As a follow-up to this question, how would one cast the output as a table > where the major field is only displayed on change. I.e., how to

Re: Displaying a list of lists?

2008-09-12 Thread Steve Holden
[OT question: Why does top-posting seem to be the default response mode on this list?] As a follow-up to this question, how would one cast the output as a table where the major field is only displayed on change. I.e., how to produce tabular output of the form Widgets Widget 1

Re: Custom Comment Form - post_comment()

2008-09-12 Thread tom17
I have a similar problem like oversize. like you said, "If the user is logged in and you've RequestContexts enabled, then you can easily pass the username like request.user.username " seems like it is easy but I am sorry I couldn't figure out how to pass it to the form..

Ongoing UnicodeDecodeError's with web crawlers and file caching

2008-09-12 Thread Julien Phalip
Hi, I'm running a fairly large website (10,000 news items). Initially it was made in ASP with MSSQL, then I took the project over and ported it to PHP and MYSQL. Finally, 6 months ago I ported it to Django and MySQL. Now, ever since the site has been running on Django, I've received about a

how to use never_cache?

2008-09-12 Thread Vikti
Hi! I am trying to write a simple app on top of admin [1] that lists a directories content using a FilePathField element. It works kind of alright except that the list isn't updated. I presume that this is something related to caching so I added @never_cache to the view function, but it didn't

Re: Connecting to AS400

2008-09-12 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-09-11, o godz. 22:50, przez Jason Sypolt: > Is it possible to connect to an as400 database using django > (preferably) or with python? I would like to build a product catalog > site using django and read in products and send orders to the as400. DB2/400 is

Re: Making sure published date is respected in views

2008-09-12 Thread Marcelo Ramos
2008/9/12 Dana <[EMAIL PROTECTED]>: > > Hey all, > > Wondering what the best technique would be to make sure that an entry > (such as a blog entry/story/etc...) with a datetime object 'pub_date' > does not show up on the front end if the pub_date is in the future. I > would assume using

  1   2   >