Re: Basic SQL

2008-11-03 Thread Tonne

I think I may be barking up the wrong tree, and if so please excuse
the above. I now suspect that I should be associating the images with
their relevant entries with template tags.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: link to other record in admin change list

2008-11-03 Thread Fabio Natali

Chris wrote:
[...]
> I have set up a callable in the admin.py, but the HTML I eject there
> gets escaped, so that I end up seeing etc in the
> list, instead of the link.  Here is the relevant piece of admin.py:

Hi Chris! Did you try with varchars.allow_tags?

http://docs.djangoproject.com/en/dev/ref/contrib/admin/#list-display

Hth,

-- 
Fabio Natali

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



link to other record in admin change list

2008-11-03 Thread chris

Dear Django users,

Here is a question I can't find an answer for in the docs and from Mr.
Google.  In an admin list display, I have set up a column that
displays records that are related to the current record.  Now I want
to be able to directly open that related record, instead of the record
that the first field links to.  I have set up a callable in the
admin.py, but the HTML I eject there gets escaped, so that I end up
seeing etc in the list, instead of the link.  Here is
the relevant piece of admin.py:

class CharAdmin(admin.ModelAdmin):
[.. some stuff omitted ..]
list_display = ["character", "unicode", "varchars", "ids"]
list_filter = ["types"]
inlines = (CharVarInline,)
def varchars(self, obj):
  safestr = u"%s"%(",".join(["%s:%s"%(d.id,
d.character, d.unicode) for d in obj.vars.all()]))
  return mark_safe(safestr)
varchars.short_description = "Variant Characters"
varchars.is_safe = True

However, I still see the HTML markup escaped in the admin client.  I
also tried to use an {% autoescape off %} block, but to no avail.  Any
help appreciated!

Chris
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django on Apache (mod_python) administration cookie problem

2008-11-03 Thread Graham Dumpleton



On Nov 4, 5:08 pm, Dave  Dash <[EMAIL PROTECTED]> wrote:
> I am witnessing this issue using manage.py runserver.
>
> The only useful information I can give is this was working when I was
> running .97 (or whatever was the trunk a few months back), I recently
> upgraded to the latest trunk (~1.1) and now continually get this
> message.
>
> I suspect something has changed in the last few months and I missed
> whatever it was.  I'm going to attempt to setup a dummy project and
> try this again.
>
> If anybody has some clue, please let me know,

Clear the cookie for the application from your browser cache.

Graham

> Cheers,
>
> Dave Dash
>
> On Sep 30, 5:05 pm, Álvaro Justen <[EMAIL PROTECTED]> wrote:
>
> > Ah, some details:
> > -> Admin interface runs OK with python manage.py runserver - as of it
> > is an Apache error, Django's web server isn't affected by this bug.
> > -> I'm using Debian etch as server: I've installed Apache, PHP and
> > mod_php with Debian packages, but Django installed manually.
> > -> Versions:
> >   * Apache: Server version: Apache/2.2.3
> >     Server built:   Mar 22 2008 09:29:10
> >   * PHP: PHP 5.2.0-8+etch11 (cli) (built: May 10 2008 10:46:24)
> >     Copyright (c) 1997-2006 The PHP Group
> >     Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
> >   * Django: 1.0-final-SVN-unknown
>
> > --
> >  Cheers,
> >   Álvaro Justen
> >   Debian GNU/Linux user
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django on Apache (mod_python) administration cookie problem

2008-11-03 Thread Dave Dash

I am witnessing this issue using manage.py runserver.

The only useful information I can give is this was working when I was
running .97 (or whatever was the trunk a few months back), I recently
upgraded to the latest trunk (~1.1) and now continually get this
message.

I suspect something has changed in the last few months and I missed
whatever it was.  I'm going to attempt to setup a dummy project and
try this again.

If anybody has some clue, please let me know,

Cheers,

Dave Dash

On Sep 30, 5:05 pm, Álvaro Justen <[EMAIL PROTECTED]> wrote:
> Ah, some details:
> -> Admin interface runs OK with python manage.py runserver - as of it
> is an Apache error, Django's web server isn't affected by this bug.
> -> I'm using Debian etch as server: I've installed Apache, PHP and
> mod_php with Debian packages, but Django installed manually.
> -> Versions:
>   * Apache: Server version: Apache/2.2.3
>     Server built:   Mar 22 2008 09:29:10
>   * PHP: PHP 5.2.0-8+etch11 (cli) (built: May 10 2008 10:46:24)
>     Copyright (c) 1997-2006 The PHP Group
>     Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
>   * Django: 1.0-final-SVN-unknown
>
> --
>  Cheers,
>   Álvaro Justen
>   Debian GNU/Linux user
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Basic SQL

2008-11-03 Thread Tonne

*disclosure* I am SQL novice, okay */disclosure*

I have what I think is a very simple problem, but can't seem to find a
solution without writing raw SQL.

I have 2 (simplified here) models:

class Entry(models.Model):
title = models.CharField(max_length=80)

class Image(models.Model):
image = models.ImageField(upload_to="img/")
entry = models.ForeignKey(Entry)

Each entry can have many images.

I would like to build a query that returns all the available Entries
and Images related to each Entry.

My view looks like this...

from xxx.xxx.models import Entry
from xxx.xxx.models import Image

def index(request):
entry_list = Entry.objects.all()
image_list = Image.objects.select_related('entry')

Currently, I am getting the entire list of images with each Entry,
rather than only the specific images related to an Entry (if you know
what I mean).

To illustrate, my results resemble this:

Entry 1 + Image 1, Image 2, Image 3
Entry 2 + Image 1, Image 2, Image 3
Entry 3 + Image 1, Image 2, Image 3

whereas I would like to see

Entry 1 + Image 1
Entry 2 + Image 2
Entry 3 + Image 3

I hope this make sense. If anyone would care to show me how to build
the right query, I'd be very grateful.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Newb testing question

2008-11-03 Thread Rick Kitts

Greetings. I'm digging django pretty good. Many thanks.

I've run into a problem that I'm sure is my fault but I don't know why  
yet. I've got a ModelForm and I'm trying to write unit tests for the  
validation bits. My strategy here was to construct an instance of the  
form and populate it with data and then call the appropriate  
clean_() method and make sure it does the right thing. Roughly  
it looks like this:

TheFormClass

def clean_field(self):
field_val = self.cleaned_data['field']
# do sexy django validation tricks

and the test method looks like this:

def test_sexy_validation_is_dead_sexy(self):
model_object = ModelObject()
# Set some values on model_object
form = TheFormClass(instance=model_object)
form.clean_field()

Running the test causes a splash of barf that says:

AttributeError: 'TheFormClass' object has no attribute 'cleaned_data'

I've tried calling form.full_clean() with no better luck and  
form.clean() which gives the same AttributeError. So to the question.

