Re: Size of text field in admin

2006-08-13 Thread Bryan Chow
On 8/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Currently, in the admin interface, the size of a text field is > defaulted at 50 for char vars and 10 for integer types. > > I would like to change this in the model and have it propegate through > to the admin interface. Is there a way

Size of text field in admin

2006-08-13 Thread callwardt
Hi Currently, in the admin interface, the size of a text field is defaulted at 50 for char vars and 10 for integer types. I would like to change this in the model and have it propegate through to the admin interface. Is there a way to do this easily? Thanks in advanced.

Re: Simplifying template?

2006-08-13 Thread limodou
On 8/13/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 7/31/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > > I would actually be okay writing the function in the view code, if we > > had a map filter. > > > > {{ s.teachers|map:list_func|join:";" }} > > > > Then add the following to the

custom manipulator - TextField or SelectField in RadioSelectField?

2006-08-13 Thread Chris Kelly
Hey all, I am trying to create a series of radio buttons where you can select one radio button, and next to the selection will be a Text Field, drop box, or maybe both, for additional information related/ needed for the current radio selection. like so: Radio | Label (o) show all rows () Limit

Re: Simplifying template?

2006-08-13 Thread SmileyChris
Ah, I get it now. You're right - context isn't available to filters. My more simplistic suggestion of {{ s.teachers|loop:"userinfo.informal_name"|join:"; " }} should still work however. --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Django 0.95 on Dreamhost

2006-08-13 Thread Jay Parlar
On 8/13/06, Apple <[EMAIL PROTECTED]> wrote: > > Hi has anyone tried running Django 0.95 on Dreamhost? I only tried to > setup a simple project following the dreamhost's wiki. I am getting a > string index out of range exception on common.py: I don't see anything obviously wrong, but I don't

Re: Chaining filter & exclude weirdness in many-to-many relationships

2006-08-13 Thread Malcolm Tredinnick
On Sun, 2006-08-13 at 17:14 -0700, [EMAIL PROTECTED] wrote: > I'm trying to get a queryset of all users in two particluar groups that > *aren't* in a third particular group. This same conversation is going on in another thread at the moment, so let me explain the general case: any chained filter

Re: Shell not picking up db changes

2006-08-13 Thread Malcolm Tredinnick
On Sun, 2006-08-13 at 22:05 +, cyberco wrote: > I may have cheered to early: what if I don't use 'import as', but > 'site.app.models import *'? If I do 'reload(models)' the Django models > are reloaded, and doing 'reload(site.app.models)' throws an exception > saying 'site' does not exist...

Re: Beginner questions on writing views

2006-08-13 Thread Malcolm Tredinnick
On Sun, 2006-08-13 at 09:13 -0700, Karen Tracey wrote: > I'm working through the tutorial, applying its lessons to my own > database. So for example where it covers writing a detail view for the > Poll model, I think really I'm going to want a detail view for each of > the models in my database,

Re: Problem of render context

2006-08-13 Thread Malcolm Tredinnick
On Sun, 2006-08-13 at 17:10 +, 一首诗 wrote: > Actually, it's not the problem of encoding, I think. Then you need to provide a more concrete example. Show a small example of the input string (UTF-8 encoded) and the HTTP headers and bytes you get in the response so that we can help you diagnose

Chaining filter & exclude weirdness in many-to-many relationships

2006-08-13 Thread [EMAIL PROTECTED]
I'm trying to get a queryset of all users in two particluar groups that *aren't* in a third particular group. Here's what I tried*: User.objects.filter(groups__in=(author_group, guide_group)).exclude(groups=staff_group) This is the SQL produced: SELECT * FROM auth_user LEFT OUTER JOIN

Re: Compress images on upload?

2006-08-13 Thread Jay Parlar
On 8/13/06, Bryan Chow <[EMAIL PROTECTED]> wrote: > > Optional parameter for JPEG quality added :) > > http://www.verdjn.com/wiki/PhotoField Beautiful, now it's worth my time ;-) Seriously, thanks a lot. Jay P. --~--~-~--~~~---~--~~ You received this message

Re: Compress images on upload?

2006-08-13 Thread Bryan Chow
Optional parameter for JPEG quality added :) http://www.verdjn.com/wiki/PhotoField On 8/12/06, Bryan Chow <[EMAIL PROTECTED]> wrote: > Hi Jay, > > Here's a custom field that automatically resizes the uploaded image > using PIL. You should be able to modify save_file() to adjust the JPEG >

Re: Simplifying template?

