> custom tag is a function - cant you just assing its return in view
> into variable and send this variable to template?
The usual way to go about this would be to modify your tag to take an
optional "as var_name". When the tag has the optional portion, you
would update the value into the varia
On Jul 2, 10:25 am, The Danny Bos wrote:
> DR.
> Bingo!!
>
> Thanks man,
> And thanks for the tip on "_set" being for ForeignKeys.
>
> d
>
> On Jul 3, 12:23 am, Daniel Roseman wrote:
>
> > On Jul 2, 3:20 pm, The Danny Bos wrote:> Daniel,
>
> > > {% for author in review.item.author_set.all %}
>
> I have the same problem in Komodo Edit - although I the whole filename
> does show up in the window title I never think to look there. Anyway,
> I partially solved it by adding a comment at the top of the file for
> what app the file is for, so I'll see what I'm working on right there
> in the e
On Jun 3, 4:16 am, vishy wrote:
> Hi,
>
> I am developing an application on windows. I decided to upload it on
> webfaction n see how deployment goes. The issues I faced was with
> paths given -
> for templates - I had given absolute path of directory on windows,
> for database(using sqlite) -
On Mar 4, 8:57 pm, Malcolm Tredinnick
wrote:
> On Wed, 2009-03-04 at 10:43 -0800, arbi wrote:
> > Hello,
> > I am new to Django and programming...
> > I have a model similar to this one :
>
> > class myModel :
> > attribute 1 = models.ForeignKey(myModel2, primary_key = True)
> > attribute 2 =
On Mar 3, 10:50 am, Jon Reck wrote:
> I'm a novice Python and Django programmer so please don't assume a lot of
> knowledge here.
> I'm trying to place a link on an admin change form to a label printing
> function. I'd like to pass the id of the current record to the function. If
> I hardwire it
On Feb 26, 11:20 am, tyler kunter wrote:
> thanks eric...I was able to fgure that out after a lil frustration thank you
> for your response.
>
> On Thu, Feb 26, 2009 at 1:32 AM, Eric Abrahamsen wrote:
>
> > On Feb 26, 2009, at 4:30 PM, tykun...@gmail.com wrote:
>
> > > Hi I am trying to pass a
I started with mysql and moved to postgres. My main reasons:
1) If you ever need to dumpdata/loaddata, you may find that postgres
(correctly) defers checking of fk constraints until after the a
transaction is complete. MySQL checks the constraints as each record
is added, even inside of a trans
use javascript to clear the history
On Nov 12, 1:05 pm, jai_python <[EMAIL PROTECTED]> wrote:
> hi.. i tried with logout_then_login method. But i am still facing that
> back button after logout issue.. any other suggestion?
--~--~-~--~~~---~--~~
You received this m
> Wouldn't it make more sense to limit them in the admin or the forms
> instead of limiting them right in the models? The act of selecting an
> activity topic in a form is form specific, the models don't (and
> probably don't need to) have any knowledge of that.
I'm not sure what you're driving
I need to limit choices dynamically by an object, not a class:
class CertType(models.Model):
name = models.CharField(max_length=128)
class ActivityTopic(models.Model):
cert_types = models.ManyToMany(CertType)
class Participation(models.Model):
activity_topic = models.ForeignKey(acti
> Summary : You could simply copy the file base_site.html from admin
> templates to a directory called "admin" in your own template directory
> and add a link to your own pages in {% block branding %} so you would
> have access to the link on every admin page.
Actually, there is an empty block de
Clarification:
> Now just go to town accessing it just like a field when you need it.
That is , you can now use it just like a field in templates and the
admin. It would be a method call in python code, including your
view. You could of course define it as a property to make it 'fieldy'
there as
Monkey patching attributes to the instances would not be the correct
django idiom for adding a calculated field. There is a simple and
straight forward django idiom for expressing calculated fields in the
model.
In your car model, create a method named 'comment' returning the
required informatio
I don't want to collapse the individual items, but the whole stack or
table. Anyone know how to go about this?
Thanks
Wayne
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
Is there anyway to collapse an inline edited model in the newforms-
admin?
--~--~-~--~~~---~--~~
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 un
u, Jun 19, 2008 at 12:01 PM, AmanKow <[EMAIL PROTECTED]> wrote:
>
> > On Jun 18, 8:48 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
> > wrote:
>
> > If I came off sounding accusatory, please forgive me,
> > it was not my intent.
>
> No pro
Hi, Russell!
On Jun 18, 8:48 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> Lets be clear here - the problem you are describing is fundamentally
> MySQL's problem, not Django's. MySQL doesn't interpret the standard
> right, and doesn't provide for an easy workaround. There isn't much
> Dj
I have to disagree that Django supports these backends equally well.
I've just been bitten badly by the 'dumpdata ' 'loaddata '
problems with MySQL and innodb. I originally decided to go with MySQL
(familiarity, for the most part). Using MyIsam tables is not an
option for me, I need the transact
I've been trying to keep away from the idea of using MTI (multitable
inheritance) for my Person->Student|Faculty|Manager needs, but damn!
The sugar is just too sweet!
I understand the objection to wanting the inheritance to look as much
like python as possible, but I'm not sure it applies here.
I did the following, it works fine:
from django.db import models
class Place(models.Model):
name = models.CharField(max_length=50)
address = models.CharField(max_length=80)
def __unicode__(self):
return self.name
# you can call this on any model object
def object_as_dict(mo
Whoops... get should be filter
existing_ct_as_dict=ContentType.objects.filter(pk=ct_pk).values()[0]
On Apr 30, 9:04 am, AmanKow <[EMAIL PROTECTED]> wrote:
> Assuming ACT is your class name:
>
> ct = #... get the content type instance to extend here, or obtain the
>
Hmmm... this seems to be a common issue... extending already existing
records
Would be nice if there were a way to create the child, specify the pk
and do a "save child only"
On Apr 30, 9:04 am, AmanKow <[EMAIL PROTECTED]> wrote:
> Assuming ACT is your class name:
>
>
Assuming ACT is your class name:
ct = #... get the content type instance to extend here, or obtain the
pk in whatever way
ct_pk= ct.pk
existing_ct_as_dict=ContentType.objects.get(pk=ct_pk).values()[0]
act = ACT(**existing_ct_as_dict #, your extended keyword vars)
act.save()
You must fetch and s
lications needs.
Ah, the intricacies of ORM. It makes my head hurt!
Thanks again,
Wayne
On Apr 28, 1:15 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2008-04-27 at 21:43 -0700, AmanKow wrote:
> > Thanks for the reply, Malcolm.
>
> > Between what you wrote
Thanks for the reply, Malcolm.
Between what you wrote above and just creating the models and looking
at the tables and indexes generated clarified the whole thing for
me...
My purposes are similar to what I was attempting with the above
example, with people instead of places (they can be any or
Thanks so much for qsrf, my excitement is off the charts!
I have a question about whether I am going about the following the
right way. I would like to have a model that is subclassed several
time, where it is possible for a child to point at the same parent as
another child in another subclass.
My $0.02:
jquery is the way to go. The interface is very simple and clean, it
is very simple to extend, the ui is limited but getting better and
there are a lot of third party plugins for it from a very active and
helpful community.
A real bonus is the dom manipulation. Sooner or later we all
On Jan 16, 3:41 am, stryderjzw <[EMAIL PROTECTED]> wrote:
> Thanks, everyone.
>
> I like this idea. That really helped. I hope this gets considered.
>
> Cheers,
> Justin
Ok, as soon as I get a chance, I'll get some docs and tests done and
post a ticket with a patch. That should greatly improve
I posted a diff on dpaste: http://dpaste.com/hold/29777/
This is for a change to django/template/loader_tags.py
This change would add an explicit reuse_block tag.
{% block menu %} ... {% endblock %}
...
{% reuse_block menu %}
This change will actually reuse the parsed block. It does not cr
Thanks for the response, Malcolm!
On Dec 1, 3:54 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sat, 2007-12-01 at 12:25 -0800, AmanKow wrote:
> > I am curious as to whether the django community cannot comfortably do
> > away with support for python 2.3 in the effo
I am curious as to whether the django community cannot comfortably do
away with support for python 2.3 in the effort towards django 1.0.
There were significant changes made between python 2.3 and 2.4, and
continuing support of 2.3 in the django code base is a significant
restriction. As django 1.
32 matches
Mail list logo