I thought I would ask the question here first before going to devs
with it. Is it possible to update a model without updating that models
parent table?
A very small example:
class Aye(model):
a = field
class Bee(Aye):
b = field
o = Bee.objects.get(k)
o.b = 3
o.save()
In my code this will
;t exactly equivalent
to inheritance, and correct me if I am wrong, you can't ask
select_related to go backwards in a relationship. This is critical for
my application.
On Feb 15, 7:52 pm, Malcolm Tredinnick
wrote:
> On Sun, 2009-02-15 at 16:39 -0800, Trey wrote:
> > I thought I wou
I'm not sure if other people have stumbled onto this but I am having a
LOT of trouble getting the admin to use select related.
I have FK's that are nullable, this I know doesn't by default work
with select_related. But I've overridden the manager to select the
related fields I need (which I prett
).select_related
('context__data_type', 'location')
I think this approach is a little unintuitive and will start a convo
on the dev list.
On Feb 20, 12:15 pm, Karen Tracey wrote:
> On Thu, Feb 19, 2009 at 7:10 PM, Trey wrote:
>
> > I'm not sure if other people have
er general
comment?
Thanks, Trey
--~--~-~--~~~---~--~~
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 em
Based on the documentation here:
http://docs.djangoproject.com/en/dev/topics/db/managers/#controlling-automatic-manager-types
Default or Pristine managers are created for the access of related
fields on a model. It seems however that in my current version of
django (SVN-10415) that this behavior
I have a simple problem that I am not quite sure why it won't work.
Take this dict.
{1: 10, 2: 10, 19: 0, 29: 0, 30: 10}
w is simply a list of numbers
{% for d in w %}
{{dict.1}}
{{dict.d}}
{% endfor %}
The first line, dict.1 works fine. But when I try to use the d
variable for the dict in
That wasn't exactly the example as it was written. Let me try to
clarify.
w is simply a list of numbers.
w = [1,2,3,4,5,6,7,]
Take this dict.
dict = {1: 10, 2: 10, 19: 0, 29: 0, 30: 10}
{% for x in w %}
{{dict.1}}
{{dict.x}}
{% endfor %}
--~--~-~--~~~---~--
.append(' ')
output.append('')
output.append('')
output.append('')
output = ''.join(output)
Somehow I doubt this should really be in the view either. Maybe it's
just one of those out liers that doesn't have
Thanks Russ, I think my answer for today is three dimensional lists...
Hooray for complex datastructures :)
Tim, that's a very cool idea. I will research this some and see if I
can abstract the calendar control.
On Jun 7, 11:02 am, Tim Chase <[EMAIL PROTECTED]> wrote:
> > Somehow I doubt this sh
o help fix it?
Trey
--~--~-~--~~~---~--~~
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 [
Are one to one fields going to allow reverse select_related style
caching? I thought that Queryset Refactor might have included this but
no such luck.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gro
lean_data.get('newpassword') and
self.clean_data.get('passconfirm') and self.clean_data['newpassword'] !
= self.clean_data['passconfirm']:
raise ValidationError(u'Your passwords must match')
My question is: How can I get the use
Hey, now that is slick.
Thanks for the tip, and this site is certainly going on my bookmarks
list.
On Apr 5, 4:29 pm, Georgi Stanojevski <[EMAIL PROTECTED]> wrote:
> Trey напиша:
>
> > I am trying to create a change password form, the unique thing about a
> > change p
This is probably more of a Python question than a Django question but
I am having a little trouble referencing sibling packages.
My structure is like so:
projectpath/
- app1/
views.py
forms.py
class Form1
- app2/
views.py
forms.py
Alright, I would like
I have an interesting case that I would like to get some input on,
perhaps I am just thinking about it incorrectly.
It seems useful to have a conditional statement which will check to
see if a child template has populated a block.
{% block header %}Page Heading{% endblock %}
If the bl
27;s the case, but wouldn't you be able to do this:
>
> {% if header %}
>
>{% block header %}Page Heading{% endblock %}
>
> {% endif %}
>
> Dave
>
> Trey wrote:
> > I have an interesting case that I would like to get some input on,
> > perhap
lease excuse me
> > if that's the case, but wouldn't you be able to do this:
>
> > {% if header %}
> >
> >{% block header %}Page Heading{% endblock %}
> >
> > {% endif %}
>
> > Dave
>
> > Trey wrote:
> > > I have an int
There are other people that have brought this up a little bit some
time ago. I run a small to medium sized web application that takes
profile pictures. By far my largest customer service issue is people
not being able to upload their photos.
For the most part I have played it down as their connec
on or does it just relate to the development server (as that's
the only place I've seen it mentioned)
trey
On Oct 6, 7:01 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> The way mod_python reads request content is a bit broken and can screw
> up in various ways, albeit
't added yet. I
would just like to know if mod_python is the official choice over
mod_wsgi for a reason.
Graham, if you know of any comparisons feature or performance wise let
me know. I am still searching around but I can see your an advocate so
you may know already.
Trey
PS: I was confused, I
that, then some way I can get the same
information. If someone could illuminate the standard way of doing this
I would be very grateful.
Thank you, Trey
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
ld(maxlength=50)
permissions = models.ManyToManyField('Permission')
user = User.objects.select_related().all()
Thanks, Trey
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post
Awesome, thanks for the help. I think a piece of my problem was being
new to Python as well but now I am on the right tracks. Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Boy, I sure wish I could buy the book already!
- --Trey
Russell Keith-Magee wrote:
> On 2/21/07, Jaroslaw Zabiello <[EMAIL PROTECTED]> wrote:
>> I have just found "Pro Django: Web Development Done Right" book in
>
t URL:http://localhost:8000/feeds/feed_name/
Exception Type: DoesNotExist
Exception Value:Site matching query does not exist.
Exception Location: /Users/trey/Sites/django/django_src/django/db/
models/query.py in get, line 263
Python Executable: /Library/Frameworks/Python.fram
I figured out what was going wrong. I had the Sites Framework
enabled, but I wasn't using it. Apparently, having anything but
example.com in that database table was was what was screwing it up.
Once I put example.com back in there, it started working. Removing
the framework from the INSTALLED_A
Hey spanky,
I'm not sure if I'm misunderstanding you but it sounds like you are trying
to 'import python'.
What you want to do is run python from your command line:
$ python
which then brings you to the interpreter which looks something like
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
28 matches
Mail list logo