> < match the new templates and context variables. Change the template
> call from polls/detail.html to polls/poll_detail.html, and pass object
> in the context instead of poll.>>
This change refers to the template file -
[original stuff]
{{ poll.question }}
{% for choice in
On 3/26/07, RajeshD <[EMAIL PROTECTED]> wrote:
> Try this:
> msgs = Messages.active.filter(project__active=True)
Yup. Thanks.
--
Greg Donald
http://destiney.com/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
> It does work. However the "email" field of User should be set to
> "blank=False" and "unique=True" if we really want to use email as the
> unique userid. How can we override the default field definition of
> User.email?
You can add unique constraint on email column on database level,
Django
hi, there.
i have a problem with the django admin site.
i have a table called 'players' which consists of the following
fields;
'lastname', 'firstname' and 'lastmodified'.
and i have defined the ordering of the table by
ordering = ['lastname', 'firstname'].
(i.e. 'lastname' and then 'firstname'
On 3/26/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> You will get dozens or hundreds of queries with very little way to tell
> which thread or process is doing the logging. Since all the requests
> will be interleaved, this will be even harder to track. Serialisation is
> also a problem:
Malcom,
Sorry, you are correct. I completely flubbed on that one.
-Doug
On Mar 26, 8:24 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Mon, 2007-03-26 at 22:51 +, [EMAIL PROTECTED] wrote:
> >http://www.djangoproject.com/documentation/model-api/#many-to-one-rel...
>
> > class
While this is not explicitly a Django tool, I hope you'll allow me to
post a quick announcement about a project I'm releasing into the wild
called Barnum.
Here are some snippets from the readme to explain it a little bit more-
What is Barnum?
===
Barnum is a python-based
On Mon, 2007-03-26 at 22:41 -0300, Anderson Santos Silva wrote:
> I am working with the trunk, and I never tried the order_with_respect_to
> before, so I don't know how it works but it's on the official Django's
> documentation.
> Since my model is called Section, it's probably something about
On Mon, 2007-03-26 at 20:22 -0500, Jeremy Dunck wrote:
> On 3/26/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> > I
> > did an experiment early last year to put in calls to the python logging
> > module throughout various paths in Django. It had a noticeable impact.
>
> I had this on my
I am working with the trunk, and I never tried the order_with_respect_to
before, so I don't know how it works but it's on the official Django's
documentation.
Since my model is called Section, it's probably something about Python
tricks to get a property dinamically. That sounds exciting, my
On 3/26/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> I
> did an experiment early last year to put in calls to the python logging
> module throughout various paths in Django. It had a noticeable impact.
I had this on my list of things to do at some point. I'm not arguing
to add logging
On Tue, 2007-03-27 at 11:09 +1000, Malcolm Tredinnick wrote:
> On Mon, 2007-03-26 at 19:57 -0500, Greg Donald wrote:
> > On 3/26/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> > > If you want to capture every query automatically like this, you can edit
> > > django/db/backends/util.py and
Hi John,
On 3/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I did a search on this and was pointed at environment issues but
> without a clear pointer as to what to do.
If you are having problems with importing django.core.management, it
means that the django-admin script can't import
On Mon, 2007-03-26 at 19:57 -0500, Greg Donald wrote:
> On 3/26/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> > If you want to capture every query automatically like this, you can edit
> > django/db/backends/util.py and put the logging to file in place inside
> > the
On Tue, 2007-03-27 at 02:52 +0200, Honza Král wrote:
> On 3/27/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> >
> > On Mon, 2007-03-26 at 21:56 +0200, Gilhad wrote:
> > > I am trying to get current user, but I have some problem with it. I got
> > > different '_local' object each time ...
> >
On 3/26/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> If you want to capture every query automatically like this, you can edit
> django/db/backends/util.py and put the logging to file in place inside
> the CursorDebugWrapper.execute() method -- where it is currently
> appending to
On 3/27/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> On Mon, 2007-03-26 at 21:56 +0200, Gilhad wrote:
> > I am trying to get current user, but I have some problem with it. I got
> > different '_local' object each time ...
> >
> > I followed the example at
> >
On 3/26/07, Anton Stonor <[EMAIL PROTECTED]> wrote:
>
> It would be nice if I could model these use types as different user
> models, but a hack could of cause be to have one large profile and hide
> different fields according to the user type.
>
> Ideas are welcome.
Hi Anton,
James Bennett has
On Mon, 2007-03-26 at 16:25 +, John Lee wrote:
> It does work. However the "email" field of User should be set to
> "blank=False" and "unique=True" if we really want to use email as the
> unique userid. How can we override the default field definition of
> User.email?
You cannot override
On Mon, 2007-03-26 at 19:23 -0300, Anderson Santos Silva wrote:
> Hello, I am having problem when I use the order_with_respect_to and
> a self related foreign key model:
>
> When I validate this, it raises "'str' object has no attribute
> 'get_section_order'" and when I use self or
On Mon, 2007-03-26 at 22:51 +, [EMAIL PROTECTED] wrote:
> http://www.djangoproject.com/documentation/model-api/#many-to-one-relationships
>
> class Section(models.Model):
> parent = models.ForeignKey('self', < BAD
> parent = models.ForeignKey('Section', < GOOD
I'm sorry, but
On Mon, 2007-03-26 at 21:56 +0200, Gilhad wrote:
> I am trying to get current user, but I have some problem with it. I got
> different '_local' object each time ...
>
> I followed the example at
> http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
>
> and make my model such way:
>
Awesome!
I knew it had to be something small - many thanks! :)
On Mar 26, 4:12 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> remove the ','
>
> {% ifequal nav.slugName current %}
>
> -Doug
>
> On Mar 26, 7:06 pm, "Mikey" <[EMAIL PROTECTED]> wrote:
>
> > Can someone tell me why
On 3/27/07, Jonas Maurus <[EMAIL PROTECTED]> wrote:
>
> On Mar 26, 11:10 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
> > I apologize for the vague newbie question, but I'm gonna ask it
> > anyway...
> >
> > I'd like to switch DBs from mysql to postgres... how does one do so? I
> > assume
remove the ','
{% ifequal nav.slugName current %}
-Doug
On Mar 26, 7:06 pm, "Mikey" <[EMAIL PROTECTED]> wrote:
> Can someone tell me why the following template code always evaluates
> to true when comparing two strings:
>
>
> {% for nav in nav_items %}
> {% ifequal nav.slugName, current
Can someone tell me why the following template code always evaluates
to true when comparing two strings:
{% for nav in nav_items %}
{% ifequal nav.slugName, current %}
{{ nav.displayName }}
{% else %}
{{ nav.displayName }}
{% endifequal %}
{% endfor %}
if
On Mar 26, 11:10 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I apologize for the vague newbie question, but I'm gonna ask it
> anyway...
>
> I'd like to switch DBs from mysql to postgres... how does one do so? I
> assume one must export from mysql, import to postgres, then make the
>
http://www.djangoproject.com/documentation/model-api/#many-to-one-relationships
class Section(models.Model):
parent = models.ForeignKey('self', < BAD
parent = models.ForeignKey('Section', < GOOD
-Doug
On Mar 26, 6:23 pm, Anderson Santos Silva <[EMAIL PROTECTED]>
wrote:
>
Hello, I am having problem when I use the order_with_respect_to and
a self related foreign key model:
When I validate this, it raises "'str' object has no attribute
'get_section_order'" and when I use self or Section, it raises the error:
"Section has no field named 'self'"
class
On 3/26/07, Gilhad <[EMAIL PROTECTED]> wrote:
>
> I am trying to get current user, but I have some problem with it. I got
> different '_local' object each time ...
>
> I followed the example at
> http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
>
> and make my model such way:
>
>
You are so close! this is a very common question.
you want something like:
{% for school_emp in School.schoolpersonel_set.all %}
But passing in the Model class 'School' is considered bad form.
In your view, add the result of all() to your context:
extra_context['personel'] =
OK, I'm a Python/Django newbie (more or less), and I have a problem.
I had these two models (details stripped for clarity:
class School(models.Model):
...
name = models.CharField()
street = models.CharField()
mail = models.CharField()
city = models.CharField()
state =
I am trying to get current user, but I have some problem with it. I got
different '_local' object each time ...
I followed the example at
http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
and make my model such way:
class Vykon(models.Model):
user =
On Mar 25, 2007, at 8:19 PM, Malcolm Tredinnick wrote:
>
> On Sun, 2007-03-25 at 15:54 -0700, David M. Besonen wrote:
>> are there any issues/caveats/problems around using django + fcgi?
>>
>> i'm guessing there might things to be wary of, given that
>> mod_python appears more prominently in the
I apologize for the vague newbie question, but I'm gonna ask it
anyway...
I'd like to switch DBs from mysql to postgres... how does one do so? I
assume one must export from mysql, import to postgres, then make the
appropriate changes in settings.py, but are there any gotchas I should
be aware
>
> msgs = Messages.active.filter( Q( project=project.id, project.active=True ) )
>
Try this:
msgs = Messages.active.filter(project__active=True)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
I updated the Windows installer for Django 0.96 using bdist_nsi and NSIS
2.18.
Until it is hosted by djangoproject.com, ask me for a copy.
Thanks,
Eugene
James Bennett wrote:
> We're pleased to announce the release of Django 0.96 today; this
> release involves cleanup and stabilization of
I downloaded the latest release from django and followed the install
instructions for windows.
I am using windows 2000. Python 2.4 django 0.96. PostgreSQL 8.1
psycopg2.
I then started the tutorial.
I started to have problems with not being able to find modules such as
django.core.management.
How can I base a query on a foreign key field? If I have a project
and I have messages for the project, and I only want to return
messages from active projects, how do I write that? I already have a
manager for getting active messages, and that works, but then I also
need something like this
On 3/26/07, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote:
>
> On 3/24/07, mariuss <[EMAIL PROTECTED]> wrote:
> > Hm, yes, there is such a folder:
> > /usr/lib/python2.4/site-packages/Django-0.95.1-py2.4.egg
> >
> > but isn't this recorded in some registry/database/path as well?
>
> No -- this is
On 3/26/07, gdonald <[EMAIL PROTECTED]> wrote:
> I tried a couple of page reloads, stuff I know is querying the
> database, still nothing.
It resets at the end of each page load, and each request/response
cycle gets its own copy, so you need to access it from within that.
The 'debug' context
On 3/26/07, Tim Chase <[EMAIL PROTECTED]> wrote:
>result = render_to_response('foo.html', context)
>f = file('debug.txt', 'w')
>f.write(repr(connection.queries))
>f.close()
>return result
Where can I put this so I get all queries for every request into a single file?
>
Hey Greg,
gdonald wrote:
> On Mar 13, 5:03 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
>> http://www.djangoproject.com/documentation/faq/#how-can-i-see-the-raw-sql-queries-django-is-running
>
> When I try this I get nothing:
>
>> python manage.py shell
> In [1]: from settings import *
>
>
> In [3]: from django.db import connection
>
> In [4]: connection.queries
> Out[4]: []
>
> I tried a couple of page reloads, stuff I know is querying the
> database, still nothing.
>
> Any idea what I'm doing wrong?
The connection.queries is only available within a
session/transaction.
I have added a manager so to only return active messages in my Message model:
class ActiveMessageManager(models.Manager):
def get_query_set(self):
return super(ActiveMessageManager,
self).get_query_set().filter(date_removed__isnull=True).order_by('date_sent')
That works fine as far
Hello dear django comunnity, Im having a bad time with my database in
MySQL the problem is that when I try to store a word with some "rare"
characters like á é í and many others, django shows this message to
me
OperationalError at /uploading/
(1267, "Illegal mix of collations
On Mar 13, 5:03 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> http://www.djangoproject.com/documentation/faq/#how-can-i-see-the-raw-sql-queries-django-is-running
When I try this I get nothing:
> python manage.py shell
In [1]: from settings import *
In [2]: DEBUG
Out[2]: True
In [3]: from
It does work. However the "email" field of User should be set to
"blank=False" and "unique=True" if we really want to use email as the
unique userid. How can we override the default field definition of
User.email?
I tried something like this:
from django.contrib.auth.models import User as
I'm using newforms via form_for_model and would like to take advantage
of the min_value and max_value for a newforms integer field. Ideally,
this could go in the model definition for the IntegerField, but it
doesn't have equivalent parameters. What's the recommended way to do
this? Should I
Hi Djangonauts,
I read chapters 6 and 18 of the django book about the admin interface
and how to extend/customize it but I'm still at a loss on if and how
can I add custom fields in the add/change form. What I want to be able
to do is set in my model's Admin class extra fields that do not
On 3/24/07, mariuss <[EMAIL PROTECTED]> wrote:
> Hm, yes, there is such a folder:
> /usr/lib/python2.4/site-packages/Django-0.95.1-py2.4.egg
>
> but isn't this recorded in some registry/database/path as well?
No -- this is just one of the reasons I greatly dislike eggs :/
> Is it safe to just
Grand opening at www.amirelectronics.com. Electronics including
printers, copiers, scanners, fax machines, shredders, CD players,
Laser ink cartridges toners, Mini chopper, computer accessories and a
lot more at very affordable price.
--~--~-~--~~~---~--~~
You
Dear
Don't know exactly How it works...
I recently joined AGLOCO because of a friend recommended it to me. I
am now promoting it to you because I like the idea and I want you to
share in what I think will be an exciting new Internet concept.
AGLOCO's story is simple:
Do you realize how
Hi there,
I'm evaluating Django for a project and the framework fits in many ways.
However on one issue it would be nice with some help to hand-sew the glove:
We need multiple types of users. Different profiles and different
permission.
To be more specific: it is a event site where different
Sorry I didn't see this thead earlier.
We wrote a proposal review system for PyCon2007. The source code is
under the Python License.
http://us.pycon.org/TX2007/PyConTech
https://svn.python.org/conference/django/trunk/
The goal is to write conference software for any conference.
I could use some
Hey Ross. :-)
On Mon, 2007-03-26 at 01:48 -0700, Ross Burton wrote:
> On Mar 25, 3:28 pm, "Ross Burton" <[EMAIL PROTECTED]> wrote:
> > > What is it you want to do with the ones they've voted on vs. haven't? If
> > > you're going to hide the ones they've already voted on, just write a
> > > query
On Mar 25, 3:28 pm, "Ross Burton" <[EMAIL PROTECTED]> wrote:
> > What is it you want to do with the ones they've voted on vs. haven't? If
> > you're going to hide the ones they've already voted on, just write a
> > query in the view method that only returns those and pass that to the
> > context.
57 matches
Mail list logo