What am I doing wrong here? I've been living in Java land for a long  
time so I'm suspecting I might be philosophically wrong about how to  
test this stuff, especially since I can't (easily) find any mention of  
this sort of thing on the web.

Any help much appreciated.

TIA,
---Rick 

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



strptime() working in python, but not within django?

2008-11-03 Thread mpobrien

I'm working on something that involves parsing out a date from a
string, so i'm using the datetime.strptime() function. I've noticed
that this works correctly in python, but when i run it within a django
environment it doesn't seem to work. Example, in python:

[EMAIL PROTECTED]:~/projects/mu_tools$ python
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> test_time = "Tue Sep 30 15:33:07 EDT"
>>> test_format = "%a %b %d %H:%M:%S %Z"
>>> datetime.strptime(test_time, test_format)
datetime.datetime(1900, 9, 30, 15, 33, 7)
>>>


And in a django python shell:


[EMAIL PROTECTED]:~/projects/mu_tools$ ./manage.py shell
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from datetime import datetime
>>> test_time = "Tue Sep 30 15:33:07 EDT"
>>> test_format = "%a %b %d %H:%M:%S %Z"
>>> datetime.strptime(test_time, test_format)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.5/_strptime.py", line 330, in strptime
(data_string, format))
ValueError: time data did not match format:  data=Tue Sep 30 15:33:07
EDT  fmt=%a %b %d %H:%M:%S %Z


After playing with different types of strings, the problem seems to be
the timezone - if i leave the timezone out of the time string and the
format string, it will parse correctly. However, I'm not sure why this
would break in Django - presumably it's something to do with the
timezone setting in settings.py? (this is django-1.0, btw)

If anybody can point me in the right direction I'd really appreciate
it. Thanks in advance.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Template inheritance

2008-11-03 Thread pk

One simple way to think about template inheritance (which is a GREAT
feature) is to think
of it as "specialization":

You first define the general look of a website, the logo, banner, menu
bars, footers.
All that goes into the base template A. In fact, you can render just
the base template A
and see an "empty" site.

Then for each actual website page, you have a template B that defines
the "insides"
of the base template, e.g. the main content area. As your page
specific view
renders the specialized template B, which only contains the "insides",
the django
template engine puts B within the context of A, and renders a full
page with the almost
all of A with one or more blocks replaced by specific content supplied
by B.

B will have none of the HTML elements that make up most of the final
web page.
It only contains the bits that need to be inserted into a {% block %}
inside A.

The neat thing about the django system is that B can replaces multiple
parts of A.
For example, a site has a two column type display, each column is a {%
block %}
that can be replaced. You can write a B1 page that just replaces what
is in column A,
or you can write a page B2 that replaces both columns in A.

P.K.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Forms Question

2008-11-03 Thread [EMAIL PROTECTED]

Yep, you need to do the if is_valid() stuff, but other than the save()
method it works like a normal form, more or less.

On Nov 3, 8:07 pm, Robocop <[EMAIL PROTECTED]> wrote:
> I tried that earlier but i failed terribly at syntax.  Should it be:
>
> f = ModelForm(request.POST)
> f.save()
>
> On Nov 3, 5:37 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
>
> > On Nov 4, 2008, at 8:14 AM, Robocop wrote:
>
> > > I'm working with some rather long forms, and i've processed them in a
> > > pretty basic way.  I read in the post data for every field, then just
> > > create a new table entry using the form data.
>
> > > Something like:
> > > if request.method == 'POST':
> > >  if form.is_valid():
> > >    var_a = form.cleaned_data['var_a']
> > >    var_b = form.cleaned_data['var_b']
> > >    
> > >   var_z = form.cleaned_data['var_z']
> > >   new_model = Model( var_a = var_a, var_b = var_b, ... ,var_z =var_z)
> > >   new_model.save()
>
> > > Now that my forms are getting pretty long, i'm wondering if there is a
> > > faster way to do this.  Does anyone know of any tricks or shortcuts to
> > > just push a one to one mapping of my modelform to my model into a new
> > > table in my database?  As always, help is greatly appreciated.
>
> > If you're using a real modelform, just call save() on it:
>
> >http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#the-sav...
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Beginner on Django and web developing

2008-11-03 Thread DULMANDAKH Sukhbaatar

> Hello folks, I have aready used python only in desktop. About 1 a week
> ago I installed the Django 1.0 on Fedora 9. I wonder about the
> djangobook, its version is 0.96 or 1.0?

book's version is 1.0, but written for 0.96.


-- 
Regards
Dulmandakh

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Forms Question

2008-11-03 Thread Robocop

I tried that earlier but i failed terribly at syntax.  Should it be:

f = ModelForm(request.POST)
f.save()


On Nov 3, 5:37 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
> On Nov 4, 2008, at 8:14 AM, Robocop wrote:
>
>
>
>
>
> > I'm working with some rather long forms, and i've processed them in a
> > pretty basic way.  I read in the post data for every field, then just
> > create a new table entry using the form data.
>
> > Something like:
> > if request.method == 'POST':
> >  if form.is_valid():
> >    var_a = form.cleaned_data['var_a']
> >    var_b = form.cleaned_data['var_b']
> >    
> >   var_z = form.cleaned_data['var_z']
> >   new_model = Model( var_a = var_a, var_b = var_b, ... ,var_z =var_z)
> >   new_model.save()
>
> > Now that my forms are getting pretty long, i'm wondering if there is a
> > faster way to do this.  Does anyone know of any tricks or shortcuts to
> > just push a one to one mapping of my modelform to my model into a new
> > table in my database?  As always, help is greatly appreciated.
>
> If you're using a real modelform, just call save() on it:
>
> http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#the-sav...
>
>
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Using settings.py mechanism for application settings

2008-11-03 Thread pk

To clarify the question a bit more, I am talking about an "app" in the
sense of a reusable component that is developed by me but want
to distribute for others to use.

