Template content filter

2007-02-27 Thread Orin

 Hi,
the task is to make filter that will check template content for non-
permitted instructions.
If I will use the "dumb" way and just try to look for such tags
directly by comparing strings than I can run across simpe text in my
template which is not good.

For example, in this template non-permitted instruction is "for".

{% block title %}for my dear woman{% endblock %}
{% block content %}
{% for entry in blog_entries %}


{% endfor %}
{% endblock %}

Please, if anyone know how to solve this problem give me a hint.


--~--~-~--~~~---~--~~
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: Generating object documentation from its instance

2007-02-27 Thread James Bennett

On 2/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Basic use for me would be to pass a [newform] object, and it would output its
> methods (with docstrings), attributes, and if attributes are objects,
> recursively build their auto-documentation.

The function used as the example in Chapter 4 of "Dive Into Python"
is, I believe, pretty close to what you want:

http://diveintopython.org/power_of_introspection/index.html

-- 
"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
-~--~~~~--~~--~--~---



Generating object documentation from its instance

2007-02-27 Thread django-user

Hi,

(This is not directly related to Django, but would help me in that domain)

I was wondering if there exists some kind of automated documentation generator
(html, pdf, text, whatever readable format) for instanciated objects.

Basic use for me would be to pass a [newform] object, and it would output its
methods (with docstrings), attributes, and if attributes are objects,
recursively build their auto-documentation.

I have used Epydoc, pydoc, and similar tools in the past, but from the
command-line and I believe it reads source code, not analyse an existing
object.

You might have guessed, I am a lazy code reader.
When it comes to newform module, or similar libraries for other projects (did I
say complex?), this would reveal helpful to dig the APIs using live code.

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: from .95 to six

2007-02-27 Thread Perica Zivkovic

>
> It's not "Django 0.96", it's a month-old SVN checkout. At this moment
> there is no such thing as "Django 0.96"; the development trunk
> currently identifies as "0.96-pre" because it isn't 0.95 or 0.95.1,
> and includes the "pre" to indicate that 0.96 is not yet an official
> release.
>

Yep, totally true.

> We strongly recommend that third-party distributors stick to the
> latest official release, currently 0.95.1; I'll look up that package
> and talk to the maintainers, because if they're distributing SVN
> snapshots they're going to be in for a lot of fun when we start making
> big backwards-incompatible changes after the official 0.96 release.
>

quote from the portable python website:

"This is beta software and it is NOT recomended for production
environments. Recomended use is for
development/showcasing/experimenting."

grtz

Perica

--~--~-~--~~~---~--~~
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: setting newforms ModelChoiceField "selection"

2007-02-27 Thread grahamu

Doh!
If I had taken the time to read a post from two hours earlier I would
have seen the answer. Use "initial" when instantiating the form. The
last line below does the trick.

if request.method == 'POST':
form = FormClass(request.POST)
if form.is_valid():
project = form.save(commit=False)
project.save()
return HttpResponseRedirect("/webtools/project/")
else:
if acct:
# if the account is valid, set it as the default in the
choice field
try:
account = Account.objects.get(id=acct)
except Account.DoesNotExist:
form = FormClass()
else:
# set default choice
form = FormClass(initial={'account': account.id})


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



setting newforms ModelChoiceField "selection"

2007-02-27 Thread grahamu

I'm struggling with a newforms issue. Specifically I'm trying to pre-
select an option in a ModelChoiceField and I cannot figure out how
this can be accomplished. Here are the code snippets:

class Account(models.Model):
title = models.CharField(maxlength=30, unique=True,
db_index=True, blank=False)
administrator = models.ForeignKey(User,
related_name="admin_accounts", blank=False)
users = models.ManyToManyField(User, blank=True, null=True)

class Project(models.Model):
account = models.ForeignKey(Account, blank=False)
title = models.CharField(maxlength=50, blank=False)

def add_project(request, acct=None):
# get new Project form class
FormClass = forms.models.form_for_model(Project)

# get accounts associated with this user
FormClass.base_fields['account'] = \
forms.ModelChoiceField
(queryset=Account.objects.filter(users__username=request.user.username))

if acct:
# if the specified account is valid, set it as the
"selection" in the choice field
try:
account = Account.objects.get(id=acct)
except Account.DoesNotExist:
pass
else:
# set default choice here?
pass

if request.method == 'POST':
form = FormClass(request.POST)
if form.is_valid():
form.save()
return HttpResponseRedirect("/webtools/project/")
else:
form = FormClass()

return render_to_response('add_project.html', {'form': form})


Before rendering the form I want to pre-select the option in the
'account' choice field that corresponds to this account. Presumably
I'll need to look at the options as created by the ModelChoiceField
and match one with account.id or something. However I cannot figure
out how to set the "selection" value before rendering. Any ideas?

Graham


--~--~-~--~~~---~--~~
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: Unique Id's across several classes/tables

2007-02-27 Thread Rubic

> Is it possible to have the ID field be unique across several classes
> or tables?  What i would like to do is, given the ID, load the object
> of that type out of the database.  Does this make sense, and is it
> possible?

No, it doesn't make sense <0.5 wink>, but here's
how you might do it.

You could create a ticket table whose sole
purpose was to generate a unique id, then
assign those ids as the primary keys to your
tables.

But someone can probably offer you a better
approach if you can provide a description of
your situation with more details.

--
Jeff Bauer
Rubicon, Inc.


--~--~-~--~~~---~--~~
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: from .95 to six

2007-02-27 Thread James Bennett

On 2/27/07, Perica Zivkovic <[EMAIL PROTECTED]> wrote:
> portable python includes 0.96-pre revision 4293. I got it straight
> from the subversion when I was making first release of PP. It's not
> the latest subversion snapshot but it s 0.96 (about one month old svn
> revision)

It's not "Django 0.96", it's a month-old SVN checkout. At this moment
there is no such thing as "Django 0.96"; the development trunk
currently identifies as "0.96-pre" because it isn't 0.95 or 0.95.1,
and includes the "pre" to indicate that 0.96 is not yet an official
release.

We strongly recommend that third-party distributors stick to the
latest official release, currently 0.95.1; I'll look up that package
and talk to the maintainers, because if they're distributing SVN
snapshots they're going to be in for a lot of fun when we start making
big backwards-incompatible changes after the official 0.96 release.

-- 
"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
-~--~~~~--~~--~--~---



Unique Id's across several classes/tables

2007-02-27 Thread jzellman

Hi,

Is it possible to have the ID field be unique across several classes
or tables?  What i would like to do is, given the ID, load the object
of that type out of the database.  Does this make sense, and is it
possible?

thanks,

Jeff


--~--~-~--~~~---~--~~
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: passing arguments using dojo

2007-02-27 Thread damacy

oh, just got another reply from my last post. thanks mae.

On Feb 28, 12:19 pm, "damacy" <[EMAIL PROTECTED]> wrote:
> hi, there.
>
> i have a problem here as explained below;
> i have a django variable that is to be passed to the views.py as an
> argument.
>
> first of all, i am trying to assign a django variable within 

Re: NOOB: default value in the ChoiceField?

2007-02-27 Thread johnny

It's working now.  Thank you.

On Feb 27, 8:52 pm, "johnny" <[EMAIL PROTECTED]> wrote:
> I put in initial as a parameter.  In the drop down list, or radio
> button, it does not highlight it anyway when you are at the page.  If
> I look at the view source, it says, selected for drop down list and
> checked for radio button.  Any idea why?
>
> On Feb 27, 5:50 pm, "Rubic" <[EMAIL PROTECTED]> wrote:
>
> > Use the 'initial' keyword arg:
>
> >http://www.djangoproject.com/documentation/newforms/#initial
>
> > --
> > Jeff Bauer
> > Rubicon, Inc.


--~--~-~--~~~---~--~~
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: models.TimeField()

2007-02-27 Thread Honza Král
On 2/28/07, DuncanM <[EMAIL PROTECTED]> wrote:
>
> When you use this field type, django automatically places a clock next
> to the field which is very handy with quick links: 6am, noon,
> midnight, now() or something similar.
>
> Is there any way I can get the list that is displayed then to be set
> values? such as 10am, noon and 2pm? or will I have to rely on my users
> to type it in?

these values are hardwired to the admin javascript (see DateTimeShortcuts.js)
>
> TIA,
> Duncan
>
>
> >
>


