Here is a simplified version of what I am trying to do:
App X:
class A:
shortname = meta.CharField(maxlength=6)
App Y:
class B:
the_A = meta.ForeignKey(A)
Y.views:
blist = bs.get_list(order_by=['as.shortname'])
But Django is telling me that there is no table named 'as'.
Everything
On 3/12/06, Glenn Tenney <[EMAIL PROTECTED]> wrote:
> Although the docs say that _pre_save "is called just before an object
> is saved to the database", that's not quite correct. _pre_save is
> called long before the db is committed, and BEFORE the AutoField "id"
> is set meaning that when
On 3/12/06, Brendon Kelly <[EMAIL PROTECTED]> wrote:
> > I guess there maybe a same named file calendar.py or calendar package
> > in your directory, which is duplicated with python calendar.py module
> > file.
>
> Ahh... that would be the app I created in my project called calendar :) You
> can
On 3/8/06, Andu <[EMAIL PROTECTED]> wrote:
> One of the problems I faced when using Django's admin was the filter
> part overlapped the table with data, when I showed lots of fields in
> the admin listing.
>
> I did a quick hack today and made it toggable. If you want to aply a
> filter, show it.
hum to reformulate simpler,
how can i tell in url.py to use generic.simple, and a extra_context
which will replace
context_instance=DjangoContext(request) i was using in my view method.
def faq(request):
return render_to_response('faq', {'section':'faq'},
On 3/13/06, Brendon Kelly <[EMAIL PROTECTED]> wrote:
>
> >
> > I guess there maybe a same named file calendar.py or calendar package
> > in your directory, which is duplicated with python calendar.py module
> > file.
> >
> >
>
> Ahh... that would be the app I created in my project called calendar
I guess there maybe a same named file calendar.py or calendar packagein your directory, which is duplicated with python
calendar.py modulefile.Ahh... that would be the app I created in my project called calendar :) You can tell I'm new to Python (and Django)Thanks for the quick reply.
I'm having trouble using the python calendar module in Django. If I
type:
>>> import calendar
>>> print calendar.monthcalendar(2006, 3)
at the python shell (not the shell in Django) it works as advertised,
but if I type the same code through python manage.py shell, I get:
Traceback (most
Ahhh...
Should have said I was using magic-removal, and that this is within the
admin interface.
The reason for the uuid filename is because I'm thinking of having a
lot of files uploaded and I could end up with dozens of files called
'TEST.DOC' and this is one way of guaranteeing that the
I had wanted to make up a unique field combining some other field and,
ideally, an autoincrementing number unique to this class... I'd love
to make this the primarykey, but I can't make up a SlugField as the
primary key and another field to be the autoincrementing number
because AutoField is
On Sun, 2006-03-12 at 14:46 -0800, Glenn Tenney wrote:
> I found that a subclass' _pre_save method superceeds it's parent's
> and I have a situation where I need it to do something in addition
> to what it's parent does.
>
> e.g.
>
> class One(model):
> def _pre_save: ...something...
I found that a subclass' _pre_save method superceeds it's parent's
and I have a situation where I need it to do something in addition
to what it's parent does.
e.g.
class One(model):
def _pre_save: ...something...
class Two(One):
def _pre_save:
?
Based on Python
On 3/12/06, MarC <[EMAIL PROTECTED]> wrote:
> Is "svn co http://code.djangoproject.com/svn/django/trunk/; close enough to
> the final 1.0 version
> and safe/stable enough?
It's safe enough for use, but the next version, 0.92, is going to make
a huge number of backwards-incompatible changes. My
MarC wrote:
>hi,
>this is a general question,
>I'm planning to use django for a personal-maybe_someday_big database based
>project. I saw that
>version 1.0 has not been released yet, but sbdy warned me that many things are
>changing.
>This plus the "Note that, until 1.0, there is no guarantee
I have just started in with Django development and the warnings about
the upcoming 1.0 release (and 0.92, for that matter) don't scare me
at all. The current code works well and you may not ever have to
upgrade if you don't feel the need to. A lot of the coming changes
are for cleaning up
I see that this is related to using Django with FastCGI and MySQL.
Is there anything that is pertinient to using Django and MySQL with
mod_python?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
hi,
this is a general question,
I'm planning to use django for a personal-maybe_someday_big database based
project. I saw that
version 1.0 has not been released yet, but sbdy warned me that many things are
changing.
This plus the "Note that, until 1.0, there is no guarantee of
Hi all,
After tearing my hair out with an "OperationalError: Unable to close
due to unfinalised statements" exception this afternoon under SQLite, I
switched over to Postgres. This threw more helpful exceptions, and led
me to discover that when calling save() on an AddManipulator instance,
any
I want to create a form for entering data and all of its related data,
on one form. Here's a simplified model to illustrate:
class Author(meta.Model):
name = meta.CharField(maxlength=40)
class Book(meta.Model):
title = meta.CharField(maxlength=40)
authors =
I found this discussion concerning HTML Tidy and ASP.NET tags:
http://blogs.borland.com/stevet/archive/2004/10/11/1568.aspx
Another idea: Write a wrapper for HTML Tidy to convert Django tags/vars
to HTML comments and back. It would be a serious hack, but could work:
{% tagname parameters %} =>
Hi Malcolm,
{{forloop.counter|add:offset}} works fine.
Thanks,
Rob
--~--~-~--~~~---~--~~
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
For Emacs users: Emacs' nxml-mode seems to work rather well with Django
templates. It underlines tags and variable references with a red line,
but otherwise it's nice to work with.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
from django.models.auth import User
--~--~-~--~~~---~--~~
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
e.g.
from django.models import auth
owner = meta.ForeignKey(auth.User)
... that works for me.
>
> from django.core import meta
> from django.models.auth import users ???
>
> class Recette(meta.Model):
> slug = meta.SlugField("Slug", prepopulate_from=('nom',) ,unique=True,
> blank=True)
> nom
from django.core import meta
from django.models.auth import users ???
class Recette(meta.Model):
slug = meta.SlugField("Slug", prepopulate_from=('nom',) ,unique=True,
blank=True)
nom = meta.CharField(maxlength=80,help_text=_('Nom de la recette'),
unique=True)
[]
Hi all,
I have this model
class Photo(models.Model):
name = models.CharField(maxlength=20)
image = models.ImageField(upload_to="cetl/")
def save(self):
import commands
self.image = 'cetl/%s' % commands.getoutput("uuidgen")
super(Photo, self).save()
def
Hello,
I am defining a Product class that gets inherited by various products,
so I am defining in it all the base attributes that exist on all child
products.
I want to know if its possible to forbid changing the actual "products"
table unless you add one of the actual child products.
Also,
Hi.
Can anybody recommend a good tool (or PyDev/Eclipse plugin) for
formatting template files?
HTMLTidy with its default settings just doesn't cut it -- it insists on
inserting HTML and body tags around the template and screwing up the
template statements.
Or maybe someone has a good working
28 matches
Mail list logo