James is right that for any of my own app, I can just tell the user
to put in some settings in the project level settings.py file. In fact
that is exactly what I do now. However that does not buy me the
feature where, for django's own apps, have their default settings
stored in global_settings.py (or whatever is the file's name). So
I need to test for and supply default if my user does not supply
a settings value. Meanwhile the django built in settings mechanism
has a very nice way to specify defaults -- which is what I like
to "Reuse".

P.K.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Forms Question

2008-11-03 Thread Eric Abrahamsen


On Nov 4, 2008, at 8:14 AM, Robocop wrote:

>
> I'm working with some rather long forms, and i've processed them in a
> pretty basic way.  I read in the post data for every field, then just
> create a new table entry using the form data.
>
> Something like:
> if request.method == 'POST':
>  if form.is_valid():
>var_a = form.cleaned_data['var_a']
>var_b = form.cleaned_data['var_b']
>
>   var_z = form.cleaned_data['var_z']
>   new_model = Model( var_a = var_a, var_b = var_b, ... ,var_z =var_z)
>   new_model.save()
>
> Now that my forms are getting pretty long, i'm wondering if there is a
> faster way to do this.  Does anyone know of any tricks or shortcuts to
> just push a one to one mapping of my modelform to my model into a new
> table in my database?  As always, help is greatly appreciated.

If you're using a real modelform, just call save() on it:

http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#the-save-method

>
> >


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Forms Question

2008-11-03 Thread Robocop

I'm working with some rather long forms, and i've processed them in a
pretty basic way.  I read in the post data for every field, then just
create a new table entry using the form data.

Something like:
if request.method == 'POST':
  if form.is_valid():
var_a = form.cleaned_data['var_a']
var_b = form.cleaned_data['var_b']

   var_z = form.cleaned_data['var_z']
   new_model = Model( var_a = var_a, var_b = var_b, ... ,var_z =var_z)
   new_model.save()

Now that my forms are getting pretty long, i'm wondering if there is a
faster way to do this.  Does anyone know of any tricks or shortcuts to
just push a one to one mapping of my modelform to my model into a new
table in my database?  As always, help is greatly appreciated.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Using Django

2008-11-03 Thread Steve Holden

[EMAIL PROTECTED] wrote:
> I understand the mapping of urls.py but I guess I'm not clear on a few
> things to begin with, like what is the equivalent to an index.html
> page in django? I know that the system works off of a template system
> like using "base.html" as the design skeleton for a site and extending
> that system with calls to different views, but what happens when I
> want to just request the index page for a django site? Let's say I
> register and add a subdomain to my Dreamhost account say...
> mysite.com, when I issue the startproject command as django-admin.py
> startproject mysite is there some sort of connection between the two?
> Do I scrap the Dreamhost generated directory "mysite.com" and the
> actual command I should be issuing is django-admin.py startproject
> mysite.COM? What is returned for an index page if there is no
> ndex.html or index.php?
>
>   
Your site's root page is whatever is mapped to r"^$", the empty URL.

It's the same for directories. If you *want* to map something on to
.../something.html you can, but there is no need to. When a
"directory-like URL" is passed by a browser the returned result is
whatever is generated by the view the the URL is mapped to. Or a 404 if
no such mapping can be found.

regards
 Steve


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Beginner on Django and web developing

2008-11-03 Thread David Zhou
On Mon, Nov 3, 2008 at 4:07 PM, Airton Arantes <[EMAIL PROTECTED]>wrote:

>
> >
> > Note that the book is pretty out of date at this point, and some sections
> --
> > like the Admin site -- will simply not work.
> > Your best bet is to go through the tutorials on the Django documentation
> > site.
>
> So, could I study only book's 1,2,3,4 chapters?
>
>
If you're up to it, I would personally rely strictly on the documentation
online at docs.djangoproject.com.  A side effects of the changes leading up
to the 1.0 release of Django is that a lot of the older documentation and
literature may no longer apply.

The good news is that once you learn Django 1.0, there shouldn't be any
future breaking changes for some time.

-- 
---
David Zhou
[EMAIL PROTECTED]

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Beginner on Django and web developing

2008-11-03 Thread Airton Arantes

2008/11/3 David Zhou <[EMAIL PROTECTED]>:
> On Mon, Nov 3, 2008 at 2:49 PM, bruno desthuilliers
> <[EMAIL PROTECTED]> wrote:
>>
>> On 3 nov, 17:38, "Airton Arantes" <[EMAIL PROTECTED]> wrote:
>> > Hello folks, I have aready used python only in desktop. About 1 a week
>> > ago I installed the Django 1.0 on Fedora 9. I wonder about the
>> > djangobook, its version is 0.96 or 1.0?
>> >
>> > I don't know nothing about web programming but I'm studying a lot.
>> > Can I read this link[1] to learn better about django?
>> >
>> > [1]http://www.djangobook.com/en/1.0/
>>
>> Hi.
>>
>> If you installed django 1.0, yes, indeed, you want djangobook 1.0 too.
>> But note that this won't be enough to understand web programming in
>> general - for this, you need at least some understanding of the HTTP
>> protocol.

I've already studied about this. Thanks.



>
> Note that the book is pretty out of date at this point, and some sections --
> like the Admin site -- will simply not work.
> Your best bet is to go through the tutorials on the Django documentation
> site.

So, could I study only book's 1,2,3,4 chapters?



>
> 
> David Zhou
> [EMAIL PROTECTED]
>
> >
>



-- 
Airton Arantes Coelho Filho

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Admin behavior: what is errors.items in change_form.html?

2008-11-03 Thread Karen Tracey
On Mon, Nov 3, 2008 at 2:16 PM, nazar <[EMAIL PROTECTED]> wrote:

>
> I met some unusual behavior in my project in admin change form with
> inlines. There is code in template change_form.html:
>
> {% blocktrans count errors.items|length as counter %}Please correct
> the error below.{% plural %}Please correct the errors below.{%
> endblocktrans %}
>
> Template can't evaluate 'errors.items' object.
>
> As I saw in code there is no "items" attribute, method or dictionary
> key in 'errors'.
>
> Can anybody explain what is this and why it works?
>
>
Looks like a bug.  The '.items' part just shouldn't be there.  As it is no
matter whether there is a single or multiple errors the plural message is
displayed.  Removing the .items (errors is a list type, not a dictionary)
fixes things so that the singular message is displayed when there is only
one error to be fixed.

Karen

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Beginner on Django and web developing

2008-11-03 Thread David Zhou
On Mon, Nov 3, 2008 at 2:49 PM, bruno desthuilliers <
[EMAIL PROTECTED]> wrote:

>
> On 3 nov, 17:38, "Airton Arantes" <[EMAIL PROTECTED]> wrote:
> > Hello folks, I have aready used python only in desktop. About 1 a week
> > ago I installed the Django 1.0 on Fedora 9. I wonder about the
> > djangobook, its version is 0.96 or 1.0?
> >
> > I don't know nothing about web programming but I'm studying a lot.
> > Can I read this link[1] to learn better about django?
> >
> > [1]http://www.djangobook.com/en/1.0/
>
> Hi.
>
> If you installed django 1.0, yes, indeed, you want djangobook 1.0 too.
> But note that this won't be enough to understand web programming in
> general - for this, you need at least some understanding of the HTTP
> protocol.
>
>
Note that the book is pretty out of date at this point, and some sections --
like the Admin site -- will simply not work.
Your best bet is to go through the tutorials on the Django documentation
site.


David Zhou
[EMAIL PROTECTED]

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: access request.user in class Meta

2008-11-03 Thread bruno desthuilliers

On 1 nov, 23:57, Merrick <[EMAIL PROTECTED]> wrote:
> I am trying to dynamically generate a form, the fields will vary if
> the user is logged in. Here is where I am so far
>
> forms.py
> ==
> class LinkForm(ModelForm):
>
> def __init__(self, *args, **kw):
> self.request = kw.pop('request')
> super(LinkForm, self).__init__(*args, **kw)
>
> class Meta:
> model = Link
> if self.request.user:
> exclude = ['ip_address', 'timestamp', 'user', 'method', ]
> else:
> exclude = ['ip_address', 'timestamp', 'user', 'method',
> 'notes', 'private_stats',]

This is a Python problem, not a Django problem. I strongly suggest you
take time to learn Python.


When the 'class Meta:' statement is eval'd, the LinkForm class doesn't
even yet exists - so there's no hope an instance of LinkForm could
exists.

FWIW, there's nothing special with name 'self' in Python. Instance
methods receive the current instance as first argument, and by
convention, this argument is named 'self', but you could name it
'ekky_ekky_ekky_ekky_zBang' just the same.

To make a long story short, what you're trying to do just cannot work
- or at least, not that way.


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Beginner on Django and web developing

2008-11-03 Thread bruno desthuilliers

On 3 nov, 17:38, "Airton Arantes" <[EMAIL PROTECTED]> wrote:
> Hello folks, I have aready used python only in desktop. About 1 a week
> ago I installed the Django 1.0 on Fedora 9. I wonder about the
> djangobook, its version is 0.96 or 1.0?
>
> I don't know nothing about web programming but I'm studying a lot.
> Can I read this link[1] to learn better about django?
>
> [1]http://www.djangobook.com/en/1.0/

Hi.

If you installed django 1.0, yes, indeed, you want djangobook 1.0 too.
But note that this won't be enough to understand web programming in
general - for this, you need at least some understanding of the HTTP
protocol.


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Admin behavior: what is errors.items in change_form.html?

2008-11-03 Thread nazar

I met some unusual behavior in my project in admin change form with
inlines. There is code in template change_form.html:

{% blocktrans count errors.items|length as counter %}Please correct
the error below.{% plural %}Please correct the errors below.{%
endblocktrans %}

Template can't evaluate 'errors.items' object.

As I saw in code there is no "items" attribute, method or dictionary
key in 'errors'.

Can anybody explain what is this and why it works?

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Strange admin validation behaviour.

2008-11-03 Thread Karen Tracey
On Sun, Nov 2, 2008 at 12:07 PM, jiussa <[EMAIL PROTECTED]> wrote:

>
> Hi
>
> Been working through the online tutorial without problems up to the
> end of part 3. However if I now go back to the admin and try to edit
> choices for a Poll I get an error message saying "Please correct the
> errors below." without indicating any particular field.
>
> If I have created no Choices for a Poll this error doesn't seem to
> occur. When I create a brand new Poll I can add as many Choices to it
> as I want, however if I go to add choices to an existing Poll (or even
> just save a poll with which already has choices present) the error
> occurs.
>
> If I remove the "inlines = [ChoiceInline]" line from my PollAdmin
> class the problem seems to dissapear as well.
>
> I've added no code other than what's in the tutorial.
>
> Thanks.
>

Sounds like:

http://code.djangoproject.com/ticket/9076

Karen

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How to rename uploaded files in FileField?

2008-11-03 Thread bovine

thank u very much!, I think that can solve my problem.

On 11月4日, 上午12时38分, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
> On Mon, Nov 3, 2008 at 11:04 AM, Chen Yinliu <[EMAIL PROTECTED]> wrote:
> > I've searched this group and find some related mails, but their solutions
> > seem out of date, for example:
> >http://gulopine.gamemusic.org/2007/nov/07/customizing-filenames-witho...
> > but there is no _save_FIELD_file method there, the underline file storage
> > system had been refactored in 1.0 release.
>
> > so anyone who know how to do it? thanks very much.
>
> You might consider the new documentation on the subject,[1] which
> should (I hope) be quite clear.
>
> -Gul
>
> [1]http://docs.djangoproject.com/en/dev/ref/models/fields/#filefield
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Beginner on Django and web developing

2008-11-03 Thread Airton Arantes

Hello folks, I have aready used python only in desktop. About 1 a week
ago I installed the Django 1.0 on Fedora 9. I wonder about the
djangobook, its version is 0.96 or 1.0?

I don't know nothing about web programming but I'm studying a lot.
Can I read this link[1] to learn better about django?




[1] http://www.djangobook.com/en/1.0/



Thanks, and sorry by terrible english.

-- 
Airton Arantes Coelho Filho

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How to rename uploaded files in FileField?

2008-11-03 Thread Marty Alchin

On Mon, Nov 3, 2008 at 11:04 AM, Chen Yinliu <[EMAIL PROTECTED]> wrote:
> I've searched this group and find some related mails, but their solutions
> seem out of date, for example:
> http://gulopine.gamemusic.org/2007/nov/07/customizing-filenames-without-patching/
> but there is no _save_FIELD_file method there, the underline file storage
> system had been refactored in 1.0 release.
>
> so anyone who know how to do it? thanks very much.

You might consider the new documentation on the subject,[1] which
should (I hope) be quite clear.

-Gul

[1] http://docs.djangoproject.com/en/dev/ref/models/fields/#filefield

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



How to rename uploaded files in FileField?

2008-11-03 Thread Chen Yinliu
I've searched this group and find some related mails, but their solutions
seem out of date, for example:
http://gulopine.gamemusic.org/2007/nov/07/customizing-filenames-without-patching/
but there is no _save_FIELD_file method there, the underline file storage
system had been refactored in 1.0 release.

so anyone who know how to do it? thanks very much.



-- 
Chen Yingliu

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



AW: Custom clean methods for admin site?

2008-11-03 Thread Bülent Aldemir


Create methods with  like:

class MyModel(models.Model):
mystring = models.CharField(max_length=100)

class MyForm(forms.ModelForm):
   def clean_mystring(self):
   raise forms.ValidationError('Error Message')
 

-Ursprüngliche Nachricht-
Von: django-users@googlegroups.com [mailto:[EMAIL PROTECTED] Im
Auftrag von krase
Gesendet: Montag, 3. November 2008 16:03
An: Django users
Betreff: Custom clean methods for admin site?


Hi,

i am trying to build an authorisation system for the admin site.
The authorisation should not only be based on user, group and type of the
object, but also on contents the user just typed in.
I assume that i have to override the clean() methods of the ModelAdmin
classes.

First i tried this:

class MyForm(forms.ModelForm):
   def clean(self):
  #do authorisation here
  return super(MyForm, self).clean()

class FooAdmin(admin.ModelAdmin):
   form = MyForm
   model = Foo

The Problem here is that i can not raise ValidationErrors for single fields.

Then i found this:
http://code.djangoproject.com/wiki/NewformsHOWTO#Q:HowdoIaddcustomvalidation
The second example of this question seems to be the right one, but i don't
understand how to create a custom clean() method here.

A quick an dirty example is very appreciated ;)


Greets,
Sebastian




--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Custom clean methods for admin site?

2008-11-03 Thread krase

Hi,

i am trying to build an authorisation system for the admin site.
The authorisation should not only be based on user, group and type of
the object, but also
on contents the user just typed in.
I assume that i have to override the clean() methods of the ModelAdmin
classes.

First i tried this:

class MyForm(forms.ModelForm):
   def clean(self):
  #do authorisation here
  return super(MyForm, self).clean()

class FooAdmin(admin.ModelAdmin):
   form = MyForm
   model = Foo

The Problem here is that i can not raise ValidationErrors for single
fields.

Then i found this: 
http://code.djangoproject.com/wiki/NewformsHOWTO#Q:HowdoIaddcustomvalidation
The second example of this question seems to be the right one, but i
don't understand how to
create a custom clean() method here.

A quick an dirty example is very appreciated ;)