-- 
Honza Kr�l
E-Mail: [EMAIL PROTECTED]
ICQ#:   107471613
Phone:  +420 606 678585

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Microsoft Download Center - Download all MS softwares (freeware)

2007-02-27 Thread Sheela Thapar
*Microsoft Softwares Heaven* *Download all Microsoft Softwares - Freeware*
**
*[image: Microsoft Softwares Heaven]
*
http://www.awpedia.com/downloads/microsoft-softwares/
**
*Download Windows All*
**
*Windows Vista*
*Windows XP*
*MS Office 2007*
*MS Publisher*
*MS Visio
and all of the softwares
*
**
**
*all MS software download -
freeware
*

--~--~-~--~~~---~--~~
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: database table prefix

2007-02-27 Thread Jason Sidabras

thanks! the db_table option will probably work.

I might have to change the code unless there is a way to set this for
a global db_table, such as the auth_user table.





On Feb 27, 5:24 pm, "Marc Fargas Esteve" <[EMAIL PROTECTED]> wrote:
> Prefixes have been discussed sometimes, you can look at ticket #891
> i.e. Or search this group about that...
>
> One "hackish" option you could go on is use different SITE_ID's in
> your sites, and either make your applications take care of SITE_ID (a
> foreignkey to Sites could help) or set the db_table Meta option
> something like:
>
> from django.conf import settings
>db_tabe = 'this_app_table_site_%d' % settings.SITE_ID
>
> but I'd rather make the applications understand SITE_ID and work accordingly.
>
> Cheers,
> Marc
>
> On 2/28/07, Jason  Sidabras <[EMAIL PROTECTED]> wrote:
>
>
>
> > Sorry, mis-typed before. But I'm trying to see how this might work for
> > my case.
>
> > My mistake was that I am not trying to create multiple databases. Just
> > multiple tables.
>
> > So app named foo typically creates a table:
> > foo_news
>
> > and I would like it to be:
> > site_one_foo_news
>
> > Jason
>
> > On Feb 27, 5:03 pm, "Rubic" <[EMAIL PROTECTED]> wrote:
> > > You could assign DATABASE_PREFIX as an
> > > environment variable, then have settings.py
> > > get the value (untested):
>
> > >   # settings.py
> > >   import os
> > >   DATABASE_PREFIX = os.environ['DATABASE_PREFIX']
> > >   DATABASE_NAME = "site_%s_foo" % DATABASE_PREFIX
>
> > > Then run manage.py from the command line:
>
> > >   $ DATABASE_PREFIX="one" ./manage.py ...
> > >   $ DATABASE_PREFIX="two" ./manage.py ...
>
> > > --
> > > Jeff Bauer
> > > Rubicon, Inc.


--~--~-~--~~~---~--~~
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: NOOB: default value in the ChoiceField?

2007-02-27 Thread johnny

I put in initial as a parameter.  In the drop down list, or radio
button, it does not highlight it anyway when you are at the page.  If
I look at the view source, it says, selected for drop down list and
checked for radio button.  Any idea why?

On Feb 27, 5:50 pm, "Rubic" <[EMAIL PROTECTED]> wrote:
> Use the 'initial' keyword arg:
>
> http://www.djangoproject.com/documentation/newforms/#initial
>
> --
> Jeff Bauer
> Rubicon, Inc.


--~--~-~--~~~---~--~~
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: newb: date_of_birth field using SelectDateWidget

2007-02-27 Thread johnny

I have it like this in my form:
birth= forms.DateField(SelectDateWidget('birth',
years=range(today.year,1900,-1)))

In my template:

Date of Birth: {{ form.birth_year }}
{{ form.birth_month }} and {{ form.birth_day }}
{% if form.birth.errors %}*** {{ form.birth.errors|join:", " }}{%
endif %}


For some reason, template is not displaying it.


--~--~-~--~~~---~--~~
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: newb: date_of_birth field using SelectDateWidget

2007-02-27 Thread Rubic

newsforms doctest demonstrates how to use SelectDateWidget:

  trunk/tests/regressiontests/forms/tests.py

--
Jeff Bauer
Rubicon, Inc.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



models.TimeField()

2007-02-27 Thread DuncanM

When you use this field type, django automatically places a clock next
to the field which is very handy with quick links: 6am, noon,
midnight, now() or something similar.

Is there any way I can get the list that is displayed then to be set
values? such as 10am, noon and 2pm? or will I have to rely on my users
to type it in?

TIA,
Duncan


--~--~-~--~~~---~--~~
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: database table prefix

2007-02-27 Thread Marc Fargas Esteve

Prefixes have been discussed sometimes, you can look at ticket #891
i.e. Or search this group about that...

One "hackish" option you could go on is use different SITE_ID's in
your sites, and either make your applications take care of SITE_ID (a
foreignkey to Sites could help) or set the db_table Meta option
something like:

from django.conf import settings
   db_tabe = 'this_app_table_site_%d' % settings.SITE_ID

but I'd rather make the applications understand SITE_ID and work accordingly.

Cheers,
Marc

On 2/28/07, Jason  Sidabras <[EMAIL PROTECTED]> wrote:
>
> Sorry, mis-typed before. But I'm trying to see how this might work for
> my case.
>
> My mistake was that I am not trying to create multiple databases. Just
> multiple tables.
>
> So app named foo typically creates a table:
> foo_news
>
> and I would like it to be:
> site_one_foo_news
>
> Jason
>
> On Feb 27, 5:03 pm, "Rubic" <[EMAIL PROTECTED]> wrote:
> > You could assign DATABASE_PREFIX as an
> > environment variable, then have settings.py
> > get the value (untested):
> >
> >   # settings.py
> >   import os
> >   DATABASE_PREFIX = os.environ['DATABASE_PREFIX']
> >   DATABASE_NAME = "site_%s_foo" % DATABASE_PREFIX
> >
> > Then run manage.py from the command line:
> >
> >   $ DATABASE_PREFIX="one" ./manage.py ...
> >   $ DATABASE_PREFIX="two" ./manage.py ...
> >
> > --
> > Jeff Bauer
> > Rubicon, Inc.
>
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



passing arguments using dojo

2007-02-27 Thread damacy

hi, there.

i have a problem here as explained below;
i have a django variable that is to be passed to the views.py as an
argument.

first of all, i am trying to assign a django variable within 

Recursion in templates... again

2007-02-27 Thread Grupo Django

Hello, I have been looking around about some information about how to
do recursion in templates but what I found didn't help me.
This is the case:

class Menu(models.Model):
id = models.AutoField('id', primary_key=True)
parent = models.ForeignKey('self','id',null=True,blank=True)
name = models.CharField(maxlength=200)

And the plan is to create a menu like this:
- Entry 1
-- Subentry 1_1
-- Subentry 1_2
 sub_Subentry 1_2_1
- Entry 2
...

I have created a custom tag to manage this but so far I only have this
in the template:

{% for entry in menu_list %}
 {{ entry }} 
{% endfor %}


and the customtag def is:

def menu(pos):
menu_list = Menu.objects.all()
return {menu_list': menu_list}

I have no idea how can I solve this problem, I have seen some posts
about this,  but no clean solution.
Thank you!


--~--~-~--~~~---~--~~
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: database table prefix

2007-02-27 Thread Jason Sidabras

Sorry, mis-typed before. But I'm trying to see how this might work for
my case.

My mistake was that I am not trying to create multiple databases. Just
multiple tables.

So app named foo typically creates a table:
foo_news

and I would like it to be:
site_one_foo_news

Jason

On Feb 27, 5:03 pm, "Rubic" <[EMAIL PROTECTED]> wrote:
> You could assign DATABASE_PREFIX as an
> environment variable, then have settings.py
> get the value (untested):
>
>   # settings.py
>   import os
>   DATABASE_PREFIX = os.environ['DATABASE_PREFIX']
>   DATABASE_NAME = "site_%s_foo" % DATABASE_PREFIX
>
> Then run manage.py from the command line:
>
>   $ DATABASE_PREFIX="one" ./manage.py ...
>   $ DATABASE_PREFIX="two" ./manage.py ...
>
> --
> Jeff Bauer
> Rubicon, Inc.


--~--~-~--~~~---~--~~
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: database table prefix

2007-02-27 Thread Rubic

You could assign DATABASE_PREFIX as an
environment variable, then have settings.py
get the value (untested):

  # settings.py
  import os
  DATABASE_PREFIX = os.environ['DATABASE_PREFIX']
  DATABASE_NAME = "site_%s_foo" % DATABASE_PREFIX

Then run manage.py from the command line:

  $ DATABASE_PREFIX="one" ./manage.py ...
  $ DATABASE_PREFIX="two" ./manage.py ...

--
Jeff Bauer
Rubicon, Inc.


--~--~-~--~~~---~--~~
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: NOOB: default value in the ChoiceField?

2007-02-27 Thread Rubic

Use the 'initial' keyword arg:

http://www.djangoproject.com/documentation/newforms/#initial

--
Jeff Bauer
Rubicon, Inc.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



select_related?

2007-02-27 Thread [EMAIL PROTECTED]

Could somebody explain the difference between

Foo.objects.all() and
Foo.objects.select_related()

I'm trying to improve performance and decrease DB hits.


--~--~-~--~~~---~--~~
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: from .95 to six

2007-02-27 Thread Perica Zivkovic

portable python includes 0.96-pre revision 4293. I got it straight
from the subversion when I was making first release of PP. It's not
the latest subversion snapshot but it s 0.96 (about one month old svn
revision)

in the next version(s) of the PP getting of the latest svn snapshot
will be automated

grtz

Perica

On 2/27/07, Ned Batchelder <[EMAIL PROTECTED]> wrote:
>
>  The trunk currently reports its version as "0.96-pre".  Perhaps this is the
> source of the confusion?
>
>  --Ned.
>
>  Russell Keith-Magee wrote:
>  On 2/27/07, Perica Zivkovic <[EMAIL PROTECTED]> wrote:
>
>
>  Picio,
>
> there is another option, www.portablepython.com includes django 0.96
> and it's a good solution if you want to test your 0.95 applications
> before replacing 0.95 with 0.96
>
>  I don't know what portablepython.com is including, but it certainly
> isn't Django 0.96. At present, there is no such version as Django
> 0.96. The most recent release is 0.95.1.
>
> Yours,
> Russ Magee %-)
>
>
>
>
>
>
>
>  --
> Ned Batchelder, http://nedbatchelder.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: Serving Media through mod_proxy.

2007-02-27 Thread Jorge Gajon

Hi David,

On 2/27/07, David Abrahams <[EMAIL PROTECTED]> wrote:
>
> I'm running django with Apache/mod_python and serving media through
> lighttpd. I have only one IP address, so lighttpd is running on port
> 8081, but some of my clients are behind firewalls that block ports
> other than 80.
>
> I'm planning to ditch Apache and run everything with lighttpd under
> FastCGI, but I'm not ready to do that just yet just yet, so I'm
> wondering if I can use mod_proxy to make it look like the media is
> being served on port 80.  My guess is that would defeat the purpose of
> having separate servers, but I thought I'd check.
>

Take a look at this page under the section titled "Serving media files"

http://www.djangoproject.com/documentation/modpython/

That way you can also serve your media files from your same Apache instance.

Personally I've been using Lighttpd with FastCGI and it has been
working great. In fact Lighttpd only redirect the traffic to the
Django FastCGI instance, it doesn't have to load any python code
itself so it is very light-weight and very good for serving media
files.

Regards,
Jorge

--~--~-~--~~~---~--~~
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: newb: date_of_birth field using SelectDateWidget

2007-02-27 Thread johnny

I need to get it into Separate Year, Month, Day (1-31) Format using
SelectDateWidget.

On Feb 27, 11:59 am, "johnny" <[EMAIL PROTECTED]> wrote:
> Can someone provide me an example for date_of_birth field using
> SelectDateWidget?
>
> Thank you.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



django + apache authentication

2007-02-27 Thread sean

Hello,
I'm struggling a little to get apache configured to only allow access
to some static media (image files in different resolutions, according
to the permissions).

These are the directives i give for the location of the medium sized
images:
...
SetHandler python-program
PythonHandler django.core.handlers.modpython
PythonPath "['/home/django-projects'] + sys.path"
PythonOption DJANGO_SETTINGS_MODULE my_proj.settings-apache
PythonDebug On

AuthType digest
AuthName "members"
AuthBasicAuthoritative Off

Require valid-user
PythonOption DjangoPermissionName my_proj.medium_images
PythonAuthenHandler django.contrib.auth.handlers.modpython
...

This doesn't seem to work to bad, but when the user is logged in and
wants to view one of the protected files the usual prompt pops up and
asks to reenter the credentials. Is that the normal behaviour or is
there some way to pass on the cookie to auth.handlers.modpython and
let the user pass right away?

sean


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



URL extra options placeholder syntax- or is it only for generic views?

2007-02-27 Thread yary

http://www.djangoproject.com/documentation/generic_views/ has this
example:

... redirects from /foo// to /bar//:

urlpatterns = patterns('django.views.generic.simple',
('^foo/(?P\d+)/$', 'redirect_to', {'url': '/bar/%(id)s/'}),
)

What replaces the '%(id)s' section, the generic view package, or the
URL dispatcher? Is there more documentation on this?

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: Job Ad: Full-time Python software developer, Wimbledon, London, England

2007-02-27 Thread aaloy

2007/2/27, John J Lee
>
> `ReportLab `_ (Wimbledon, London, England)
>
>
> **Job Description**: ReportLab develop enterprise reporting and
> document generation solutions using cutting-edge Python technology,
> and have a growing business with an excellent blue chip customer base.
> You may also know us from our open source PDF and graphics library...
>
> **What Python is used for**: Just about everything.
>
> * **Contact**: Alisa Pasic
> * **E-mail contact**: [EMAIL PROTECTED]
> * **Web**: http://www.reportlab.com/careers.html

Most appealing jobs are always far, far away! :)
Good luck with your search, Reportlab is an excellent product.

-- 
Antoni Aloy López
Binissalem - Mallorca
http://www.trespams.com
Soci de Bulma - http://www.bulma.cat

--~--~-~--~~~---~--~~
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: Upcoming Django release, and the future

2007-02-27 Thread Andrew Diederich

On Tuesday, February 27, 2007, 8:41:44 AM, Marc Fargas Esteve wrote:

> Hi Andrew,
> There's a ticket for that openned:
> http://code.djangoproject.com/ticket/3589
> And it's closed as fixed :)

Thanks!  The ticket itself doesn't have 'postgresql_psycopg2' in it,
so I didn't find it searching.  And it was fixed since my last svn
checkout.

-- 
Best regards,
 Andrew Diederich 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



NOOB: default value in the ChoiceField?

2007-02-27 Thread johnny

Is there a way to set the initial or default value in the
ChoiceField?  I need to set a default Country.

For example:

country = forms.ChoiceField(label='Country',
 choices=[(c.id,c.name) for c in
Countrylist.objects.all()],
 default = ???
 )


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



cache views (decorator not working)

2007-02-27 Thread GaRaGeD Style
Hi all

I'm really  not good at python, and hence not good at django, but I really
love both :)

I have spent a few hours trying to understand why this works:
--
@login_required
def object_list(request, model, page):
try:
return list_detail.object_list(
request,
queryset = model.objects.all().order_by('name'),
template_name = 'base/%s_list.html' %
model.__name__.lower(),
paginate_by = 3,
page = page,
)
except:
return HttpResponseRedirect('/list/people/')

object_list = cache_page(object_list, 300)
-

And this doesnt:
-
@cache(600)
@login_required
def object_list(request, model, page):
try:
return list_detail.object_list(
request,
queryset = model.objects.all().order_by('name'),
template_name = 'base/%s_list.html' %
model.__name__.lower(),
paginate_by = 3,
page = page,
)
except:
return HttpResponseRedirect('/list/people/')
-

If I take the @login_required still doesn't work, so is not a problem about
conflicts on the decorators.

Can anybody point anything about this problem and how to correct it :)

At first I though the version of python could be the problem, but if one
decorator works, both of them should isn't it ?

The error I get is this:
--
Request Method:
GET
  Request URL:
http://127.0.0.1:8000/list/
  Exception Type:
AttributeError
  Exception Value:
'function' object has no attribute 'method'
  Exception Location:
/usr/lib/python2.4/site-packages/django/middleware/cache.py in
process_request, line 47
---

That is exactly here:

if not request.method in ('GET', 'HEAD') or request.GET:
--

Thanks in advance !

Max
-- 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Error: login admin: TypeError at /admin/

2007-02-27 Thread Paul Rauch

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

TypeError at /admin/
a2b_base64() argument 1 must be string or read-only character buffer,
not array.array
Request Method: POST
Request URL:http://127.0.0.1:8000/admin/
Exception Type: TypeError
Exception Value:a2b_base64() argument 1 must be string or read-only
character buffer, not array.array
Exception Location: /usr/lib64/python2.5/base64.py in decodestring,
line 321

this happened when I tried to login within the dev-server.

there's a lot more output, but with some info being sensitive(password) ;)

mfg Light Lan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iQIVAwUBReSBeBG67lyyQrltAQL3cxAAi+ppdqkxDMwKQRlB27shIx1qkHLsAEJ1
e86Ufb9HUVcR1sXVmE2fasqESfeGfjvJlHFBF4FcfoVCWh+UNknlzriSJwtDWEdc
eq+hPNLxz6SkhHdCj317imvDaBtvrxvLkbq56Dw6WiLTL6SPduFSgZy7L1y9WsHr
JAfAHZKDiAvz+9OfqIW4R0eYFSlcu1bYji5WOlQ0Lq7vefm9CU9kT2DIFCT1gGGS
SpWfHbevot6p8sSGDdqCj6VyZnwcGZOD57ylOH6SYpRvig3xIV2h1yXy9O7KUcLt
2Y65vowWvbT+v4fiSydFQd7f9h+ysn5DChNgYkDoQkUexswebTjAgeEDoC3C7qvB
3vbQsjGY09x15YuQftkzARvp8oo3mP+Hkvs4FoYLjKsRePi1cUCKGf5wIgfs38ZN
UE/OKHBTCvBy43hsq5JpEThbiuzAnhakIQSOHHE1U2FiN5OxJqP4hFk3uq+H+/jn
AKiptdxb1hg3aJmfKS7XrYSrlV7hUQHRYzKOVfTY4nQUQrwj5yQme3Hsi0bqKOjP
yvFJT/7TBACAlollBlQpZL1b/GvROtm+sg2zb4sUHECOL2sYpmO6K5eGd/q5TVUi
5k5q5CVZ4zFaTQY3HLEmC1CEO40JxkIImrW0HxpOtyVLEv1lcU5tp33NLnHoeqIb
QxgVWdL2NjY=
=HUFj
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



hi

2007-02-27 Thread engin kaya
Hello NAME,

I want to tell you about great site I found. They pay me to read e-mail,
visit web sites and much more.

It's free to join and easy to sign up! CLICK THIS
LINK TO VISIT: http://www.woo-mails.com/pages/index.php?refid=ebibanzai

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



database table prefix

2007-02-27 Thread Jason Sidabras

Does django currently support a DATABASE_PREFIX option?

The question arises because of a problem I am having with sqlite and
my hosting provider.

And the end of the day I would like to have three website which use
some combinations of the same apps. These websites do not share
"stories" from the databases.

Example:
I have a app named foo. foo has three models one, two three. site one
has a setting file DATABASE_PREFIX set to site_one.

running a ./manage.py --settings=settings_siteone syncdb

would give me:
creating database site_one_foo

doing the same for site two would give me:
creating database site_two_foo

now both sites have a different database but use the same app.

I have looked into site redirect but I don't think that is for me.


--~--~-~--~~~---~--~~
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: direct_to_template, extra_context

2007-02-27 Thread Joseph Kocherhans

On 2/27/07, va:patrick.kranzlmueller <[EMAIL PROTECTED]> wrote:
>
> from django.conf.urls.defaults import *
>
> urlpatterns = patterns('',
>   (r'^stars/', 'django.views.generic.simple.direct_to_template',
> {'template': 'site/stars/stars_overview.html'}, extra_context=
> {'category': 'stars', 'subcategory': 'none'}),
> )
>
> isn´t that supposed to work? did I miss something?

Yeah. You're trying to treat extra_context like it's a keyword
argument to a function call, but you're not calling a function. You
probably mean something like this:

urlpatterns = patterns('',
(r'^stars/', 'django.views.generic.simple.direct_to_template', {
'template': 'site/stars/stars_overview.html',
'extra_context': {
'category': 'stars',
'subcategory': 'none'
}
})
)

If you want to delve deeper into "why", check this out. Especially section 4.7.3
http://docs.python.org/tut/node6.html#SECTION00670

Joseph

--~--~-~--~~~---~--~~
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: Evaluating Web Development Frameworks: Rails and Django

2007-02-27 Thread linoj

Rails and Django - Project and Community (part 2/15) has been posted
http://www.vaporbase.com/postings/92


On Feb 25, 1:16 pm, Jonathan Linowes <[EMAIL PROTECTED]> wrote:
> hi y'all,
> fyi
> i've posted the first in a series of blog articles,
> Evaluating Web Development Frameworks: Rails and Django
> athttp://www.vaporbase.com/postings/91
> :)


--~--~-~--~~~---~--~~
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: direct_to_template, extra_context

2007-02-27 Thread Mike

It looks like multiple dictionaries are being passed to the view.

Should 'extra_context' be included in the first one (just like the
'template' argument)?


--~--~-~--~~~---~--~~
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: date_of_birth field using SelectDateWidget

2007-02-27 Thread johnny

Can someone provide me an example for date_of_birth field using
SelectDateWidget?

Thank you.


--~--~-~--~~~---~--~~
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: direct_to_template, extra_context

2007-02-27 Thread va:patrick.kranzlmueller

from django.conf.urls.defaults import *

urlpatterns = patterns('',
  (r'^stars/', 'django.views.generic.simple.direct_to_template',  
{'template': 'site/stars/stars_overview.html'}, extra_context=  
{'category': 'stars', 'subcategory': 'none'}),
)

isn´t that supposed to work? did I miss something?

thanks,
patrick


Am 27.02.2007 um 17:36 schrieb Joseph Kocherhans:

>
> On 2/27/07, va:patrick.kranzlmueller <[EMAIL PROTECTED]>  
> wrote:
>>
>> why doesn´t this work?
>>   (r'^stars/', 'django.views.generic.simple.direct_to_template',
>> {'template': 'site/stars/stars_overview.html'}, extra_context=
>> {'category': 'stars', 'subcategory': 'none'}),
>>
>> the error is "invalid syntax".
>
> You'll need to show more of your surrounding code for us to be able to
> help you with this one. The problem in that particular snippet is the
> "extra_context=".
>
> Jospeh
>
> >


--~--~-~--~~~---~--~~
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: direct_to_template, extra_context

2007-02-27 Thread Joseph Kocherhans

On 2/27/07, va:patrick.kranzlmueller <[EMAIL PROTECTED]> wrote:
>
> why doesn´t this work?
>   (r'^stars/', 'django.views.generic.simple.direct_to_template',
> {'template': 'site/stars/stars_overview.html'}, extra_context=
> {'category': 'stars', 'subcategory': 'none'}),
>
> the error is "invalid syntax".

You'll need to show more of your surrounding code for us to be able to
help you with this one. The problem in that particular snippet is the
"extra_context=".

Jospeh

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Field default values don't seem to work as expected

2007-02-27 Thread Brian Rosner

If I have the given model in an app:

class Product(models.Model):
name = models.CharField(maxlength=150)
list_price = models.FloatField(max_digits=10, decimal_places=2, 
default=0.00, blank=True)
price = models.CharField(max_digits=10, decimal_places=2)

class Admin:
pass

When adding a new product through the admin site you will get an 
IntegrityError? saying that list_price may not be NULL. I have tested 
this with MySQL and SQLite and both result in this error. While I could 
change the value on the fly before saving the object, but the default 
parameter would seem like it should handle that for me.  Is my belief 
that the default parameter of the field should be inserting 0.00 
instead of None (which is turned into NULL) correct?

Brian



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



direct_to_template, extra_context

2007-02-27 Thread va:patrick.kranzlmueller

why doesn´t this work?
  (r'^stars/', 'django.views.generic.simple.direct_to_template',  
{'template': 'site/stars/stars_overview.html'}, extra_context= 
{'category': 'stars', 'subcategory': 'none'}),

