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.
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
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
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 ki
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 v
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 rec
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 re
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
corresp
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 jus
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 OldU
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 dj
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 (latin1_swedish_ci,I
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 a
> 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. Thus,
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 *
>
> I
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?
> Altern
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 proc
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 ju
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 for
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.
I
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 feat
>
> 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" group
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 of?
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 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 = models.ForeignKey(User
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 = mod
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'] = School.schoolperson
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:
>
> clas
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 Sect
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:
>
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
> appr
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
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
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 o
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 the
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:
>
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 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 Sect
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 an
On Mon, 2007-03-26 at 12:12 -0500, Greg Donald wrote:
> 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 thi
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 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
> > http://code.djangoproject.com/
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 self.db.qu
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 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 CursorDebugWrapper.execu
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 d
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 put
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 her
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 fi
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 list
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 P
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 applicati
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
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: on
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'
> 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 w
On 3/26/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> It (logging all queries), is also just not something that's usually that
> useful. If you are trying to track down a particular problem, a more
> targeted approach and some experiments at the interactive prompt,
> combined with printing o
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
> < 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 poll.choice_set.all
In a many-to-one relationship (ie reverse of ForeignKey), an instance
has a related manager that (apparently) caches its relatees, at least
in some circumstances. Is it possible to clear this cache?
This would be useful in the following scenario:
class Foo( Model ):
pass
class Bar( Model ):
Thanks for the time to reply.
I installed django by copyong the packahe into site-packages.
The w2k box uses ntfs and is just a local pc. No network setup except
internet connection.
I think what I will do is start clean and redo the tuturial.
I'm still not too clear about what to pass for the
Joe
Thanks for the info.
I'm going to redo the tutorial and see where I get.
John
On Mar 27, 4:33 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> > < > match the new templates and context variables. Change the template
> > call from polls/detail.html to polls/poll_detail.html, and pass o
62 matches
Mail list logo