Greets,
Sebastian

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Python package names

2008-11-03 Thread Valts Mazurs
Sure, I also keep django apps outside site-packages directory but it is not
really the same level of convenience :)

Valts.

On Mon, Nov 3, 2008 at 4:07 PM, Jonathan Buchanan <
[EMAIL PROTECTED]> wrote:

>
> On Mon, Nov 3, 2008 at 1:59 PM, Valts Mazurs <[EMAIL PROTECTED]> wrote:
> > Usually Django applications are specific to Django and are not really
> usable
> > outside Django. That's why seeing "tagging" in my site-packages directory
> > might confuse me as I could think that this package supports some general
> > tagging.
> >
> > Valts.
>
> You can put any directory on your PYTHONPATH - it doesn't necessarily
> have to be in site-packages.
>
> Personally, I have django_apps and django_projects directories on my
> PYTHONPATH for obvious purposes, which are nowhere near my
> site-packages.
>
> Jonathan.
>
> >
>

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Update a a single field

2008-11-03 Thread darryl.hebbes

Aah yes that worked.
Thanks Daniel.

To clarify my own thoughts, a python example:

For example, setattr(x, 'foobar', 123) is equivalent to x.foobar = 123


On Nov 3, 3:44 pm, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
> On Nov 3, 1:41 pm, "darryl.hebbes" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > I want to do something like this, I wish to make the 'fieldname'
> > dynamic, I am just trying to update a field without a hard coded
> > name... the name is passed in via  a form.
>
> > ---
> > def updateProfile(request):
> >         fieldname = request.POST["id"]
> >         fieldid = int(request.POST["profileid"])
> >         fieldvalue = request.POST["value"]
> >         pe = Profile.objects.get(id=fieldid)
> >         pe.[fieldname] = fieldvalue    # <--- I want to pass the name of the
> > field to save()
> >         pe.save()
> >         return HttpResponse('Saved we hope', mimetype="application/json")
> > ---
>
> > Hope this makes sense.
>
> > Darryl.
>
> If I understand correctly, you want setattr:
>
> setattr(pe, fieldname, fieldvalue)
> --
> DR.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Python package names