the error is "invalid syntax".

thanks,
patrick
--~--~-~--~~~---~--~~
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: passing a md5 digest string into URL

2007-02-27 Thread ScottB

Hi Giuseppe.

> As i said, i need to pass in my URL a  variable, wich is the
> result of a md5 digest.
> (no private information... only a validation key).
>
> Obviously i tried with
> (r'^users/activate_user/(?P)/', 'views.register'),
> (r'^users/activate_user/(?P[a-zA-Z0-9%\-]+=)/',
> 'views.register'),
> but it doesn't work: Django always return 404.

It works for me if the code ends with a single equals sign.
e.g.
http://localhost/users/activate_user/abc123=/

If you're stuck, maybe you could post a couple of example urls that
give you 404 errors.

Scott


--~--~-~--~~~---~--~~
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: Models Causing Admin to Crash

2007-02-27 Thread Ramiro Morales

On 2/27/07, DuncanM <[EMAIL PROTECTED]> wrote:
>
> Any idea where outside it could be? I am using mod_python with apache.

Have you done what Honza suggested?. Namely, stopping Apache,
running you app under the Django development webserver instead and trying
to reproduce the use case?.

Regards,

-- 
 Ramiro Morales

--~--~-~--~~~---~--~~
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: newforms SelectDateWidget

2007-02-27 Thread Phil Powell

Thanks Mike - that did the trick.  I thought there would be a simple
solution - should have RTFM more thoroughly...

On 27/02/07, Mike <[EMAIL PROTECTED]> wrote:
>
> The range function has an optional 'step' argument.
>
> Howzabout:
>
> SelectDateWidget(years=range(2006,1900,-1))
>
> > But is there an easy way I can make the years display in reverse -
> > i.e. descending rather than ascending?
>
>
> >
>

--~--~-~--~~~---~--~~
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: Upcoming Django release, and the future

2007-02-27 Thread Marc Fargas Esteve

Hi Andrew,
There's a ticket for that openned: http://code.djangoproject.com/ticket/3589
And it's closed as fixed :)

On 2/27/07, Andrew Diederich <[EMAIL PROTECTED]> wrote:
>
> On Monday, February 26, 2007, 4:39:29 PM, James Bennett wrote:
>
> > On 2/26/07, Andrew Diederich <[EMAIL PROTECTED]> wrote:
> >> On Monday, February 26, 2007, 3:00:30 PM, Jacob Kaplan-Moss wrote:
> >> > For the other bit, though, see [4624].
> >>
> >> This ticket doesn't exist. I looked for similarly numbered ones, but
> >> didn't find it.
>
> > That's changeset 4624, not ticket 4624:
> > http://code.djangoproject.com/changeset/4624
>
> Whoops -- I knew about the #ticketnumber searching in trac, but not
> the [changeset] shortcut.  Thanks.
>
> This changeset just applies to the install.txt file.  Is there one
> that changes the generated settings.py file?  By default it's
> something like:
>
> DATABASE_ENGINE = ''   # 'postgresql', 'mysql', 'sqlite3' or 
> 'ado_mssql'.
>
> and it'd be better if it also specified postgresql_psycopg2 as well.
> I'm happy to log a ticket if that's the best way to get it recorded
> and included.
>
> --
> Best regards,
>  Andrew Diederich
>
>
> >
>

--~--~-~--~~~---~--~~
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: Upcoming Django release, and the future

2007-02-27 Thread Andrew Diederich

On Monday, February 26, 2007, 4:39:29 PM, James Bennett wrote:

> On 2/26/07, Andrew Diederich <[EMAIL PROTECTED]> wrote:
>> On Monday, February 26, 2007, 3:00:30 PM, Jacob Kaplan-Moss wrote:
>> > For the other bit, though, see [4624].
>>
>> This ticket doesn't exist. I looked for similarly numbered ones, but
>> didn't find it.

> That's changeset 4624, not ticket 4624:
> http://code.djangoproject.com/changeset/4624

Whoops -- I knew about the #ticketnumber searching in trac, but not
the [changeset] shortcut.  Thanks.

This changeset just applies to the install.txt file.  Is there one
that changes the generated settings.py file?  By default it's
something like:

DATABASE_ENGINE = ''   # 'postgresql', 'mysql', 'sqlite3' or 
'ado_mssql'.

and it'd be better if it also specified postgresql_psycopg2 as well.
I'm happy to log a ticket if that's the best way to get it recorded
and included.

-- 
Best regards,
 Andrew Diederich 


--~--~-~--~~~---~--~~
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 HTML/CSS as templates

2007-02-27 Thread Mike

It's probably a path-related issue.

You might start here as a reference:

http://www.djangoproject.com/documentation/static_files/

Bit o' learning curve serving CSS when starting out, in my experience,
because of the way Django encourages/prods/provokes us to serve static
media separately.


--~--~-~--~~~---~--~~
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: Models Causing Admin to Crash

2007-02-27 Thread DuncanM

Any idea where outside it could be? I am using mod_python with apache.

Thanks for all your help
Duncan