2006-08-13 Thread Todd O'Bryan
On Aug 13, 2006, at 6:01 PM, SmileyChris wrote: > > > Adrian Holovaty wrote: >> On 7/31/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote: >>> I would actually be okay writing the function in the view code, >>> if we >>> had a map filter. >>> >>> {{ s.teachers|map:list_func|join:";" }} >>> >>> Then

Re: Shell not picking up db changes

2006-08-13 Thread cyberco
I may have cheered to early: what if I don't use 'import as', but 'site.app.models import *'? If I do 'reload(models)' the Django models are reloaded, and doing 'reload(site.app.models)' throws an exception saying 'site' does not exist... --~--~-~--~~~---~--~~

Re: Simplifying template?

2006-08-13 Thread SmileyChris
Adrian Holovaty wrote: > On 7/31/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > > I would actually be okay writing the function in the view code, if we > > had a map filter. > > > > {{ s.teachers|map:list_func|join:";" }} > > > > Then add the following to the context: > > > > "list_func":

Re: Shell not picking up db changes

2006-08-13 Thread cyberco
Ah! Thanks for the tip! I totally forgot about Python's reload method because my mind was on a 'db-track' all the time. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Django 0.95 on Dreamhost

2006-08-13 Thread Apple
Hi has anyone tried running Django 0.95 on Dreamhost? I only tried to setup a simple project following the dreamhost's wiki. I am getting a string index out of range exception on common.py: -- error messages --

Re: Shell not picking up db changes

2006-08-13 Thread Pedro Lima
Module reload works as expected >>> import uatki.blogdata.models as m >>> e = m.Blog.objects.get(id=1) >>> e.test() Traceback (most recent call last): File "", line 1, in ? AttributeError: 'Blog' object has no attribute 'test' [ changed the model to have a test method ] >>> reload(m) >>> e

Re: what features do you like to see in a rss reader

2006-08-13 Thread [EMAIL PROTECTED]
René Pijlman wrote: > Self-learning relevance ranking of individual posts. Bayesian, or > otherwise. Information overload is problem #1 for weblogs/rss. > I agree - it would be very nice to have something like that, but I am not sure if a was thinking about tnat kind of features :) Anyway, if

Re: Chain filters on ManyToManyField

2006-08-13 Thread cyberco
Ai, really? I'm a n00b when it comes to SQL and the SQL statement of a chained filter (as listed by connection.queries) is about 8 (!) lines of SQL abacadabra. Sure there is no other way to solve this issue? Will the bug be fixed in the next release?

Re: Getting properties of parent objects into a template

2006-08-13 Thread Ivan Sagalaev
mediumgrade ÐÉÛÅÔ: > I have a simple blog app that I am working on. In this app, I have > ojects for each entry as well as the author who wrote it. I wrote a > simple view which displays a list of all entrys made, but I want that > list to include the name of the author. Since the author's name

Re: Getting properties of parent objects into a template

2006-08-13 Thread Bryan Chow
Hi David, Not sure what you mean by "parent object". If author is a ForeignKey in your blog_entry model, and author has a field called full_name, then you should be able to use {{ blog_entry.author.full_name }}. Otherwise, you could just place author in the context that's passed to your

edit_inline behavior

2006-08-13 Thread John
Howdy -- edit_inline seems to be doing something funky when I use it through update_object generic view. I've got a model that looks something like this: class StationEvent(models.Model): date = models.DateTimeField() description = models.CharField(maxlength = 150) class Admin:

Shell not picking up db changes

2006-08-13 Thread cyberco
Using the ipython started from manage.py I noticed that changes to the db are not automatically picked up (added values for instance). I have to restart the shell to pick them up, which also means I have to reimport everything and I loose my shell history. Is there a way to pick up the changes

Getting properties of parent objects into a template

2006-08-13 Thread mediumgrade
I have a simple blog app that I am working on. In this app, I have ojects for each entry as well as the author who wrote it. I wrote a simple view which displays a list of all entrys made, but I want that list to include the name of the author. Since the author's name is not part of the entry,

cache anonymous error with request.user ?

2006-08-13 Thread dummy
Hi, has anybody seen the following traceback: Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/django/core/servers/basehttp.py", line 272, in run self.result = application(self.environ, self.start_response) File

Re: models that reference each other through foreign key

2006-08-13 Thread Bryan Murdock
On 8/12/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > On 12-Aug-06, at 3:45 PM, Maciej Bliziñski wrote: > > >> committee = models.ForeignKey( 'Committee' ) > > > > You shouldn't use the string argument (I mean, I never do that). And > > what if one person is in two committees? > >

Re: Beginner questions on writing views

2006-08-13 Thread Karen Tracey
At 12:54 PM 8/13/2006, you wrote: >You might want to look at generic views. When you write "my views.py >is very simple", that's a cue that a generic view is a good idea. Ah, there it is right in the next section of the tutorial -- in fact from a quick glance they seem to use the exact same