2008-11-03 Thread Jonathan Buchanan

On Mon, Nov 3, 2008 at 1:59 PM, Valts Mazurs <[EMAIL PROTECTED]> wrote:
> Usually Django applications are specific to Django and are not really usable
> outside Django. That's why seeing "tagging" in my site-packages directory
> might confuse me as I could think that this package supports some general
> tagging.
>
> Valts.

You can put any directory on your PYTHONPATH - it doesn't necessarily
have to be in site-packages.

Personally, I have django_apps and django_projects directories on my
PYTHONPATH for obvious purposes, which are nowhere near my
site-packages.

Jonathan.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Python package names

2008-11-03 Thread Dj Gilcrease

On Mon, Nov 3, 2008 at 6:59 AM, Valts Mazurs <[EMAIL PROTECTED]> wrote:
> Usually Django applications are specific to Django and are not really usable
> outside Django. That's why seeing "tagging" in my site-packages directory
> might confuse me as I could think that this package supports some general
> tagging.

This is exactly why I drop all my django apps in the django_apps package

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Python package names

2008-11-03 Thread Valts Mazurs
Usually Django applications are specific to Django and are not really usable
outside Django. That's why seeing "tagging" in my site-packages directory
might confuse me as I could think that this package supports some general
tagging.

Valts.

On Mon, Nov 3, 2008 at 3:51 PM, James Bennett <[EMAIL PROTECTED]> wrote:

>
> On Mon, Nov 3, 2008 at 6:23 AM, Dj Gilcrease <[EMAIL PROTECTED]>
> wrote:
> > Cause I actually like having the django_apps namespace so I can
> > quickly identify if something being imported is a django app or some
> > regular python module
>
> A Django application *is* a Python module. It's not some secret
> special format separate from normal Python modules, it's just a Python
> module.
>
>
> --
> "Bureaucrat Conrad, you are technically correct -- the best kind of
> correct."
>
> >
>

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Python package names

2008-11-03 Thread James Bennett

On Mon, Nov 3, 2008 at 6:23 AM, Dj Gilcrease <[EMAIL PROTECTED]> wrote:
> Cause I actually like having the django_apps namespace so I can
> quickly identify if something being imported is a django app or some
> regular python module

A Django application *is* a Python module. It's not some secret
special format separate from normal Python modules, it's just a Python
module.


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Update a a single field

2008-11-03 Thread Daniel Roseman

On Nov 3, 1:41 pm, "darryl.hebbes" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to do something like this, I wish to make the 'fieldname'
> dynamic, I am just trying to update a field without a hard coded
> name... the name is passed in via  a form.
>
> ---
> def updateProfile(request):
>         fieldname = request.POST["id"]
>         fieldid = int(request.POST["profileid"])
>         fieldvalue = request.POST["value"]
>         pe = Profile.objects.get(id=fieldid)
>         pe.[fieldname] = fieldvalue    # <--- I want to pass the name of the
> field to save()
>         pe.save()
>         return HttpResponse('Saved we hope', mimetype="application/json")
> ---
>
> Hope this makes sense.
>
> Darryl.

If I understand correctly, you want setattr:

setattr(pe, fieldname, fieldvalue)
--
DR.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Update a a single field

2008-11-03 Thread darryl.hebbes

Hi,

I want to do something like this, I wish to make the 'fieldname'
dynamic, I am just trying to update a field without a hard coded
name... the name is passed in via  a form.

---
def updateProfile(request):
fieldname = request.POST["id"]
fieldid = int(request.POST["profileid"])
fieldvalue = request.POST["value"]
pe = Profile.objects.get(id=fieldid)
pe.[fieldname] = fieldvalue# <--- I want to pass the name of the
field to save()
pe.save()
return HttpResponse('Saved we hope', mimetype="application/json")
---

Hope this makes sense.

Darryl.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: align a ModelForm

2008-11-03 Thread Thomas Guettler