On Feb 26, 7:34 pm, "Honza Král" <[EMAIL PROTECTED]> wrote:
> On 2/26/07, DuncanM <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi,
> > I have some models related to a football (soccer) team, I had models
> > for everything working fine except my Results model.  I tried adding
> > it yesterday and encountered a few problems with it, which was solved
> > due to the help from these groups (thanks).  However now when I run
> > syncdb I don't get any errors (which I was yesterday and are now
> > fixed) so I thought everything was ok.
>
> > I log into my admin and everytime I click on the "Results" model
> > within my admin I think I crash the server (because it comes back with
> > this response
> > "Proxy Error
>
> > The proxy server received an invalid response from an upstream server.
> > The proxy server could not handle the request GET /admin/teams/
> > result/.
>
> > Reason: Error reading from remote server"
>
> > after a few minutes of trying, and within apache I have to restart it
> > to get it back up and running again.
>
> try it with the development server, the problem seems to be outside of
> django itself
>
>
>
>
>
> > Here is my Results model:
>
> > class Result(models.Model):
> >   team = models.ForeignKey(Team, core=True)
> >   venue = models.CharField(maxlength=1, choices=Fixture_Choices)
> >   date = models.DateField()
> >   opponent = models.CharField(maxlength=100)
> >   competition = models.ForeignKey(Competition)
> >   howdenscore = models.IntegerField()
> >   opponentscore = models.IntegerField()
> >   goalkeeper = models.ForeignKey(Player,
> > related_name='goalkeeper_for')
> >   leftback = models.ForeignKey(Player, related_name='leftback_for')
> >   centreback1 = models.ForeignKey(Player,
> > related_name='centreback1_for')
> >   centreback2 = models.ForeignKey(Player,
> > related_name='centreback2_for')
> >   rightback = models.ForeignKey(Player, related_name='rightback_for')
> >   leftmid = models.ForeignKey(Player, related_name='leftmid_for')
> >   centremid1 = models.ForeignKey(Player,
> > related_name='centremid1_for')
> >   centremid2 = models.ForeignKey(Player,
> > related_name='centremid2_for')
> >   rightmid = models.ForeignKey(Player, related_name='rightmid_for')
> >   striker1 = models.ForeignKey(Player, related_name='striker1_for')
> >   striker2 = models.ForeignKey(Player, related_name='striker2_for')
> >   sub1 = models.ForeignKey(Player, related_name='sub1')
> >   sub2 = models.ForeignKey(Player, related_name='sub2')
> >   sub3 = models.ForeignKey(Player, related_name='sub3')
> >   sub4 = models.ForeignKey(Player, related_name='sub4')
> >   sub5 = models.ForeignKey(Player, related_name='sub5')
> >   class Admin:
> > pass
> > list_display = ('date', 'team', 'venue', 'opponent',
> > 'competition', 'howdenscore', 'opponentscore')
> > list_filter = ['date', 'team', 'venue', 'competition']
> > search_fields = ['date']
> >   def __str__ (self):
> > return self.opponent
>
> > Does anyone have any idea whats going on because I surely do not.
>
> > Thanks in advance,
> > Duncan
>
> --
> Honza Kr?l
> E-Mail: [EMAIL PROTECTED]
> ICQ#:   107471613
> Phone:  +420 606 678585


--~--~-~--~~~---~--~~
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 HTML/CSS as templates

2007-02-27 Thread Benedict Verheyen

MattW schreef:
> Dear Group,
> 
> I've got an HTML page with associated CSS that I want to use as my
> template. Just to test it, I call:
> 
> return render_to_response('about.html')
> 
> and I get the page, but with no CSS info. I've checked the page
> source, and it has the name of the stylesheet in there, and the page
> renders correctly when I open the html page in Firefox (rather than
> using it through django).
> 
> What am I doing wrong?
> 
> Thanks,
> Matt

Matt,

have you looked at
http://www.djangoproject.com/documentation/static_files/

You need to specifically enable serving of media files when using the
django server. It's all explained in the link above.

Regards,
Benedict


--~--~-~--~~~---~--~~
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 HTML/CSS as templates

2007-02-27 Thread Mike H


I'm taking a guess that your css is meant to be served as a static file
through your webserver and not a django view? If I'm right about that,
and you're using apache+mod_python, check out the "Serving Media"
section at http://www.djangoproject.com/documentation/modpython/

You need to tell your webserver where your static files, such as images
and css, are so that python+django can be bypassed and your webserver
can serve them.

HTH

Mike

On 2/27/2007, "MattW" <[EMAIL PROTECTED]> wrote:

>
>Dear Group,
>
>I've got an HTML page with associated CSS that I want to use as my
>template. Just to test it, I call:
>
>return render_to_response('about.html')
>
>and I get the page, but with no CSS info. I've checked the page
>source, and it has the name of the stylesheet in there, and the page
>renders correctly when I open the html page in Firefox (rather than
>using it through django).
>
>What am I doing wrong?
>
>Thanks,
>Matt
>
>
>

--~--~-~--~~~---~--~~
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 HTML/CSS as templates

2007-02-27 Thread Honza Král
On 2/27/07, MattW <[EMAIL PROTECTED]> wrote:
>
> Dear Group,
>
> I've got an HTML page with associated CSS that I want to use as my
> template. Just to test it, I call:
>
> return render_to_response('about.html')
>
> and I get the page, but with no CSS info. I've checked the page
> source, and it has the name of the stylesheet in there, and the page
> renders correctly when I open the html page in Firefox (rather than
> using it through django).
>
> What am I doing wrong?

you are not showing us the code, that's one thing you should correct,
without it, no one can guess what's wrong with it

>
> Thanks,
> Matt
>
>
> >
>


-- 
Honza Kr�l
E-Mail: [EMAIL PROTECTED]
ICQ#:   107471613
Phone:  +420 606 678585

--~--~-~--~~~---~--~~
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: newforms SelectDateWidget

2007-02-27 Thread Mike

The range function has an optional 'step' argument.

Howzabout:

SelectDateWidget(years=range(2006,1900,-1))

> But is there an easy way I can make the years display in reverse -
> i.e. descending rather than ascending?


--~--~-~--~~~---~--~~
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: Persistent connections

2007-02-27 Thread Ivan Sagalaev

[EMAIL PROTECTED] wrote:
> Is this truly the case? I thought Django used a persistent db
> connection.

No, Django closes connections upon each request. There were some 
discussions about it in the early days and some consensus was along the 
lines that a simple ad-hoc solutions like "just don't close connections" 
wouldn't suffice and it's better for the user to use solid external 
tools. pgpool is an example of such a tool for Postgres and there is 
also SQLRelay that works for many DBs.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Serving Media through mod_proxy.

2007-02-27 Thread David Abrahams


I'm running django with Apache/mod_python and serving media through
lighttpd. I have only one IP address, so lighttpd is running on port
8081, but some of my clients are behind firewalls that block ports
other than 80.

I'm planning to ditch Apache and run everything with lighttpd under
FastCGI, but I'm not ready to do that just yet just yet, so I'm
wondering if I can use mod_proxy to make it look like the media is
being served on port 80.  My guess is that would defeat the purpose of
having separate servers, but I thought I'd check.

TIA,

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.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
-~--~~~~--~~--~--~---



Persistent connections

2007-02-27 Thread [EMAIL PROTECTED]

Hello all,

I recently launched my first Djano site on Webfaction and I've been
getting a few errors a day emailed to me OperationalError: (1040, 'Too
many connections') I emailed Webfaction support to see if there was
anything they could do for me and this is what they said:

>> Hmm ... It looks like Django is trying to create connections on the fly, 
>> which is a bad thing (it should use persistent connections).
>> I'm not a Django expert but there must be a way to tell Django to use 
>> persistent connections.

Is this truly the case? I thought Django used a persistent db
connection.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Play Free Games! Win Cool Prizes!

2007-02-27 Thread aman

Play Free Games! Win Cool Prizes! - http://surl.in/HLARI238206SVRAKSX-google


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Using HTML/CSS as templates

2007-02-27 Thread MattW

Dear Group,

I've got an HTML page with associated CSS that I want to use as my
template. Just to test it, I call:

return render_to_response('about.html')

and I get the page, but with no CSS info. I've checked the page
source, and it has the name of the stylesheet in there, and the page
renders correctly when I open the html page in Firefox (rather than
using it through django).

What am I doing wrong?

Thanks,
Matt


--~--~-~--~~~---~--~~
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: un-broken order_by (was "Upcoming Django release, and the future")

2007-02-27 Thread Ramiro Morales

On 2/27/07, Ramiro Morales <[EMAIL PROTECTED]> wrote:

>
> Please apply & test the patch attached to ticket #2076 because I suspect this
> is the same issue. The select_related() call you are  using is a workaround to
> the real problem as suggested by Malcolm and the patch intends to be a
> solution to the real problem (note the notation to be used in the
> order_by call changes, see the documentation).
>
> We need the patch tested in as many real world scenarios like yours as we can.
> Tell us how it did for you.
>

Just to add thta the patch is not complete, there are a couple of ideal
characteristics it still is missing (read the commeents for details).
But it could be of great help in you situation and it would be great
if you help us by testing it.

Regards,

-- 
 Ramiro Morales

--~--~-~--~~~---~--~~
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: un-broken order_by (was "Upcoming Django release, and the future")

2007-02-27 Thread Ramiro Morales

Chris,

On 2/26/07, Chris Brand <[EMAIL PROTECTED]> wrote:
>
> Having gone on a dot-removal frenzy, I still have this one that fails :
> >>> from camps import models
> >>> app_list =
> models.Application.objects.select_related().order_by('camps_board_time_block
> .start_time')
> >>> app_list
> Traceback (most recent call last):
>   File "", line 1, in ?
>   File
> "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/db/models/que
> ry.py", line 97, in __repr__
> return repr(self._get_data())
>   File
> "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/db/models/que
> ry.py", line 430, in _get_data
> self._result_cache = list(self.iterator())
>   File
> "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/db/models/que
> ry.py", line 172, in iterator
> cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") +
> ",".join(select) + sql, params)
>   File
> "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/db/backends/u
> til.py", line 12, in execute
> return self.cursor.execute(sql, params)
>   File
> "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/db/backends/m
> ysql/base.py", line 35, in execute
> return self.cursor.execute(sql, params)
>   File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 137, in
> execute
> self.errorhandler(self, exc, value)
>   File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 33,
> in defaulterrorhandler
> raise errorclass, errorvalue
> OperationalError: (1054, "Unknown column 'camps_board_time_block.start_time'
> in 'order clause'")
>

Please apply & test the patch attached to ticket #2076 because I suspect this
is the same issue. The select_related() call you are  using is a workaround to
the real problem as suggested by Malcolm and the patch intends to be a
solution to the real problem (note the notation to be used in the
order_by call changes, see the documentation).

We need the patch tested in as many real world scenarios like yours as we can.
Tell us how it did for you.

Regards,

-- 
 Ramiro Morales

--~--~-~--~~~---~--~~
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: from .95 to six

2007-02-27 Thread Ned Batchelder
The trunk currently reports its version as "0.96-pre".  Perhaps this is 
the source of the confusion?

--Ned.

Russell Keith-Magee wrote:
> On 2/27/07, Perica Zivkovic <[EMAIL PROTECTED]> wrote:
>   
>> Picio,
>>
>> there is another option, www.portablepython.com includes django 0.96
>> and it's a good solution if you want to test your 0.95 applications
>> before replacing 0.95 with 0.96
>> 
>
> I don't know what portablepython.com is including, but it certainly
> isn't Django 0.96. At present, there is no such version as Django
> 0.96. The most recent release is 0.95.1.
>
> Yours,
> Russ Magee %-)
>
> >
>
>
>
>   

-- 
Ned Batchelder, http://nedbatchelder.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: Hiding Relationships in Forms

2007-02-27 Thread Caz

>
> So far, if I do:
>
> del DoseForm.base_fields['appointment']
> del DoseForm.base_fields['order']
>

Here's what I do:

UserProfileForm =
forms.models.form_for_model(UserProfile,formfield_callback=lambda i:
{'user':None}.get(i.name,i.formfield()))

This removes the 'user' foreign key from the model by virtual of the
nasty looking lambda function that simply returns None for 'user' and
the formfield for anything else.

> It allows me to get a form without the appointment and order fields.
> But when it comes back to post, I call:
>
> dose = dose_form.save(commit=False)
>

And then to address this issue i do the following:
if userProfileForm.is_valid() and userForm.is_valid():
...
userProfileForm.clean_data['user'] = None
userProfile = userProfileForm.save(commit=False)
userProfile.user = user
userProfile.save()

Which simply provides the clean_data with all the fields it expects to
be there. Does a save without commiting it to the db and finally
populates the fields that weren't in the form.

Caz


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Job Ad: Full-time Python software developer, Wimbledon, London, England

2007-02-27 Thread John J Lee

`ReportLab `_ (Wimbledon, London, England)


**Job Description**: ReportLab develop enterprise reporting and
document generation solutions using cutting-edge Python technology,
and have a growing business with an excellent blue chip customer base.
You may also know us from our open source PDF and graphics library...

We are looking for a full-time Python software developer for immediate
start.

We are now developing a new generation of applications to publish PDF
on demand for specific vertical markets in the travel and financial
services industries using our own core products.  These involve
flexible admin interfaces to let customers enter and approve data
prior to publishing with our own PDF products.  We are making use of
the very latest and best ideas in web development to help create value
for our customers and a scalable business model for ourselves.

There will be opportunities for travel to exotic locations to visit
travel industry customers.

We're looking for a good all-rounder to join our team and work on
this, as well as many other projects.  The ideal candidate will either
be a **graduate or have up to 3 years experience** and will have the
following skills:

 - Python programming - or enough evidence of skill elsewhere to
   persuade us you can learn it quickly

 - Good analysis skills - the ability to listen to customers,
   figure out where the value lies, and help decide what to build
   in the first place

 - Understanding of web frameworks, databases, XML.  Django
   experience is a plus

 - Know CSS and HTML (an eye for visual design is a plus)

 - Know JavaScript beyond the usual form validation (AJAX a plus)

 - Have the common sense to know when coding is NOT the answer

You must have good written English, good aptitude for programming, and
an ability to Get Things Done.  You must be eligible to work in the
UK, and have a passport allowing travel to most world locations.
Driving license is also an advantage.

You will get responsibilities which are not possible in large
companies including a chance to work with the latest and best
technologies; to see substantial, cutting-edge projects from
commencement to delivery with world class clients; and to help design
and roll out entire software services with fantastic upside potential.

**What Python is used for**: Just about everything.

* **Contact**: Alisa Pasic
* **E-mail contact**: [EMAIL PROTECTED]
* **Web**: http://www.reportlab.com/careers.html


John

--~--~-~--~~~---~--~~
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: Upcoming Django release, and the future

2007-02-27 Thread Phil Powell

On 26/02/07, James Bennett <[EMAIL PROTECTED]> wrote:
> If there's a bug that's been annoying the heck out of you and you want
> it fixed before the release, this would be the time to speak up about
> it. We have a fairly high concentration of Django developers all in
> one place with nothing to do but code, so hopefully we'll be able to
> hit a lot of stuff and get a release out very quickly (we'd like to
> release 0.96 in the next day or two).

My vote would be for a design decision to be made on 1541 and other
tickets related to mail.

-Phil

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



newforms SelectDateWidget

2007-02-27 Thread Phil Powell

Just a quick query about the SelectDateWidget:

The widget accepts an optional 'years' parameter for displaying a
range of years, like this:

SelectDateWidget(years = range(1900, 2006))

But is there an easy way I can make the years display in reverse -
i.e. descending rather than ascending?

-Phil

--~--~-~--~~~---~--~~
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: Upcoming Django release, and the future

2007-02-27 Thread Dirk Eschler

On Montag, 26. Februar 2007, James Bennett wrote:

Hi James,

[...]
> If there's a bug that's been annoying the heck out of you and you want
> it fixed before the release, this would be the time to speak up about
> it. We have a fairly high concentration of Django developers all in
> one place with nothing to do but code, so hopefully we'll be able to
> hit a lot of stuff and get a release out very quickly (we'd like to
> release 0.96 in the next day or two).

not really a bug, more an usability issue:

The available user permissions select in the user detail view of the admin 
interface should include the app name.

Say you have two apps, both with a class "section". In this case it's 
impossible to tell which section you assign permissions to. Both appear 
as "section | Can add section" etc. in the permission select box, which can 
in the worst case (if you choose the wrong one) become a security problem as 
well.

Best Regards.

-- 
Dirk Eschler 
http://www.krusader.org

--~--~-~--~~~---~--~~
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: Upcoming Django release, and the future

2007-02-27 Thread Russell Keith-Magee

On 2/27/07, David Larlet <[EMAIL PROTECTED]> wrote:
>
> 2007/2/27, Manoj  Govindan <[EMAIL PROTECTED]>:
> >
> > Will 0.96 have support for fixtures (a la #2333)?
> > Also, am I the only one waiting for them? ;)
> >
>
> Read the entire thread, we are all waiting for a single word of Adrian ;-).

FYI - that word has now been received. I'm working on merging in the
patch at the moment.

Yours,
Russ Magee %-)