Re: Case sensitivity with different database backends

2006-08-13 Thread Don Arbow
On Aug 13, 2006, at 9:57 AM, Jon Atkinson wrote: > I've noticed that my application changes case sensitivity in queries > depending on whether it is using MySQL or sqlite as the database > backend > > ... > If there a recommended way to deal with this? I want to avoid forcing > a certain scheme

Re: Problem of render context

2006-08-13 Thread 一首诗
Actually, it's not the problem of encoding, I think. For example, if s is a string, the render() method should treate {{ s }} in the way print() does. But now what I see on the page is something like you see in a interactive python console. >>> print s XXX #Some text >>> s '\x0f\xde'

Case sensitivity with different database backends

2006-08-13 Thread Jon Atkinson
Hi, I've noticed that my application changes case sensitivity in queries depending on whether it is using MySQL or sqlite as the database backend The simplest test case is as follows: My database contains a user record, in which the username is = "jon" My urls.py is simply as follows:

Re: Beginner questions on writing views

2006-08-13 Thread Don Arbow
On Aug 13, 2006, at 9:13 AM, Karen Tracey wrote: > > I'm working through the tutorial, applying its lessons to my own > database. So for example where it covers writing a detail view for > the > Poll model, I think really I'm going to want a detail view for each of > the models in my database,

Beginner questions on writing views

2006-08-13 Thread Karen Tracey
I'm working through the tutorial, applying its lessons to my own database. So for example where it covers writing a detail view for the Poll model, I think really I'm going to want a detail view for each of the models in my database, and they're all going to be the same except for the name of

Re: Django Blog software

2006-08-13 Thread Pedro Lima
For a more complete blog application I suggest checking limodou's woodlog http://www.djangocn.org/help/#does-woodlog-is-open-source --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Django not working with FCGI

2006-08-13 Thread cypher543
It's an odd error. I requested that my host install it for me, and they did. So the error went a way, but it comes back later. Then it goes away again. Just refresh the page to get the IndexError. --~--~-~--~~~---~--~~ You received this message because you are

Re: Django Blog software

2006-08-13 Thread [EMAIL PROTECTED]
Say it's GPL :) I've used "metrohacker" template which can be found on oswd.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Re: Re: Django Blog software

2006-08-13 Thread Jon Atkinson
Thank you both for the replies. Riklaunim: Have you chosen a license for miniblog? Is it okay for me to make some changes and re-release it? --Jon > On 13/08/06, David Larlet <[EMAIL PROTECTED]> wrote: > > > > 2006/8/13, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > > > > > Hi, > > > > > > I've

Re: session management

2006-08-13 Thread Jan Claeys
Op do, 10-08-2006 te 09:15 +, schreef uselpa: > Unless you check that the IP from which the request is coming is the > same IP from which the initial request came. Which breaks if the user is using a pool of proxy servers... -- Jan Claeys

Re: Chain filters on ManyToManyField

2006-08-13 Thread Malcolm Tredinnick
On Sun, 2006-08-13 at 12:31 +, cyberco wrote: > Having: > ___ > > class Pizza(models.Model): > name = models.TextField() > toppings = models.ManyToManyField(Topping) > > class Topping(models.Model): > name = models.TextField() > ___ > > ...and for

Re: Problem of render context

2006-08-13 Thread Malcolm Tredinnick
On Sun, 2006-08-13 at 12:33 +, 一首诗 wrote: > When use something like this in a template > > {{ message }} X > > and render it in this way: > > c = Context({'message':s}) # s is an string encoded in utf-8 > Response(template.render(c)) > > What I got is: > >

Re: Compress images on upload?

2006-08-13 Thread Nebojša Đorđević
On 12 Aug 2006, at 06:58, Jay Parlar wrote: And just to note, I tried doing compression with PIL in my model's save() method. The problem is that files aren't written to disk until *after* the save() method is complete. You can look at http://trac.studioquattro.biz/djangoutils/wiki/

Problem of render context

2006-08-13 Thread 一首诗
When use something like this in a template {{ message }} X and render it in this way: c = Context({'message':s}) # s is an string encoded in utf-8 Response(template.render(c)) What I got is: '\x??\x??..\x??\x??' What's the problem??

Chain filters on ManyToManyField

2006-08-13 Thread cyberco
Having: ___ class Pizza(models.Model): name = models.TextField() toppings = models.ManyToManyField(Topping) class Topping(models.Model): name = models.TextField() ___ ...and for instance having toppings 'tomato' and 'cheese', how do I select all pizza's with

Re: Django Blog software