limas schrieb:
> Can i align a single long ModelForm into two raws?
> can i use django admin modules for my own purpose by customizing it?
> please give me some suggestions .
>   

Yes, you can do both. Suggestion: Read the documentation.

Suggestion:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/
http://groups.google.com/group/django-users/browse_thread/thread/536e86280059a1f9

 HTH,
  Thomas

-- 
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Python package names

2008-11-03 Thread Dj Gilcrease

On Mon, Nov 3, 2008 at 4:24 AM, Steve Holden <[EMAIL PROTECTED]> wrote:
> Why not just add .../site-packages/django_apps to your PYTHONPATH,
> making direct imports from that directory possible? That seems much
> easier than modifying the source, and it's a standard Python mechanism.

Cause I actually like having the django_apps namespace so I can
quickly identify if something being imported is a django app or some
regular python module

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django's decoupling apps but template should couple them together, right?

2008-11-03 Thread Steve Holden

bruno desthuilliers wrote:
>
> On 3 nov, 03:56, Steve Holden <[EMAIL PROTECTED]> wrote:
> (snip)
>   
>> You might also want to look into ContextManager objects, which are a way
>> of providing information to all pages.
>> 
>
> I assume you meant 'Context processors' ?-)
>
>   
Are you some kind of a mind-reader? I suppose that would mean I had to
have some kind of a mind ;-)

Thanks, Bruno, I did indeed mean context processors.

regards
 Steve


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django's decoupling apps but template should couple them together, right?

2008-11-03 Thread bruno desthuilliers



On 3 nov, 03:56, Steve Holden <[EMAIL PROTECTED]> wrote:
(snip)
> You might also want to look into ContextManager objects, which are a way
> of providing information to all pages.

I assume you meant 'Context processors' ?-)


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Python package names

2008-11-03 Thread Steve Holden

Dj Gilcrease wrote:
> I run into this issue all the time since I put all of my apps in
> "site-packages/django_apps/*", the only thing you can do is manually
> change the imports to fit your naming structure
> 
The ONLY thing?

