Ivan Sagalaev wrote:
This is in fact pretty standard Django ORM, nothing special to TagsField:
blog.tag_set.all()
Thanks Ivan, but I was hoping to get a list of all tags not only
related to the *current* blog entry (I'm already using this in my
template), but *all* blog entries. I'd like
Can you paste the full traceback for the string index error?
That's the problem: there isn't one (that I can see), the error is
given by runserver:
$ python manage.py runserver
Validating models...
threeci.stockphoto: string index out of range
1 error found
Is there elsewhere I can look?
--
Hi,
I use SQlite with Apache mod_python for my (low traffic) web sites. I
find it really easy to manage, and it works just great up to now. It
has never crashed in 3 months, can accept several users concurrently,
is fast and has minimum configuration. I would recommend it for
development and lim
bump.
as stipulated. there was no change in the django setting or at the
server level between the time it was working and the reboot. it looks
like a PYTHONPATH error but the python path is present.
--~--~-~--~~~---~--~~
You received this message because you are
On 17/01/07, Isaac Alston <[EMAIL PROTECTED]> wrote:
> Can you paste the full traceback for the string index error?
That's the problem: there isn't one (that I can see), the error is
given by runserver:
$ python manage.py runserver
Validating models...
threeci.stockphoto: string index out of ra
hello everyone,
I'm trying to do subclassing using newforms, but anything in the
subclass just doesn't get passed on to the superclass:
===
from django import newforms as forms
class BaseForm(forms.Form):
field1 = forms.Ch
ok,
simple example:
we need a form, that consists of questions.
question is a django model and we can have any number of them.
let's assume, that answer is a string, so we can use text widget
(in my project type of field varied for questions).
in manipulator's __init__ we iterate all questions t
Ok, thanks everyone...I am looking at all of the suggestions above, but
it does look like Chris's solution is a good one - being able to
separate the Django logic that you already have, from the templates,
and from the PDF generation has got through to even my limited
understanding.
A million th
Ok ORM gurus: my models form a foreign key "chain":
ProductType <- Product -> Producer -> Region -> Country
My view needs the list of product types for each Producer, Region and
Country. Currently I iterate all producers, regions and countries in
the view and do e.g.
country.producttypes =
Pr
Karen,
Thanks for opening the ticket. Nice to see a patch as well.
--~--~-~--~~~---~--~~
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 unsubs
Hi - got a bit of a tricky one, which I can't quite come up with a
sensible design pattern for:
I have a contact form, which appears on a number of different pages
across a site. To keep it generic and cut down on duplication of
code, my thinking was that I should create a templatetag to displa
Basically I am working on a very light groupware project, customised for my unit
(in terms of functionalities, workflows, reporting, statistics).
I started a Django project with 3 major features in mind:
1) bug tracking (a la Trac, without any connection to revision control)
2) centralized docum
natebeaty wrote:
SELECT t.value FROM `blog_blog_tags` b LEFT JOIN `tags_tag` t ON
(b.tag_id=t.id)
but that feels like cheating.. besides, I'd like to better understand
the ORM.
Ah... You mean "all tags that have relation to any blog". This is it:
Tag.objects.filter(blog__id__isnull=False
On 1/17/07, Isaac Alston <[EMAIL PROTECTED]> wrote:
Ok, I figured this part out. I looked at the stockphoto/models.py
code, and discovered it was doing something like STOCKPHOTO_URL[-1],
which was obviously causing the error, but I couldn't work out why.
Then I realised that if STOCKPHOTO_URL wa
I have followed up this problem and tried both the psycopg and psycopg2
database adaptors for PostgreSQL. Neither allows functions to be
defined via dollar-quoted strings. I don't understand how "telenieko"
was able to get this to work.
I placed the following code into an SQL initialization fun
On 1/17/07, Jazz <[EMAIL PROTECTED]> wrote:
As you can see, it triggers an "unterminated dollar-quoted string"
error. After further investigation, this seems to be related to ticket
#3214, which is so far unresolved.
Yeah, the code that's breaking is in django.core.management; it's not
b
Thank you for the explanation. It does not look like I have
misunderstood anything. Let's hope it is eventually handled properly
by Django.
But I would rather see Django v1.0 first! :-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Bram - Smartelectronix wrote:
I'm trying to do subclassing using newforms, but anything in the
subclass just doesn't get passed on to the superclass:
Maybe this would work for you?
class ExtendedForm(BaseForm):
def __init__(self, *args, **kwargs):
super(BaseForm, self).__init__(*arg
Stefan Foulis <[EMAIL PROTECTED]> writes:
On Jan 16, 2007, at 17:52, David Abrahams wrote:
For me, Django doesn't seem to be delivering on its promise to allow
me to build a collection of apps and organize them in different
combinations into multiple Django projects, and the documentation I
Hi all,
I've been working on a reasonably large internal site using Django.
I was hitting the problem that user logins seemed to be getting
confused; ie., two users logged in at the same time would
occasionally switch 'User' database entries in request.user; one
user's request.user woul
"Doug Van Horn" <[EMAIL PROTECTED]> writes:
You would put parent_folder and parent_folder/spam_website into your
python path.
So when you need a model from the foo application, you do:
from foo.models import Eggs
and if you need something from the settings module in the project, you
do:
Hi,
Yeah. And conversely, it's weird that in other places django smooshes
together what ought to be separate namespaces. For example, a
template can refer to the templatetags of any app without
qualification. Is there even a way to add qualification to
disambiguate? If I have two apps with
I place my templates inside the "app_name/templates/app_name"
directory. It seems template search path look for the template on this
directory first. So, to decouple the app, templates should be inside it
I think.
But what would happen in this case if two sites use very different
templates for
I like to do my client-side validation as they go, and have a nice
script that does just that on any input I add the class "required"
to... tells them when it's wrong, and when it's right, before they ever
hit submit. Then let the server side double-check. None of that has
anything to do with dja
Anyone?
ZebZiggle wrote:
Hey all,
Belated Happy New Year!
I'm embarking on a new Django project (a business application vs. the
http://www.MyDarkSecret.com game of my previous effort). I'm hoping to
use the admin capabilities of Django for this project.
However, I have App A and App B both
Mmm... it's a bit confusing. If I get you, you have 2 projects.
Project1 has 2 apps that you would like to reuse in Project 2.
And you have 2 different DB, one for each. And you are wondering how
the projects will differenciate them?
There is right now a thread about project and application
dif
The problem is most likely with your MEDIA_URL. Make sure it ends with a '/'
Thank you very much. That seems to be it fixed :-D. First I had
MEDIA_URL set to:
' ' then
'127.0.0.1:8000', then
'127.0.0.1:8000/' then
'/', then finally
'/smedia'
which got it working. I'm so happy :-). The only th
That's more than annoying, but I've never seen or heard of that problem before.
What's your server setup (modpy, flup, ...?)
Are you using a proxy?
What client browsers are being used?
Assuming the server is sane, the session cookie is the only thing
determining the request.user, so I suspect e
I don't think TinyRML is as powerful as RML, but you can't beat the price!
Is TinyRML being actively maintained?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send
On 1/17/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
Assuming the server is sane, the session cookie is the only thing
determining the request.user, so I suspect either your server isn't
sane (as in, threading is killing you), or something is wrong with
downstream caches.
Or he's using a versio
Here's the problem. I have a list of newsletters that I want to group
by year. My view is simply getting them all in reverse date order.
How do you properly handle the HTML output for this?
I have this, which is broken in that it opens and closes a UL tag with
nothing in it...
{% if news_l
On 1/17/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote:
I'm trying to do subclassing using newforms, but anything in the
subclass just doesn't get passed on to the superclass:
Correct. Fields defined as attributes on a subclass do not get added.
Use __init__() in the subclass to append t
Hi,
has anyone here got Django running on Redhat ES in production (live) in
a stable form?
--~--~-~--~~~---~--~~
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@go
Is there a way to detect that the database is offline and provide a
message (to all URLs), something like, "The database is down for
upgrades. Check back in about an hour."
Of course it's easy enough to drop in a temp urls.py to reroute all to
the same view with a simple output message, but I w
Hello Adrian,
Correct. Fields defined as attributes on a subclass do not get added.
Use __init__() in the subclass to append to the self.fields
dictionary, as Jeff suggested.
Great.. That's a quick solution.
Note that this behavior is up for discussion if many people find it
inconvenient. M
Bram - Smartelectronix wrote:
If you say more people have tried it (without reading this before ;-)) I
would think the intuitive way is definitely the way to go.
replying to my own mail... it does make the *order* of the fields in the
template render rather unintuitive... Intuitively I'd say
Is TinyRML being actively maintained?
Unfortunately, it doesn't look like there's been any activity for about 1
year. I haven't tried getting in touch with the maintainer to see. For
my limited use it appears to work fine.
-Chris
--~--~-~--~~~---~--~~
You r
On 1/17/07, antonio von carmoducci <[EMAIL PROTECTED]> wrote:
has anyone here got Django running on Redhat ES in production (live) in
a stable form?
Yes, Redhat ES was our platform of choice when we were developing
Django at World Online. We used it with Apache/mod_python. I'm not
sure whether
Creating field classes for validation makes sense but what if I need to
validate in a request context?
Say for example that I need to check permissions for request.user in
clean?
def clean(self, value):
if request.user.has_some_property() and value > 100:
raise forms.ValidationError, 'You
Hi,
I'm portuguese and I'm going to translate django to pt-pt in this
month. Stay tune.
Nuno Mariz
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-
On 1/17/07, James Bennett <[EMAIL PROTECTED]> wrote:
...
Or he's using a version of Django prior to revision 3754, which fixed
a subtle bug in the way request.user is set up. Applying this diff
should clear up the problem:
Ah, for clarity, that existed on trunk from [2809] (magic-removal) to [
On 1/17/07, serbaut <[EMAIL PROTECTED]> wrote:
Say for example that I need to check permissions for request.user in
clean?
def clean(self, value):
if request.user.has_some_property() and value > 100:
raise forms.ValidationError, 'You are not allowed to go that high,
please enter a value
On 1/17/07, Isaac Alston <[EMAIL PROTECTED]> wrote:
> The problem is most likely with your MEDIA_URL. Make sure it ends with a '/'
Thank you very much. That seems to be it fixed :-D. First I had
MEDIA_URL set to:
' ' then
'127.0.0.1:8000', then
'127.0.0.1:8000/' then
'/', then finally
'/smedia
On Wed, 17 Jan 2007 17:27:05 +, Nuno Mariz wrote:
Hi,
I'm portuguese and I'm going to translate django to pt-pt in this
month. Stay tune.
Nuno Mariz
That'd be great! Looking forward to it being included in the framework!
--~--~-~--~~~---~--~~
You recei
Ok, that's great, thanks for everything.
--
Isaac
--~--~-~--~~~---~--~~
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 gr
On 1/16/07, Chad Whitacre <[EMAIL PROTECTED]> wrote:
If you're interested in pure-HTTP Django deployment, I encourage
you to check out Stephane and Aspen. Screencast, downloads, doc:
http://code.google.com/p/aspen-commons/wiki/Stephane
Hey Chad,
I've only read the introduction, but it loo
I have the same problem. I'm trying to figure how It does this way.
Please if you solved already, tell me how.
Thanks
Picio
2007/1/16, Jyrki Pulliainen <[EMAIL PROTECTED]>:
Hi there,
I've customized a voting application interface to show voting results
on a custom view in admin.
However, the
def my_view(request):
f = MyForm({'foo': request.POST['foo'], 'bar': request.user.username})
The form library itself knows nothing about request objects.
But my Field doesnt know about its' form so how does this help my
Field.clean(self, value) validator?
Joakim
--~--~-
On 1/17/07, serbaut <[EMAIL PROTECTED]> wrote:
> def my_view(request):
> f = MyForm({'foo': request.POST['foo'], 'bar': request.user.username})
>
> The form library itself knows nothing about request objects.
But my Field doesnt know about its' form so how does this help my
Field.cl
Respect! Dont have time to wait though... :D
Can you please consider passing the cleaned value to the
(undocumented?) clean_%s method in Form.full_clean()?
-value = getattr(self, 'clean_%s' % name)()
+value = getattr(self, 'clean_%s' % name)(value)
Joaki
serbaut wrote:
Respect! Dont have time to wait though... :D
Can you please consider passing the cleaned value to the
(undocumented?) clean_%s method in Form.full_clean()?
-value = getattr(self, 'clean_%s' % name)()
+value = getattr(self, 'clean_%s' % nam
Adrian Holovaty wrote:
Note that this behavior is up for discussion if many people find it
inconvenient. My initial thought is that it's a bit unbalanced to
allow for the definition of extra fields in a subclass but not
allowing the *removal* of fields in the same way.
Building forms is is mor
Thank you both. Django rocks by the way!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send
I'm not sure if this will solve your problem, but here's what I did to
customize an admin "portal" for satchmo.
In my urls.py file
http://satchmo.python-hosting.com/file/trunk/satchmo/urls.py
I redirected /admin to my custom view.
http://satchmo.python-hosting.com/file/trunk/satchmo/shop/views/
Hi Rob,
Try something like this (untested):
{% regroup news_list by year as grouped %}
{% for group in grouped %}
{{ group.grouper }}
{% for item in group.list|dictsort:"year" %}
{{
item.date_posted|date:"F
Y" }}
Hey,
Applying that patch does seem to have helped on the first server;
it's a probabilistic problem, but at least we haven't seen it since
trying this.
The first server was running Debian Etch; the second was running
Gentoo. Both were using Django as installed from their lo
On 1/17/07 11:16 AM, Adrian Holovaty wrote:
> Yes, Redhat ES was our platform of choice when we were developing
> Django at World Online. We used it with Apache/mod_python. I'm not
> sure whether they're still using ES for everything, but it certainly
> works well with Django, if that's what you'r
On 1/17/07, Adam Seering <[EMAIL PROTECTED]> wrote:
> Out of curiosity, is there a
> way to determine the version of Django that a package uses, if it
> doesn't contain .svn files?
django.VERSION gives a rough idea, though it's not updated between
"official" releases.
If you don't have django.VER
Adrian,
> I've only read the introduction, but it looks promising.
Thanks for taking a look. :)
> However, it's super inelegant to require a Django project to be
> called "stephane" in order to use it with Stephane. Surely you
> could remove that requirement somehow?
Yeah, that's a bit go
Howdy folks --
I'm about to roll out an upgrade to our Trac installation on
code.djangoproject.com. We're adding a few features to make our internal
management of ticket workflow better (some of you many have the thread about
this on django-developers over the past week or so).
There might b
This is embarrassing, but I've really hosed it and need to get it fixed
ASAP. So I'm calling on you all. Please don't make too much fun of me.
I was creating a new app (songs) and put this in my model:
class GpUser(models.Model):
artist = models.ForeignKey(GpUser)
song_file = mode
On Jan 17, 2007, at 12:19 PM, Jacob Kaplan-Moss wrote:
>
> I'm really excited about these changes; I think they'll really help
> us be more
> efficient.
Whoo, hooo! And with the upgrade, you fixed the Safari bug in the
ticket search results page, no more crashing when mousing over the
tit
On 1/17/07 5:08 PM, Don Arbow wrote:
> Whoo, hooo! And with the upgrade, you fixed the Safari bug in the
> ticket search results page, no more crashing when mousing over the
> titles
Well, the Trac folks did, at least :)
Jacob
--~--~-~--~~~---~--~~
You re
On Jan 17, 5:03 am, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
> Ah... You mean "all tags that have relation to any blog". This is it:
>
> Tag.objects.filter(blog__id__isnull=False)
Perfect! Yeah, "all tags that have relation to any blog" -- that's what
I was trying to say!
Worked like a char
On 1/17/07, Chad Whitacre <[EMAIL PROTECTED]> wrote:
> Yeah, that's a bit goofy, isn't it? I did that because it was the
...
> You'll see the 'stephane' requirement at that first link, and how
> trivial it is to change.
>
How about "changeme.settings" ;-)
--~--~-~--~~~--
Adrian,
>> However, it's super inelegant to require a Django project to be
>> called "stephane" in order to use it with Stephane. Surely you
>> could remove that requirement somehow?
> Do you have a suggestion for how to keep Stephane a black box, or do you
> think this explanation is enough?
www.OutpatientSurgicare.com/video/
Outpatient Doctors Surgery Center is committed to offering the
healthcare the community needs. We offer patients a meaningful
alternative to traditional surgery. This state-of-the-art outpatient
surgery center, located in the heart of Orange County, at 10900 War
Jeremy,
> How about "changeme.settings" ;-)
Good idea. :)
Latest version uses the following __/etc/aspen.conf file:
[django]
settings_module = changeme.settings
So that will be the default config if DJANGO_SETTINGS_MODULE
isn't set. Since you probably need to maintain an aspen.conf fi
There is no key "year" so I didn't think that would work. I'll give it
a try tomorrow just to be sure, though.
Thanks,
Rob
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this grou
What's up with Django signals? They seem to be an undocumented
feature, though one I think is handy.
$ grep -i signals django/docs/* returns nothing.
Googling for "signals site:djangobook.com" comes up empty.
I did find a reference in the wiki...
http://code.djangoproject.com/wiki/Signals
Plu
On 1/17/07 6:47 PM, Rob Hudson wrote:
> And this one is especially nice...
> http://www.mercurytide.com/knowledge/white-papers/django-signals
Right now this is about the best source of documentation there is,
unfortunately.
> Why isn't it documented?
Because nobody's documented it :) One of
Ah, ok.
In [1]: from django import VERSION
In [2]: VERSION
Out[2]: (0, 95, None)
Out of curiosity, is there a log somewhere of major security holes
that are fixed since a release? And, how does one get security
patches into the releases used in major distro's?; who dropped the
ball on t
On 1/17/07, Adam Seering <[EMAIL PROTECTED]> wrote:
Out of curiosity, is there a log somewhere of major security holes
that are fixed since a release? And, how does one get security
patches into the releases used in major distro's?; who dropped the
ball on this one?
Per the docs on security i
Please?
--~--~-~--~~~---~--~~
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 m
On 1/17/07, Rob Hudson <[EMAIL PROTECTED]> wrote:
I did find a reference in the wiki...
http://code.djangoproject.com/wiki/Signals
That was my rough attempt at documentation; I really need to go back
and clean that up to see if I can't get it into some sort of shape
which would suit the "offic
Cool. I was mainly concerned that it might not be officially
documented for a reason. 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-user
thank you for posting your notes. i have a lil different situation but
your notes seem clear and promising...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email
I made some minor changes and it worked. I didn't realize you can do
this with dates and regroup...
{% regroup nlist by date_posted|date:"Y" as grouped %}
{% for group in grouped %}
{{ group.grouper }}
{% for item in group.list %}
{{ item.date_posted|date:"F Y"
}}
{% endfor %}
{% endfor %}
You have several options:
Easiest way: Rename the second model (not the one that extends User).
I'm not sure if you can syncdb but you can copy the SQL manually
(table/indexes, permissions & content type entries). I don't think you
should delete the gpusers table but you might need to remove some
natebeaty wrote:
Tag.objects.filter(blog__id__isnull=False)
Perfect! Yeah, "all tags that have relation to any blog" -- that's what
I was trying to say!
Actually I've forgot 'distinct' yet again:
Tag.objects.filter(blog__id__isnull=False).distinct()
...or there would be dupes in
When I try to add a FloatField to list_display in the admin, I get the
following error:
Request Method: GET
Request URL:http://www.ebbflowarts.com/admin/store/item/
Exception Type: TypeError
Exception Value:float argument required
Exception Location:
/home/eb
81 matches
Mail list logo