On May 13, 9:19 pm, robotmurder wrote:
> Usually when I do this for an upload, etc... it means that a user just
> did something that resulted in an row being created in the db. I
> usually keep a boolean field in the table for processing. Then when I
> load the next page I can just query that valu
heya,
I have a Django app that keeps track of newspapers articles, and the
companies mentioned in them (this is slightly simplified, but it'
Each article has a m2m relationship with firm. Originally, this was
just a direct m2m, however, I found I needed to add a "rating" to each
firm that's menti
Hi Shawn,
Thank you very much for replying.
I got it. --executed.
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-us...@googlegroups.com.
To unsubscribe from this group, send email to
djang
thank a lot everyoneit was really helpful...:)
On Thu, May 13, 2010 at 7:33 PM, Karen Tracey wrote:
> On Thu, May 13, 2010 at 2:53 AM, ravi krishna wrote:
>
>> Hi,,This is my url.py file, when i run this it shows indendation error at
>> line 25. But i dont see an indendation error. Can some
the template dir must be of this form
TEMPLATE_DIRS = (
'/dir/to/templates'
)
note that, there is no '/' in the ends.
roy
On May 13, 6:11 am, Michele Iannotta wrote:
> Hello, I need help..a putting "on-line" a django application. I have
> problem setting the "TEMPLATE_DIRS" in setting.py. So
Exactly as you had described ... I wanted to upload images to paths
with the model instance's id in it. Seemed easier for a human to
relate to that way (in case of maintenance outside of django).
However, the uuid approach or similar may be the way forward.
On May 13, 10:58 pm, zinckiwi wrote:
So, I apologize for another topic focused on Django project and app
structure, but every resource I've found is either outdated or
incomplete.
What I am trying to accomplish is the creation & incorporation of
pluggable django applications that are NOT dependent in ANY way on the
project that uses
Your project looks pretty kick-ass. Thanks for pointing me out to
that. I may just seek out this code while working on my site.
On May 13, 3:28 pm, Michael Elsdörfer wrote:
> I'm working on a Universal Feed Parser-based library to create
> aggregators. The idea is that the process of parsing a fe
Or you could be right. I'm still not clear on the OP's intent.
On Thu, May 13, 2010 at 4:21 PM, zinckiwi wrote:
> Quite right, I was confusing it with QuerySet's update(), as
> demonstrated in the docs:
>
> # Update all the headlines with pub_date in 2007.
> Entry.objects.filter(pub_date__year=2
I'm working on a Universal Feed Parser-based library to create
aggregators. The idea is that the process of parsing a feed and syncing
it's items with a database can be customized by various addins:
http://github.com/miracle2k/feedplatform
It mostly works already, though it lacks the polishing
Hello,
Some background first. I am working with a legacy database that is not
only legacy, it is legacy Microsoft access so there is some hacking
going on. I am accessing a MySQL backend and my models are set up to
use the existing tables/field names. When I use regular old ORM
queries, Everything
I am trying to use the ORM to build the following query:
"""SELECT * FROM category AS node, category AS parent WHERE node.lft BETWEEN
parent.lft AND parent.rgt"""
I am attempting to create the table aliases using .extra() but I'm having a
bit of difficulty. I have left out the where statements in
Quite right, I was confusing it with QuerySet's update(), as
demonstrated in the docs:
# Update all the headlines with pub_date in 2007.
Entry.objects.filter(pub_date__year=2007).update(headline='Everything
is the same')
Regards
Scott
On May 13, 3:14 pm, Bill Freeman wrote:
> Update still take
I tried searching for: "copy site-packages directory server" but
didn't find what I was looking for.
My question is simply:
Running dev server on an XP Windows machine.
My live server is a Webfaction account.
I just did an update to 1.1 on my Dev Server by untarring the tar
and running py
Thanks for this insight. I was using OneToOneField in the same way as
ForeignKey.
| class Person( Model ):
| pass
|
| class Pet( Model ):
| owner = ForeignKey( Person )
|
| # Assuming "joe" exists as a Person
| >>> kitty = joe.pet_set.get_or_create()
Yes, in that situation "joe.pet_set" i
Usually when I do this for an upload, etc... it means that a user just
did something that resulted in an row being created in the db. I
usually keep a boolean field in the table for processing. Then when I
load the next page I can just query that value right before I choose
the template to see if i
Update still takes exactly one argument: self.
I'm still not completely clear on what the OP is trying to do so I'll
guess that for a given User object (id == 11) you want to adjust
a set of attributes not known apriori, but available as key - value
pairs from an itterator I'll call 'd.items()':
I am using the latest Django 1.2 release. Can someone please confirm
if the ModelAdmin's list_filter supports these capabilities:
1) Multi-Value-Select: How to allow multiple values to be selected for
the SAME filter field - i.e. I want to display all records with a
"status" field of : "Active"
That's what I also figured.
I began trying to pass content_type and object_id as hidden fields to
the view. This didn't work (see code below), so I'm going to try to
use the content_type as a part of the url. But perhaps you can explain
why I can't use it in the form object?
views.vote:
def vote2(
On May 13, 5:35 pm, Peter Herndon wrote:
> On May 13, 2010, at 10:29 AM, TallFurryMan wrote:
>
> > Hello Django users,
>
> > Is there a particular reason why using a related OneToOneField raises
> > DoesNotExist instead of returning None?
>
> Any query you make that is supposed to return one or
On May 13, 6:11 pm, marty3d wrote:
> Thanks, that's a shame...
> So I'm now trying to do the request.POST stuff in a view instead.
> Since the idea is to have the voting app as decoupled as possible, is
> there a slick way to pass, perhaps the whole object in this case, but
> at least the name of
> What if field_name and value coming from loop?
> I have around 50 field and values in loop.
> Can I do this? I know this is silly way to do but please guide how can
> I do this?
>
> for key, value in users:
> user."%s" = "%s" % (key, value)
>
> user.save()
Ah, I see. In that case you will wan
Scott,
Thank you very much for your reply and giving me very nice and simpler
idea but I have one question:
What if field_name and value coming from loop?
I have around 50 field and values in loop.
Can I do this? I know this is silly way to do but please guide how can
I do this?
for key, value in
Scott, Ofri, thanks.
I realized early this morning, I will need to just use the Universal
Parser un-adorned, because of the customized ways I have to do
things.
On May 13, 8:57 am, Scot Hacker wrote:
> On May 12, 11:06 am, beetlecube wrote:
>
> > Hello,
> > Just wondering if there are alternat
> I am little confused about it. I am not sure django allow this or not.
> Please correct me.
>
> string = last_name = 'Riaz edit', first_name = 'Asim edit',
> nationality = 'se'
> User.objects.filter(id=11).update(string)
>
> I am using this and its giving me this error:
>
> update() takes exact
Thanks, that's a shame...
So I'm now trying to do the request.POST stuff in a view instead.
Since the idea is to have the voting app as decoupled as possible, is
there a slick way to pass, perhaps the whole object in this case, but
at least the name of the model or similar together with the post?
Hello All,
I am little confused about it. I am not sure django allow this or not.
Please correct me.
string = last_name = 'Riaz edit', first_name = 'Asim edit',
nationality = 'se'
User.objects.filter(id=11).update(string)
I am using this and its giving me this error:
update() takes exactly 1
On May 13, 2010, at 10:29 AM, TallFurryMan wrote:
> Hello Django users,
>
> Is there a particular reason why using a related OneToOneField raises
> DoesNotExist instead of returning None?
Any query you make that is supposed to return one or more instances, that
instead cannot find any results,
I found the solution to my own problem. When the page was reloading,
I am guessing that the actual entity had not been deleted yet, and the
method __unicode__(self) was being called, requesting access of
self.image (which did not exist, because that HAD been deleted).
A simple modification to the
On May 13, 5:17 pm, zweb wrote:
> I am doing this
>
> form = ContactForm(request.POST) # A form bound to the POST data
> if form.is_valid(): # All validation rules pass
>
> As clean is called by is_valid() and at this point form in bound to
> POST data, I cannot use self.instance unless I do thi
I have a model Foo. If I've got a model instance foo, and I know that
foo.value may be changed after I got it.
How can I reload foo.value? For example, this way works:
foo = Foo.objects.get(foo.id)
Is this the only solution? In case that I'm in a member method of Foo.
It would looks like this
I'm having a silly issue with the admin interface and an ImageField in
one of my models. A simple model I have contains an ImageField, and
many objects of this model are related to some other model (Project,
not shown). I can add/view images just fine, but when I try to delete
an image, I get a v
Hello Django users,
Is there a particular reason why using a related OneToOneField raises
DoesNotExist instead of returning None?
| class Person( Model ):
|pass
|
| class Pet( Model ):
|owner = OneToOneField( Person )
|
| # Assuming "joe" exists as a Person
| >>> kitty = joe.pet
| DoesNot
I am doing this
form = ContactForm(request.POST) # A form bound to the POST data
if form.is_valid(): # All validation rules pass
As clean is called by is_valid() and at this point form in bound to
POST data, I cannot use self.instance unless I do this
form = ContactForm(request.POST,
On May 12, 11:06 am, beetlecube wrote:
> Hello,
> Just wondering if there are alternatives to the feedjack RSS
> aggregator that anyone has used. It doesn't have to be "Django-ized"
> like feedjack is.
>
> Just any Python library that you've had good luck with, parsing a lot
> of different RSS fe
Russ Magee,
Thanks for the quick response, your message explained what I was not
understanding and I was able to get my code working.
:)
Gregory Roby
On May 13, 10:44 am, Russell Keith-Magee
wrote:
> On Thu, May 13, 2010 at 10:27 PM, GRoby wrote:
> > Hello,
>
> > I am using Django 1.2 RC 1
I've found that a particularly nasty place for this to happen is on the
deployment server, when, as is common, it is a *nix where the convenient
editor to use over ssh is vim (or vi). The typical installation is
either unaware
of python at all as a file type, or handles it poorly. Things will be
I have used sessions to store the initial db record so that when I go into
my form I retrieve the value
such as
stationrec = request.session['stationrec']
On Thu, May 13, 2010 at 9:36 AM, zweb wrote:
> I am using a model form to edit (change) an exisiting row in db.
>
> in clean_xxx() method I
"Also, a model form instance bound to a model object will contain a
self.instance attribute that gives model form methods access to that specific
model instance."
From:
http://docs.djangoproject.com/en/1.1/topics/forms/modelforms/
So you can refer to self.instance in your validation code, assu
On May 13, 2010, at 4:43 AM, francisgan9 wrote:
> Hi,
> I need help how to get pass the installation of the database part. -
> tutorial 1
> trying to use sqlite
>
>self.connection = Database.connect(**kwargs)
> pysqlite2.dbapi2.OperationalError: unable to open database file
Evidently it
On Thu, May 13, 2010 at 10:27 PM, GRoby wrote:
> Hello,
>
> I am using Django 1.2 RC 1 and have setup multiple databases. I have
> everything working if I manually specify .using, for example:
>
> SomeObjects = ModelInDefaultDatabase.objects.all() #This Works
>
> SomeObjects = ModelInDatabase2Na
I am using a model form to edit (change) an exisiting row in db.
in clean_xxx() method I want to compare the old (existing) value
versus new value.
I can get new value from cleaned_data.
How do I get the old (existing) value?
If I do a db query to get the existing row from DB how do I get the
Hello,
I am using Django 1.2 RC 1 and have setup multiple databases. I have
everything working if I manually specify .using, for example:
SomeObjects = ModelInDefaultDatabase.objects.all() #This Works
SomeObjects = ModelInDatabase2Name.objects.using('Database2').all()
#This also Works
How ca
Ravi,
the "default" lines where you just uncommented existing lines (like
the "include admin") start with spaces, the lines you've created start
with Tab characters. Mixing tabs and spaces is not a good practice
(generally, it's recommended to use spaces only).
If you swich your editor to "di
On Thu, May 13, 2010 at 2:53 AM, ravi krishna wrote:
> Hi,,This is my url.py file, when i run this it shows indendation error at
> line 25. But i dont see an indendation error. Can somebody help me. I am
> just a beginner with Django.
>
>
It would help people help you if you were specific about
I add the following line 'django.contrib.admin', in INSTALLED_APPS
and the following line in urls.py
..
from django.contrib import admin
admin.autodiscover()
(r'^admin/', include(admin.site.urls)),
but i give an error to access to admin page.
Why?
--
You received this message bec
Hello, I need help..a putting "on-line" a django application. I have
problem setting the "TEMPLATE_DIRS" in setting.py. Someone can help 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-us...@google
Hi,
I need help how to get pass the installation of the database part. -
tutorial 1
trying to use sqlite
Ubuntu-Linux-desktop latest version
install the latest version for Django
The error at the terminal
*
fran...@ubuntu
Try Django-planet: http://github.com/matagus/django-planet
On May 12, 9:06 pm, beetlecube wrote:
> Hello,
> Just wondering if there are alternatives to the feedjack RSS
> aggregator that anyone has used. It doesn't have to be "Django-ized"
> like feedjack is.
>
> Just any Python library that you
> I have overriden the save method on my model, and want to use the id
> field (default autoincrementing pk) to set one of the other fields.
>
> Is this ok:
>
> class MyModel(models.Model):
> ...
> def save(self, *args, **kwargs):
> super(MyModel, self).save(*args, **kwargs)
>
On May 13, 1:21 pm, marty3d wrote:
> Hi!
>
> I'm making this small generic voting application and have stumbled
> across a strange issue.
> My idea is that the user comes to a page, like /news/slug where I'm
> having an inclusion tag showing up/down voting controls. Select your
> choice in the vot
Hi!
I'm making this small generic voting application and have stumbled
across a strange issue.
My idea is that the user comes to a page, like /news/slug where I'm
having an inclusion tag showing up/down voting controls. Select your
choice in the vote form and submit. The inclusion tag then takes t
Hello,
I have the following code in a ModelForm to ensure that the date the user
inputs does not exceed 99 years, the strange behavior is that this validation
works unless I spam the input button on my form webpage.
def clean(self):
cleaned_data = self.cleaned_data
On May 1, 4:39 pm, Javier Guerra Giraldez wrote:
> On Sat, May 1, 2010 at 7:22 AM, Joshua Russo wrote:
> > This is mainly just curiosity at the moment. How do you create a
> > "processing" intermediate page, like you see on travel sites when they are
> > looking for the rates? I would always avoi
I have overriden the save method on my model, and want to use the id
field (default autoincrementing pk) to set one of the other fields.
Is this ok:
class MyModel(models.Model):
...
def save(self, *args, **kwargs):
super(MyModel, self).save(*args, **kwargs)
self.some_string_
On Thursday 13 May 2010 12:31:53 ravi krishna wrote:
> > (r'^admin/',include('admin.site.urls')),
>
this line is wrongly indented (that is line 25)
--
Regards
Kenneth Gonsalves
Senior Associate
NRC-FOSS at AU-KBC
--
You received this message because you are subscribed to the Google Groups
"Dj
On Thu, May 13, 2010 at 12:23 PM, ravi krishna wrote:
> Hi,,This is my url.py file, when i run this it shows indendation error at
> line 25. But i dont see an indendation error. Can somebody help me. I am
> just a beginner with Django.
>
>
> from django.conf.urls.defaults import *
> from django.
57 matches
Mail list logo