--~--~-~--~~~---~--~~
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: database field

2007-02-27 Thread Mary

Dear Aidas;

Can you please give me more details for the solution as i can't
understand how to develop this solution

Thank you for your help :)
Mary Adel

On Feb 27, 12:12 pm, "Aidas Bendoraitis" <[EMAIL PROTECTED]>
wrote:
> I think, overriding the admin template for specific application would
> be the most straightforward solution:
> * create a template in your template dir admin/yourapp/change_form.html
> * show some field there only if request.user has some permissions.
>
> Regards,
> Aidas Bendoraitis [aka Archatas]
>
> On 2/25/07, Mary <[EMAIL PROTECTED]> wrote:
>
>
>
> > How can i create a field in a model that can't be seen by anyone that
> > logs onto the admin interface except by certain user only
>
> > Thank you in advance;
> > Mary Adel


--~--~-~--~~~---~--~~
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: is there a simpler way to do 3rd party app settings?

2007-02-27 Thread Afternoon

People should always do the INSTALLED_APPS edit themselves, I have
apps installed I'm not using, not least all the contrib apps!

For everything else I use something like

setting = getattr(settings, "MY_NEW_SETTING", default)

or

try:
setting = settings.MY_NEW_SETTING
except AttributeError:
# do something sensible, like return or nothing actually,
# because sometimes the AttributeError getting raised to the
# browser is the best way to hint that the setting is required

Ben


--~--~-~--~~~---~--~~
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: Upcoming Django release, and the future

2007-02-27 Thread David Larlet

2007/2/27, Manoj  Govindan <[EMAIL PROTECTED]>:
>
> Will 0.96 have support for fixtures (a la #2333)?
> Also, am I the only one waiting for them? ;)
>

Read the entire thread, we are all waiting for a single word of Adrian ;-).

Cheers,
David Larlet

--~--~-~--~~~---~--~~
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: database field

2007-02-27 Thread Aidas Bendoraitis

I think, overriding the admin template for specific application would
be the most straightforward solution:
* create a template in your template dir admin/yourapp/change_form.html
* show some field there only if request.user has some permissions.

Regards,
Aidas Bendoraitis [aka Archatas]


On 2/25/07, Mary <[EMAIL PROTECTED]> wrote:
>
> How can i create a field in a model that can't be seen by anyone that
> logs onto the admin interface except by certain user only
>
> Thank you in advance;
> Mary Adel
>
>
> >
>