2006-08-13 Thread David Larlet
2006/8/13, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > Hi, > > I've been playing with Django for a few weeks, and I've been looking > for some blog software which I can use for my blog and also play with > extending to help me learn a little more about Django. I searched the > Django wiki, and

Re: django + lighttpd on FreeBSD, possible CACHE_BACKEND problem?

2006-08-13 Thread Wiktor Grębla
Wiktor Grębla napisał(a): > I was wondering, is there any way to set a cookie valid for the > current session only, without setting global > SESSION_EXPIRE_AT_BROWSER_CLOSE? I should RTFM more (BTW, thanks for the great documentation): #v+ from django.contrib.sessions.models import Session

Re: Django Blog software

2006-08-13 Thread [EMAIL PROTECTED]
there is on the mailing list my "miniblog" http://groups.google.com/group/django-users/browse_thread/thread/d8ae2e3dc533e214/75d2281e490f1d83?lnk=gst=miniblog=1#75d2281e490f1d83 It isn't feature compleate but it has news + comments ;) --~--~-~--~~~---~--~~ You

Re: Frameworks, Documentation and the Joy of Django

2006-08-13 Thread David Larlet
2006/8/13, jws <[EMAIL PROTECTED]>: > [snip] > > Given the recent security problems with Rails, it's clear that the RoR > community is not infallible. Why have they then received so much praise > and admiration? It's not the technology, it's the narrative. 37signals is the best Buzz2.0 company

Re: what features do you like to see in a rss reader

2006-08-13 Thread Ian Holsman
On 13/08/2006, at 7:38 PM, René Pijlman wrote:a wrote: i m developing a feedreader/web desktop using djangoi m looking for feature suggesstions Self-learning relevance ranking of individual posts. Bayesian, or otherwise. Information overload is problem #1 for weblogs/rss.i've started doing

Django Blog software

2006-08-13 Thread [EMAIL PROTECTED]
Hi, I've been playing with Django for a few weeks, and I've been looking for some blog software which I can use for my blog and also play with extending to help me learn a little more about Django. I searched the Django wiki, and does as many Google queries as I can think of, but I can't find

Re: what features do you like to see in a rss reader

2006-08-13 Thread René Pijlman
a wrote: > i m developing a feedreader/web desktop using django > > i m looking for feature suggesstions Self-learning relevance ranking of individual posts. Bayesian, or otherwise. Information overload is problem #1 for weblogs/rss. -- René http://www.applinet.nl

Re: rewriting urls

2006-08-13 Thread Malcolm Tredinnick
On Sun, 2006-08-13 at 05:59 +, a wrote: > http://localhost/todo > > i want to rewrite this automatically as > > http://localhost/todo/ > > is there a easy way to do this See http://www.djangoproject.com/documentation/middleware/#django-middleware-common-commonmiddleware Regards, Malcolm

Re: rewriting urls

2006-08-13 Thread Matt McDonald
And in a more generic sense the APPEND_SLASH setting of the CommonMiddleware may be what you are looking for. http://www.djangoproject.com/documentation/middleware/#django- middleware-common-commonmiddleware On 13/08/2006, at 5:17 PM, Ivan Sagalaev wrote: > > a wrote: >>

what features do you like to see in a rss reader

2006-08-13 Thread a
dear django users i m developing a feedreader/web desktop using django i m looking for feature suggesstions thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

suggestions for rss reader

2006-08-13 Thread a
keep a list of read and unread items hi guys i m building an rss reader and i want you suggestions for datastructure for keeping read and unread list for each use i m assuming it will be very sparse thanks --~--~-~--~~~---~--~~ You received this message because

Re: How to make delete() more clever?

2006-08-13 Thread 一首诗
First I should thank Ivan for your help. But I think Malcolm figured out what I really want. Maybe django should catch Exception when calling a model's save / delete method. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: rewriting urls

2006-08-13 Thread Ivan Sagalaev
a wrote: > http://localhost/todo > > i want to rewrite this automatically as > > http://localhost/todo/ > > is there a easy way to do this Yep. http://www.djangoproject.com/documentation/generic_views/#django-views-generic-simple-redirect-to

Re: Converting characteres non-ASCII in the templates

2006-08-13 Thread Ivan Sagalaev
GinTon wrote: > To convert the names to lower or UPPER case in the templates is used {{ > foo.name|lower }} and {{ foo.name|upper }} > > But is possible convert characters non-ASCII? Is there any of use > foo.name.decode('utf-8').upper() in the templates? There is a patch fixing string filters

rewriting urls

2006-08-13 Thread a
http://localhost/todo i want to rewrite this automatically as http://localhost/todo/ is there a easy way to do this thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this