> So for all mine I have to edit the imports and prepend "django_apps."
> for all of the internal imports (eg. "from django_apps.tagging.fields
> import TagField")
> 
Why not just add .../site-packages/django_apps to your PYTHONPATH,
making direct imports from that directory possible? That seems much
easier than modifying the source, and it's a standard Python mechanism.

regards
 Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: help for RSS Feed

2008-11-03 Thread Jarek Zgoda

Wiadomość napisana w dniu 2008-11-03, o godz. 11:59, przez please smile:

>  Can anybody please send me a small RSS feed application using django.
> Thanks.


Google code has plenty of them.

-- 
We read Knuth so you don't have to. - Tim Peters

Jarek Zgoda, R, Redefine
[EMAIL PROTECTED]


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Join of any db table with Q.add_to_query

2008-11-03 Thread Dima Dogadaylo

Before merging of queryset-refactor it was possible to join any table
with any ON clause to any queryset with help of Q.as_sql. For example,
please see this one:
http://www.djangosnippets.org/snippets/257/

Since Django 1.0 ORM looks like more complicated, Q.as_sql is
disappeared (but still mentioned in docs (http://
docs.djangoproject.com/en/dev/ref/models/fields/). As I see from code
Q.as_sql was replaced with Q.add_to_query(self, query, used_aliases)
but from current code it looks like new implementation does not allow
to use ON clause with more than 1 statements, for example:

FROM blog LEFT JOIN cron_stats AS stats ON
stats.content_type_id = 12 AND stats.object_id = blog.id

Is it any way to use old behavior of Q.as_sql with Django 1.0 and join
any table that I want to any queryset? In other words, is it possible
to make working QLeftOuterJoin from http://www.djangosnippets.org/snippets/257/?
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Overriding admin templates

2008-11-03 Thread Lars Stavholm

Lars Stavholm wrote:
> Karen Tracey wrote:
>> On Sat, Nov 1, 2008 at 5:54 PM, Lars Stavholm <[EMAIL PROTECTED]
>> > wrote:
>>
>> Low Kian Seong wrote:
>> > http://www.djangobook.com/en/1.0/chapter17/
>>
>> Yes, thank you, that's it.
>>
>> It worked nicely for the change_form.html example given in that
>> chapter. However, for the change_list.html it still doesn't work.
>> Seems to me I've hit a django bug. Anyone else?
>>
>> I just tried this, and it works for me for change_list.html. So I'm not
>> sure what is going on in your case.  For me it just works, overriding
>> change_list on a per-model basis using a file:
>>
>> templates/admin///change_list.html
> 
> Hm, I'm using django from svn trunk revision 9208.
> What version are you using?
> /L

As it turns out, it was a conflict with an addon, the batchadmin addon,
that caused the confusion. Django truly works as advertised. My setup
of batchadmin however, needs more tweaking.

Thanks for all your help.
/Lars

>> > On Sat, Nov 1, 2008 at 6:20 PM, Lars Stavholm <[EMAIL PROTECTED]
>> > wrote:
>> >> Low Kian Seong wrote:
>> >>> You are supposed to put the admin template you want to override in
>> >>> your own template directory definition in settings.py
>> >>>
>> >>> So, if you defined it as /home/stava/> >>> name>/template/admin/change_list.html
>> >> Huh?
>> >> /L
>> >>
>> >>> On Sat, Nov 1, 2008 at 5:32 PM, Lars Stavholm <[EMAIL PROTECTED]
>> > wrote:
>>  I'd like to override part of an admin change_list template.
>> 
>>  Reading the documentation, my understanding is that I can place
>>  a template in a certain place in the templates directory hierarchy,
>>  and django will look for it and use it, i.e.:
>> 
>>  templates/admin/build/job/change_list.html
>> 
>>  ...where "build" is my application and "job" is my model class.
>> 
>>  The change_list.html file only contains the part I want to
>> override,
>>  i.e. the extrahead block. It contains:
>> 
>>  {% extends "admin/change_list.html" %}
>>  {% block extrahead %}
>>    
>>  {% endblock %}
>> 
>>  However, this does not work for me, so I'm expecting it to be some
>>  mistake on my part, I just can't figure out what the mistake is.
>> 
>>  Now, if I put the file in ./templates/admin/build/change_list.html
>>  it still wont work. On the other hand, this would be overriding all
>>  "build" application change lists, which is not what I was
>> looking for.
>> 
>>  Only way I've found is to copy the change_list.html from the django
>>  installation in contrib/admin/templates/admin, and then modify
>> it to
>>  my needs, using "if" statements to figure out which application
>> model
>>  class is being rendered, and the put the change_list.html in my
>> app's
>>  templates/admin directory, which doesn't feel right.
>> 
>>  Any input appreciated
>>  /Lars Stavholm
>> 
>> 
>> >>
>> >>
>> >
>> >
>> >
>>
>>
>>
>>
>>
>>
> 
> 
> 
> > 
> 



--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



help for RSS Feed

2008-11-03 Thread please smile
Hi All ,
 Can anybody please send me a small RSS feed application using django.
Thanks.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django's decoupling apps but template should couple them together, right?

2008-11-03 Thread Dj Gilcrease

On Mon, Nov 3, 2008 at 2:48 AM, ilmarik <[EMAIL PROTECTED]> wrote:
> I've got controllers made as logical apps (controllers named
> particularly) and whenever I need f.e. menu inside base layout, I
> simply put {#menus/show/1} which means - return here compiled
> controllers(menus) method(show) of menu with id (1).
> This gives me the power to return response to any template from any
> controllers 'public' method.
[snip]
> custom tags are just to much fuss for me but if it IS django's way to
> create full portal template, fine.
> or mayby there is one, more intuitive, simple, better ?

The controllers that you use for your current implementation would be
the same thing as an inclusion tag in django.

Generally what I do when developing a new inclusion tag is to create a
new view, and get the view to display exactly what I want in an
isolated manor. So from your example there are three sections I would
create isolated views for. The left menu, the top menu, and the
language change section. Once you get the views functional for those
it is usually simple to migrate those to an inclusion tag, if your
view requires the request or request.user etc, you just need to make
sure you set your inclusion tags with takes_context=True, then you can
access the request via context.request. All of the examples you gave
seem rather simple to implement inclusion tags, though they do tend to
get much more complex if you want the various other applications to be
able to create their own sections of a menu instead of maintaining it
all as manually entered DB entries.

To get the hang of inclusion tags it actually took me about a month
and a half of playing with it and creating different ones just testing
their capabilities, and asking lots of questions in #django.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django's decoupling apps but template should couple them together, right?

2008-11-03 Thread Benjamin Buch


Am 03.11.2008 um 02:33 schrieb ilmarik:

> It's just simple amazing that I waste another night to figure out how
> to glue two and more apps together inside one template.
> I read about custom tags and I thing it isn't (or at least it
> shouldn't be) the way of doing it. too much fuss imho.
>
> Example:
> I have home page with menu on one side, news on other side, greetings
> article inside, footer menu on bottom and a survey somewere else.
> everything on one page of course.
>
> Walking with the idea of decoupled apps, I should create News app,
> Survey app, Menu app and so on...

There are several ways to get data from apps into templates:

Views:
-
With views you have the ability to tailor the data you want to display  
to the needs of a specific page.
Views are not necessarily coupled to apps;
most apps have them, but then the views deal with the pages that are  
tied to the app.
Say, if you have a news app, it's most likely that the app contains  
some views to display the news on some specific pages like 'mysite/ 
news/', 'mysite/news/2008/11/' , 'mysite/news/2008/11/03/super-duper- 
great-news/'.
If you would like to have the news displayed on other not-tied-to-the- 
news-app pages like your homepage, you wouldn't do this in the  
views.py file of the news app but in a more global file like the  
views.py in your project directory (at least this is how I do it...).
In this file, you could wirte a view that gathers all the data you  
want to display on your home page, for example like this:

def index(request):

news = News.objects.all()
surveys = Survey.objects.all()
menu_items = MenuItem.objects.all()

return render_to_response('home.html',
{
'news': news,
'surveys': surveys,
'menu_items': menu_items,   
},
context_instance=RequestContext(request))

So views are a good thing if it comes to specific pages, but there are  
better ways if you have something you want to display on every page.

Custom Tags:
---
Custom tags are often tied to apps as well, wich makes sense.
With custom tags, you can filter the app's data and provide this  
filtered data directly to the template, without wire up some views for  
it, and in the same step add functionality to the template language.
You can do some other pretty sophisticated things with custom tags  
besides of just pulling data...
Their main use case is in my oppinion to seperate business logic from  
presentation logic.
With custom tags, the programmer can provide some special  
functionality for the template author.
For example you could write a custom tag for your news app that is  
used in the template like this:

{% get_news 4 1 as newslist %},

which would then be 'give me the four latest news items, but only if  
they are not older then one month, and make them available in the  
template as newslist'.

So you could use custom tags when you have some things that you want  
to display on every page, but if you want to do only this, then you  
are right:
It's a little bit to much fuss for such a simple task, custom tags can  
be used for much more complex things.


Context processors:
---
I think context processors the best way when it comes to just  
displaying some data on every single of your projects' pages.
They are easy to write, and they do just one thing:
Add some data to the context which gets passed to all templates.

A (simple) example would be:

def get_news(request):
latest_news = News.objects.all()[:4]
return {'lates_news': latest_news}

And voilà, from now on 'latest_news' is available in every temlate,  
and you can do things like this:

{% for news in latest_news %}
Do some stuff with your news
{% endfor %}

Docs and tipps on context processors:
http://docs.djangoproject.com/en/dev/ref/templates/api/#writing-your-own-context-processors
http://www.b-list.org/weblog/2006/jun/14/django-tips-template-context-processors/

benjamin


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Python package names

2008-11-03 Thread Horst Gutmann

Do you absolutely require the name or would it be enough for you to
have an isolated environment for your django-related packages? In this
case take a look at virtualenv and to some extend also buildout :-)

http://pypi.python.org/pypi/virtualenv
http://pypi.python.org/pypi/zc.buildout

-- Horst

On Mon, Nov 3, 2008 at 10:02 AM, Dj Gilcrease <[EMAIL PROTECTED]> wrote:
> I run into this issue all the time since I put all of my apps in
> "site-packages/django_apps/*", the only thing you can do is manually
> change the imports to fit your naming structure
>
> So for all mine I have to edit the imports and prepend "django_apps."
> for all of the internal imports (eg. "from django_apps.tagging.fields
> import TagField")
>
> Dj Gilcrease
> OpenRPG Developer
> ~~http://www.openrpg.com
>
> >
>

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django's decoupling apps but template should couple them together, right?

2008-11-03 Thread ilmarik

> A slightly fuller description of your intended page structure might let
> people provide more accurate answers to your needs.

Let http://pow.dzierzoniow.pl be my fuller explanation. This page is
my old project written in php on Kohana framework.
There is one 'app' used to generate both menus (i just need to point
an id), then language changing mechanism is another 'app'. content
display is another, news is another and so on...

I made a special mechanizm as an addition to the generic parser to
return any controller's method response inside template as a string,
whenever I decide to generate and add some "app based(in django's
meaning)" content from library of complited solutions.

I've got controllers made as logical apps (controllers named
particularly) and whenever I need f.e. menu inside base layout, I
simply put {#menus/show/1} which means - return here compiled
controllers(menus) method(show) of menu with id (1).
This gives me the power to return response to any template from any
controllers 'public' method.

I'm not trying to find identical solution to feel satified with
django. I'm trying to learn django's way to glue decoupled apps inside
one template. But I persume, 'my way' from Kohana is quite logical so
I used to think in that way.

custom tags are just to much fuss for me but if it IS django's way to
create full portal template, fine.
or mayby there is one, more intuitive, simple, better ?


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Overriding admin templates

2008-11-03 Thread Lars Stavholm

Karen Tracey wrote:
> On Sat, Nov 1, 2008 at 5:54 PM, Lars Stavholm <[EMAIL PROTECTED]
> > wrote:
> 
> 
> Low Kian Seong wrote:
> > http://www.djangobook.com/en/1.0/chapter17/
> 
> Yes, thank you, that's it.
> 
> It worked nicely for the change_form.html example given in that
> chapter. However, for the change_list.html it still doesn't work.
> Seems to me I've hit a django bug. Anyone else?
> 
> 
> I just tried this, and it works for me for change_list.html. So I'm not
> sure what is going on in your case.  For me it just works, overriding
> change_list on a per-model basis using a file:
> 
> templates/admin///change_list.html

Hm, I'm using django from svn trunk revision 9208.
What version are you using?
/L

> > On Sat, Nov 1, 2008 at 6:20 PM, Lars Stavholm <[EMAIL PROTECTED]
> > wrote:
> >> Low Kian Seong wrote:
> >>> You are supposed to put the admin template you want to override in
> >>> your own template directory definition in settings.py
> >>>
> >>> So, if you defined it as /home/stava/ >>> name>/template/admin/change_list.html
> >> Huh?
> >> /L
> >>
> >>> On Sat, Nov 1, 2008 at 5:32 PM, Lars Stavholm <[EMAIL PROTECTED]
> > wrote:
>  I'd like to override part of an admin change_list template.
> 
>  Reading the documentation, my understanding is that I can place
>  a template in a certain place in the templates directory hierarchy,
>  and django will look for it and use it, i.e.:
> 
>  templates/admin/build/job/change_list.html
> 
>  ...where "build" is my application and "job" is my model class.
> 
>  The change_list.html file only contains the part I want to
> override,
>  i.e. the extrahead block. It contains:
> 
>  {% extends "admin/change_list.html" %}
>  {% block extrahead %}
>    
>  {% endblock %}
> 
>  However, this does not work for me, so I'm expecting it to be some
>  mistake on my part, I just can't figure out what the mistake is.
> 
>  Now, if I put the file in ./templates/admin/build/change_list.html
>  it still wont work. On the other hand, this would be overriding all
>  "build" application change lists, which is not what I was
> looking for.
> 
>  Only way I've found is to copy the change_list.html from the django
>  installation in contrib/admin/templates/admin, and then modify
> it to
>  my needs, using "if" statements to figure out which application
> model
>  class is being rendered, and the put the change_list.html in my
> app's
>  templates/admin directory, which doesn't feel right.
> 
>  Any input appreciated
>  /Lars Stavholm
> 
> 
> >>
> >>
> >
> >
> >
> 
> 
> 
> 
> 
> 
> > 



--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Python package names

2008-11-03 Thread Dj Gilcrease

I run into this issue all the time since I put all of my apps in
"site-packages/django_apps/*", the only thing you can do is manually
change the imports to fit your naming structure

So for all mine I have to edit the imports and prepend "django_apps."
for all of the internal imports (eg. "from django_apps.tagging.fields
import TagField")

Dj Gilcrease
OpenRPG Developer
~~http://www.openrpg.com

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Python package names

2008-11-03 Thread Daniel Roseman

On Nov 3, 7:47 am, stryderjzw <[EMAIL PROTECTED]> wrote:
> Hmm, I tried django_tagging, but it still gives me ImportErrors.  I
> think it's because, for django-tagging project, they internally look
> for tagging as the package name.

Yes I realised that after I posted - sorry.

There's nothing to stop you doing a search and replace for all 'from
tagging import x', though. Or you could set up a dummy project
'tagging' with just an __init__.py which does from django_tagging
import *, but that might not work if any of the existing code does a
deeper import.
--
DR.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



AW: __str__, __unicode__ representation of model fields

2008-11-03 Thread Bülent Aldemir

Thanks for your reply.

Maybe my question was a bit misleading: where do I put default
representations for each model field on model level (not templates). 

I want to have a nice representation for the other MyModel() fields. Must I
define for each field a method to accomplish my task?


class MyModel(models.Model):
     name = models.CharField(max_length=150)
     myinteger = models.IntegerField()

     def __unicode__(self):
         return u"Here is my: %s" % (self.name)
 
 def my_nice_integer(self):
 return u"%s" % str(self.myinteger).zfill(10)

Is there a alternative? Does someone know how django formats for example
dates on the admin pages? 

Thanks
Bülent
 


-Ursprüngliche Nachricht-
Von: django-users@googlegroups.com [mailto:[EMAIL PROTECTED] Im
Auftrag von JoeJ
Gesendet: Montag, 3. November 2008 00:02
An: Django users
Betreff: Re: __str__, __unicode__ representation of model fields



To get an integer to print with leading 0s print '%0d' % my_model.myinteger

To get an integer to print with 10 digits, filled with leading 0s print
'%0.10d' % my_model.myinteger

If you wanted this to be the default value shown for the model def
__unicode__(self): return u'%0.10d' % self.myinteger

-- joe

On Nov 2, 1:30 pm, Bülent Aldemir <[EMAIL PROTECTED]> wrote:
> Hi,
>
> given
>
> class MyModel(models.Model):
>     name = models.CharField(max_length=150)
>     myinteger = models.IntegerField()
> ^
>     def __unicode__(self):
>         return u"Here is my: %s" % (self.name)
>
> one has to give a __unicode__ method to get a nice string 
> representation of
> MyModel()
>
> I need a nice string representation of "myinteger" too, e.g.
> str(myinteger).zfill(10)
>
> I want to be able to do just this:
>
> >> my_model = MyModel.objects.get(pk=1) print my_model Here is my: 
> >> Name print my_model.myinteger '01'
>
> I do not know where to put the hook. Can anyone give me a hint, where 
> I can find documentation and/or what to do to accomplish my task.
>
> Thanks!
> Bülent



--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



align a ModelForm

2008-11-03 Thread limas

Can i align a single long ModelForm into two raws?
can i use django admin modules for my own purpose by customizing it?
please give me some suggestions .
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Keeping track of online users

2008-11-03 Thread 燕子翔
so,how can i use it in GAE?

2008/11/3 JoeJ <[EMAIL PROTECTED]>

>
>
> Are you looking for something like 'django-tracking' ??
>  http://code.google.com/p/django-tracking/
>
> I was just perusing this last night, for use on a site of mine.
>
> -- joe
>
>
> On Nov 1, 3:52 pm, "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]> wrote:
>  > I have found some post of 2007 on this argument but maybe with django
> > 1.0 something is changed.
> >
> > how do you do that ?
> >
> > thanks everyone :)
> >
>

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---