--~--~-~--~~~---~--~~
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: Upcoming Django release, and the future

2007-02-27 Thread Manoj Govindan

Will 0.96 have support for fixtures (a la #2333)?
Also, am I the only one waiting for them? ;)

Regards,
Manoj

On Feb 26, 9:56 am, "James Bennett" <[EMAIL PROTECTED]> wrote:
> Upcoming Django release, and the future
>
> As we sit here in warm, sunny Dallas, meditating on how next year's
> PyCon will be in cold, cloudy Chicago, we're also getting ready to
> push out a new release of Django, and with that there are some things
> you all need to know, and as your friendly neighborhood release
> manager it's my job to tell you :)
>
> First, the immediate future: the goal of the first part of our PyCon
> sprint this year is to get Django 0.96 rolled and released. There's a
> lot of cool new stuff that's landed in trunk since 0.95 (like the
> testing framework and the newforms library), and we want to get it out
> in an official release.
>
> If there's a bug that's been annoying the heck out of you and you want
> it fixed before the release, this would be the time to speak up about
> it. We have a fairly high concentration of Django developers all in
> one place with nothing to do but code, so hopefully we'll be able to
> hit a lot of stuff and get a release out very quickly (we'd like to
> release 0.96 in the next day or two).
>
> After 0.96, though, there will be some major, backwards-incompatible
> changes; several things, like the admin refactoring Jacob announced
> last night, will require changes that just can't be
> backwards-compatible, and will require a lot of activity on trunk for
> a while. In that light, Django 0.96 is important not just for getting
> all the cool features we've developed on trunk since 0.95, but also
> for being a relatively easy upgrade for users of 0.95 and a stable
> version to run with while we do a lot of work on trunk to get some
> things into their "ready for 1.0" state.
>
> It's not clear right now how long it'll be between 0.96 and the next
> release. In the meantime, 0.96 will serve as a pleasant mix of
> compatibility and new features; a couple of things have changed (like
> the location of the admin documentation views), but on the whole it
> should be an easy upgrade for anyone who's already at 0.95.
>
> If you've got any questions about all of this, feel free to reply and
> I'll do my best to answer them or delegate to someone who can. And if
> you've got some free time this week and want to help us kill bugs in
> the run up to 0.96, let us know and we'll be happy to show you how you
> can help.
>
> --
> "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: where is the code for the date widget in admin

2007-02-27 Thread Aidas Bendoraitis

Kenneth, you should use proper tools for development in order not to
face such problems:
a) you need a text editor with the full-text search capability to
search for specific text in all files of a directory (You can try
jEdit for that).
b) you need developers' tools for your web browser like FireBug for
Firefox (or at least use "view source").

Good luck!
Aidas Bendoraitis [aka Archatas]


On 2/24/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> On Sat, 2007-02-24 at 13:13 +0530, Kenneth Gonsalves wrote:
> >
> > On 24-Feb-07, at 12:22 PM, oggie rob wrote:
> >
> > > You need to include django/contrib/admin/media/js/calendar.js & admin/
> > > DateTimeShortcut.js, and put 'class="vDateField"' or "vTimeField" for
> > > each widget. The html is dynamically generated by javascript when you
> > > load the page (based on class name), which is why you can't find the
> > > js code from the HTML source directly.
> >
> > i did that - now am getting a javascript error - 'gettext not found'.
> > Apparently this is in a file called 'jsi18n' which i cant find.
>
> Read the i18n.txt documentation -- particularly the section about the
> javascript_catalog view. I think that will help with some of your
> difficulties.
>
> Regards,
> Malcolm
>
>
>
> >
>

--~--~-~--~~~---~--~~
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] passing a md5 digest string into URL

2007-02-27 Thread Giuseppe Franchi

Hello everyone... again. :)
As i said, i need to pass in my URL a  variable, wich is the
result of a md5 digest.
(no private information... only a validation key).

Obviously i tried with
(r'^users/activate_user/(?P)/', 'views.register'),
(r'^users/activate_user/(?P[a-zA-Z0-9%\-]+=)/',
'views.register'),
but it doesn't work: Django always return 404.

Is it an encoding problem or something? Any idea on how should i do?

Cheers (and grateful thanks, this group is greatly useful)


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Generate a tree List...

2007-02-27 Thread Jens Diemer

I wand generate a tree menu/sitemap.
How can i make a recursive loop in a template???

In jinja i can use the tag "recurse":
http://wsgiarea.pocoo.org/jinja/docs/loops.html#recursion

Here a jinja example:

context = {'sitemap': [{'href': u'/Index/',
   'subitems': [{'href': u'/Index/PhpBBadmin/',
 'title': u'phpBBadmin'}],
   'title': u'index'},
  {'href': u'/ExamplePages/',
   'subitems': [{'href': u'/ExamplePages/TextileExample/',
 'title': u'complete tinyTextile examples'},
{'href': u'/ExamplePages/Testpage/',
 'title': u'a testpage ;)'},
{'href': u'/ExamplePages/SourceCode/',
 'title': u'SourceCode'},
{'href': u'/ExamplePages/Contact/',
 'title': u'contact'},
{'href': u'/ExamplePages/SiteMap/',
 'title': u'SiteMap'}],
   'title': u'example pages'},
  {'href': u'/Test/', 'title': u'test'}]}


template = """
Sitemap

{% for item in sitemap %}
   
 {{ item.title|escapexml }}
 {% if item.subitems %}
 {% recurse item.subitems %}
 {% endif %}
   
{% endfor %}

"""


recurse used the for loop again with the subitems. So i can easy create 
a recursion.

How can i do this in django?


-- 
Mfg.

Jens Diemer



CMS in pure Python CGI: http://www.pylucid.org


--~--~-~--~~~---~--~~
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: Project example

2007-02-27 Thread BearXu
I am sorry for the wrong url. the right one is here:
http://code.djangoproject.com/browser/djangoproject.com/django_website/

2007/2/27, BearXu <[EMAIL PROTECTED]>:
>
> the django's official website's source is here:
> http://code.djangoproject.com/browser/django/trunk/
>
> 2007/2/27, Alessandro Ronchi <[EMAIL PROTECTED]>:
> >
> >
> > Where can I find a django project (maybe with a blog app) with i18n
> > and good templates I can use as a base to learn how to learn good
> > practises of the use of django do develop?
> >
> > I have to make a website with some "static" pages and a database of a
> > museum pictures, as well as a blog and a contact form. If you can help
> > me just sending me some urls where I can get useful information, I
> > will appreciate very much!
> >
> > Thanks in advance, best regards.
> >
> > --
> > Alessandro Ronchi
> > Skype: aronchi - Wengo: aleronchi
> > http://www.alessandroronchi.net - Il mio sito personale
> > http://www.soasi.com - Sviluppo Software e Sistemi Open Source
> >
> > > >
> >
>

--~--~-~--~~~---~--~~
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: Project example

2007-02-27 Thread BearXu
the django's official website's source is here:
http://code.djangoproject.com/browser/django/trunk/

2007/2/27, Alessandro Ronchi <[EMAIL PROTECTED]>:
>
>
> Where can I find a django project (maybe with a blog app) with i18n
> and good templates I can use as a base to learn how to learn good
> practises of the use of django do develop?
>
> I have to make a website with some "static" pages and a database of a
> museum pictures, as well as a blog and a contact form. If you can help
> me just sending me some urls where I can get useful information, I
> will appreciate very much!
>
> Thanks in advance, best regards.
>
> --
> Alessandro Ronchi
> Skype: aronchi - Wengo: aleronchi
> http://www.alessandroronchi.net - Il mio sito personale
> http://www.soasi.com - Sviluppo Software e Sistemi Open Source
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Project example

2007-02-27 Thread Alessandro Ronchi

Where can I find a django project (maybe with a blog app) with i18n
and good templates I can use as a base to learn how to learn good
practises of the use of django do develop?

I have to make a website with some "static" pages and a database of a
museum pictures, as well as a blog and a contact form. If you can help
me just sending me some urls where I can get useful information, I
will appreciate very much!

Thanks in advance, best regards.

-- 
Alessandro Ronchi
Skype: aronchi - Wengo: aleronchi
http://www.alessandroronchi.net - Il mio sito personale
http://www.soasi.com - Sviluppo Software e Sistemi Open Source

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---