se let me know.
>
> Thanks,
> ds99
>
> >
>
Yes, you can use those models with django, you'll need to create Model
classes for them though,
http://docs.djangoproject.com/en/dev/ref/django-admin/#inspectdb can assist
with this task. No one model can't be used to re
On Mon, May 25, 2009 at 8:25 PM, Sam Kuper wrote:
> 2009/5/26 Alex Gaynor
>
>> On Mon, May 25, 2009 at 7:51 PM, Sam Kuper
>> wrote:
>>
>>> Suppose you were re-writing Facebook in Django.
>>>
>>> Would you handle the complex profile and privacy
k to documentation where relevant.
>
> Many thanks!
>
> Sam
>
> >
>
B). The admin is designed really for use with fully trusted administrators
only, the extra hooks that have been placed in for more find grained control
notwithstanding.
Alex
--
"I disapprove of what you say
27;s called) conditionally on settings.DEBUG,
that way you only have the test in one place.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
--~--~-~--~~---
hat's not very plugable when for
example using the django-tagging app.
Any suggestions?
Alex
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send e
Hi, Kevin.
You can try to set FORCE_SCRIPT_NAME = '/directory' [1] settings
variable. Or setup your web server to provide valid SCRIPT_NAME
environment variable.
[1]: http://docs.djangoproject.com/en/dev/ref/settings/#force-script-name
---
Alex Koshelev
On Mon, May 25, 2009 a
PGP SIGNATURE-
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEAREDAAYFAkoa1u0ACgkQIgvIgzMMSnW/lwCgnONhjZKtCSJ/MCDQobf6+KUX
> ankAn13F2RaQbWEvgaY1mGLk3LP/8r7A
> =JXgV
> -END PGP SIGNATURE-
>
>
Django does not currently support model-validation, there is a google summer
of
ult.
get() is for when you want one, and exactly one, resulting object.
If you ever want to see what SQL is being excecuted by a queryset you can
either do qs.query.as_sql() which returns the SQL string and the params, or
you can excecute the query and then do:
from django.db import conn
On Mon, May 25, 2009 at 8:19 AM, Bobby Roberts wrote:
>
> > If you take a look at Q objects they allow you to do just that:
> http://docs.djangoproject.com/en/dev/topics/db/queries/#complex-looku...
> >
> > Alex
>
> Hi Alex... that might take some reading up on and
you take a look at Q objects they allow you to do just that:
http://docs.djangoproject.com/en/dev/topics/db/queries/#complex-lookups-with-q-objects
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good i
1. How would I obfuscate the HTML as much as possible (remove all line
> breaks, etc.)
> 2. How would I best add the layer which does this obfuscation
> >
>
The best way to do the obfuscation would be with middleware, as for how to
obfuscate, I don't know.
Alex
--
"I dis
On Sun, May 24, 2009 at 3:53 PM, jago wrote:
>
> Hi,
>
> can I tell Django 0.96 to automatically process all outbound links and
> add: rel="nofollow" ?
>
> Thanks,
> jago
> >
>
You could write a middleware that does this, but there's nothing in Dj
ving to fetch a list of categories at all of my
> views. I'm simply populating the list of categories by ajax. This
> seems a bit, clunky to do. Is there a better way to do it?
> >
> Take a look at template context processors, on inclusion tags.
Alex
--
"I disapprove of w
need an internet connection *once* to install
them, that's all. Regardless this is not the place to discuss the
installation of other packages.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is t
c_set.all():
> File "/home/nagyv/virtualenv/django-1.0.2/lib/python2.5/site-
> packages/Django-1.0.2_final-py2.5.egg/django/db/models/fields/
> related.py", line 235, in __get__
>raise self.field.rel.to.DoesNotExist
> DoesNotExist
>
> thanks,
> Viktor
> >
e that you'll probably need
to manually specify some paths during the patch process as the patch is a
git format diff.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cice
; problem?
>
> Thanks.
> >
>
Django trunk (or 1.0.X branch) has no known issues with Python 2.6, I
personally use that for development.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
&
On Sat, May 23, 2009 at 11:58 AM, Carlos A. Carnero Delgado <
carloscarn...@gmail.com> wrote:
>
> Hi,
>
> On Sat, May 23, 2009 at 12:54 PM, Alex Gaynor
> wrote:
> > There was a bug like this seen when aggregates were first added that no
> one
> > was eve
> >>> media_file = MediaFile.objects.annotate(hits=Sum('hits__hits'))[0]
> >>> media_file.title
> u'This is a media file'
> >>> media_file.added_on
> u'2009-05-23 12:06:14.484000'
> >>> media_file.hits
> 11
&g
ng on
> > your needs, you can enforce it a number of ways: simple documentation of
> > the superclass, putting in a stub of NotImplemented, etc.
> >
>
> I believe in duck typing (documentation of the superclass) rather than
> explicitly forcing something.
>
> I'm just
primary keys are currently not supported, see ticket 373:
http://code.djangoproject.com/ticket/373
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
--~--~-~--~--
On Fri, May 22, 2009 at 8:21 PM, Patrick wrote:
>
> Do I also need to use select_related() anywhere?
>
> On May 22, 5:57 pm, Alex Gaynor wrote:
> > On Fri, May 22, 2009 at 7:41 PM, George Song wrote:
> >
> > > On 5/22/2009 5:31 PM, Patrick wrote:
> > >
ht be able to use Django's
> serialization somehow.
>
> But some more specifics on your data format will allow us to help you more.
>
> --
> George
>
> >
>
If it's an actual db dumb (aka SQL) you can just give it strait to the db.
Otherwise you'll probably n
ManyField(Album)
> >
> > def __unicode__(self):
> > return self.title
>
> Probably a compound query:
>
> 1. All albums for a given artist
> 2. All songs where albums in #1
>
> --
> George
>
> >
>
Song.objects.filter(albums__artists=)
ble.
b) I suggest you search for past discussions on this:
http://groups.google.com/group/django-users/browse_thread/thread/681b37385cc8e687/1ada5b35ba4eb361?lnk=gst&q=downloadable+documentation#1ada5b35ba4eb361
c) Declaring Spinx unpythonic and evil is patently ignorant, I suggest you
do any am
in without
> > altering the table (syncdb doesn't alter existing tables, database
> > migrations are not part of its job description).
> >
>
You can either use an application like django-evolution or south to migrate
your tables, you can issues the ALTER TABLE SQL you
TURE-
>
>
http://jacobian.org/writing/what-is-django-contrib/ here is a description
of what one of the core developers see as the role of django contrib. It
should be noted that 2 of the core devs said at euro django con that that
they prefer the core of django to remain slim.
Alex
--
2009/5/20 Oleg Oltar
> Is there any doc I can read about it?
>
> On Wed, May 20, 2009 at 9:50 PM, Alex Gaynor wrote:
>
>>
>>
>> 2009/5/20 Oleg Oltar
>>
>>> Ok, I got it now
>>> What about the inheritance? Question 2?
>
> Is there any elegant solution, which would allow to break, just when
> it's needed?
>
> 2009/5/20 Alex Gaynor :
> >
> >
> > 2009/5/20 Filip Gruszczyński
> >>
> >> > Take a look at this:
> >> > http://code.djangoproject.com/ticket/6735#co
On Wed, May 20, 2009 at 2:05 PM, Bobby Roberts wrote:
>
>
> > Your class should inherit from "forms.ModelChoiceField", not just
> > ModelChocieField.
> >
> > Alex
>
>
> Ok i'm getting somewhere! Thanks for your patience. I'm still
>
2009/5/20 Oleg Oltar
> Ok, I got it now
> What about the inheritance? Question 2?
>
> On Wed, May 20, 2009 at 9:30 PM, Alex Gaynor wrote:
>
>>
>>
>> 2009/5/20 Oleg Oltar
>>
>> Hi!
>>> I have a model with a Sections and Categories
s a note, you're going to want to have the
> > MyModelChoiceField class before your form (in the file), otherwise the
> Field
> > won't be defined when you go to use it.
> >
> > Alex
>
>
>
> Alex -
>
> I really appreciate your help. I mad
ategories), how to handle it in separate (extended
> templates)? E.g. do I have to query categories in each my view and pass it
> as value to all templates I use?
>
>
> Thanks in advance
> Oleg
>
>
> >
>
{% for section in category_object.section_set.all %}
{% endfo
On Wed, May 20, 2009 at 12:32 PM, Bobby Roberts wrote:
>
> > You aren't actually using that Field though, you need to use it in place
> of
> > ModelChoiceField where you want that behavior.
> >
> > Alex
>
>
> here's what i'
ttext_lazy, since strings for fields are defined at the
module level and are therefore evaluated when the class is compiled.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Ci
attributes work is that if something is a class attribute,
but you assign to it on an instance the instance gets it's own version of
this attribute which "shadows" the classes one. So if Django does something
like: status = response.status_code it will just see the objects version,
n
> Your alternatives are cool, but I would like to get a solution as
> general as (in practical sense) possible.
>
> --
> Filip Gruszczyński
>
> >
>
Take a look at this:
http://code.djangoproject.com/ticket/6735#comment:37snippet which
ac
On Wed, May 20, 2009 at 10:34 AM, ccsakuweb wrote:
>
> Sorry, I forgot to tell it, I use the 1.0.2 version
>
> On 19 mayo, 23:41, Alex Gaynor wrote:
> > On Tue, May 19, 2009 at 2:53 PM, ccsakuweb wrote:
> >
> > > I have a form from a model. I add 3 new inputs
On Wed, May 20, 2009 at 10:38 AM, Bobby Roberts wrote:
>
> > Take a look at label_from_instance:
> http://docs.djangoproject.com/en/dev/ref/forms/fields/#modelchoicefield
> >
> > Alex
> >
>
> yeah I'm lookin at that but it makes no sense to me.
&g
yset:
>if :
> self.message_user(request, "OK message")
>else:
>< here I want to access cl.formset.errors to display
> my error messages >
>
>
> Thank you
>
> On 20 mayo, 16:29, Alex Gaynor wrote:
> > O
ed_data['page_category_id']
>return data
>
>def clean_template_id(self):
> data=self.cleaned_data['template_id']
>return data
>
> >
>
Take a look at label_from_instance:
http://docs.dj
On Wed, May 20, 2009 at 9:31 AM, Skylar Saveland
wrote:
>
> Is this something having to do with pools?
> >
>
Django doesn't pool connections, so unless the original poster is using an
external pool, no.
Alex
--
"I disapprove of what you say, but I will defend to the d
en't figured out how to do it
> yet
>
> Has anybody found a workaround for this?
>
> Thank you
> >
>
Django doesn't use the user.message_set for displaying those errors. It
just uses this:
http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/templates/ad
; http://www.screeley.com/entries/2009/apr/01/class-based-views-and-reusable-apps/
>
> It's a useful technique, I think.
> >
>
One thing to keep in mind is that the object is shared across all requests
in that process, so you can't actually store state on your object.
Alex
-
msets are a subclass of formsets.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
--~--~-~--~~~---~--~~
You received this message becau
a 404 page from middleware?
>
> Thanks!
> >
>
No, this is a known bug in Django: http://code.djangoproject.com/ticket/6094
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"T
nputs too? Or the solution is
> only to create a form without inheritance from a model?
>
> I hope you understand me. Sorry because my simple english.
>
> >
>
What version of Django are you running? Ordering fields is only supported
in the latest development version.
Alex
--
t; first in case I am missing something.
> >
> > I can't recreate this with either the alpha or current trunk level (don't
> > have beta set up to test easily at the moment). I tried both the 1.0
> style
> > of urlpattern
uot;
> name="wimpybutton288" align="middle" allowScriptAccess="sameDomain"
> type="application/x-shockwave-flash" pluginspage="http://
> www.macromedia.com/go/getflashplayer" />
>
>
> >
>
The browser probably isn't
on the admin page, but when I log out it is logging out
> > > with two admin/admin and I get an error page not found. I cannot
> > > figure out why this is happening?
> > > Thx
> >
> >
> >
>
Yep, the patch on there should *just work* after you apply
On Tue, May 12, 2009 at 1:02 PM, Alex Gaynor wrote:
> The reason the model isn't saved at thie point is because Django stores the
> path to the file in the DB. This means it has to know the path to the file
> in order to save it. However, you want it to save it in order to c
On Mon, May 18, 2009 at 2:13 AM, Russell Keith-Magee
wrote:
> When you have a symmetrical m2m relation to self, Django needs to
> store 2 rows in the m2m table to fully represent the relation - that
> is, when you store a 'friendship' between Alice and Bob, Django stores
> the relationship (alic
r admin and 1.1 (including
> admin.site.urls). Which are you using? Perhaps more details on the
> specifics of your admin configuration would shed some light.
>
> Karen
>
> >
>
There was a bug similar to this when using raw_id from the change_list view
with list_editable, howev
n form... is it possible?
>
> Thanks!
>
> __
> Diogo Baeder
> http://www.diogobaeder.com.br
>
> >
>
Take a look at inlines in the admin:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#inlinemodeladmin-objects
Alex
--
"I disapprove of
latest patch
should be ready for a committer to commit the patch, and it needs no more
work. In practice the patch may or may not actually need work, but that's
the purpose of the flag.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Vo
On Mon, May 18, 2009 at 2:04 PM, Guri wrote:
>
> Hi,
> Is there are way to use Dojo widgets inside Django forms.py?
>
> Any package, pointers or procedure will help.
>
> Thanks In Advance
> ~Guri
> >
>
http://code.google.com/p/dojango/ aims to do just
Site:http://apsl.net
> >
>
Getting an instance of a FileName and accessing .title on it will give you a
file like object you can work with normally and extract whatever information
you want from it. I'm not 100% sure I understand your question.
Alex
--
"I disapprove of wha
models.Model):
>manufacturer = models.ForeignKey(Manufacturer)
>
> >
>
The generally reccomended way to use it is to always import the module,
except in the case where a circular reference would prevent you from doing
so.
Alex
--
"I disapprove of what you say, but I will
just uses the default ordering of the key you
provide, if you want some other ordering the best way to do it would
probably be to write a custom template tag/filter.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people
er() method to
get that since it's not a part of the forms library. The best you could do
is to pass it the widget constructor, which will be ok because of how we use
the widgets in the admin, which will require a little bit of
re-architecting.
Alex
--
"I disapprove of what you say, b
/topics/db/models/#proxy-models if
you're on the latest development version. Otherwise I'd just add a method
to your model to print the user formatted as you'd like.
Alex
--
"I disapprove of what you say, but I will defend to the death your r
On Sun, May 17, 2009 at 12:38 PM, ringemup wrote:
>
>
> Aha. I'm on 1.0. Can I still use custom validation on the ModelForm
> if I use the ModelAdmin to exclude the fields?
>
> Thank you!
>
>
> On May 17, 1:36 pm, Alex Gaynor wrote:
> > On Sun, May
lude = ('blog', 'slug')
>
> class EntryAdmin(admin.ModelAdmin):
>form = EntryForm
>
> admin.register(Entry, EntryAdmin)
> >
>
What version of Django are you using? Django only respects the exclude and
field options from the form in the latest developmen
ge | dom |
> +-+-+
> | 18 | 1 |
> | 19 | 1 |
> | 20 | 1 |
> | 18 | 1 |
> +-+-+
>
> Thanks for your time.
>
> Regards,
> Lokesh
>
>
> >
>
For the first one you want:
Model.objects.values_list('age', flat=True).distinct
On Sun, May 17, 2009 at 11:24 AM, Lokesh wrote:
>
> Hi Alex,
>
> Then I can go ahead with required=false attribute to avoid form
> validation and validation should be taken care by program.
> Correct me if I am wrong.
>
> Regards,
> Lokesh
>
> &g
choices and pass it to the
> > form etc. Can someone out there lend me a hand? I'd like the options
> > on the form to be checkboxes.
> >
>
If you're using choices you really should use a ChoiceField as it will
validate that the selections is one of the desired choice
t;
> >
> >
> >
>
> Thanks. :)
>
> Alan
> >
>
Specifically tuple's are immutable arrays.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."
On Sat, May 16, 2009 at 11:14 PM, mickey wrote:
>
> Ok this doesn't sound too intuitive. If anyone else have a better
> solution please do post.
>
> Thanks.
>
> On May 16, 8:01 pm, Alex Gaynor wrote:
> > On Sat, May 16, 2009 at 9:57 PM, mickey wrote:
> >
&
name and put it into the context
dictionary.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
--~--~-~--~~~---~--~~
You received this me
_for_model(Entry),
> > > object_pk__in=Entry.objects.filter(category="some category")).
> >
>
Err yeah, the syntax I used will only work in 1.1, and might not even work
then depending no how your DB handles int/string types (in PgSQL it won't
work if your object has
e' values in the django
> template?
>
> Many thanks in advance.
>
> Jon
>
> >
>
You can do:
{% for server, data in status_table.iteritems %}
{{ server }}: {{ data.0 }}, {{ data.1 }}
{% endfor %}
Which prints as:
somehost: yes, 2
remotehost: yes, 1
localhost:
by storing a primary key and a content type, and those
aren't really relational database concepts, however you can do something
like this:
Comment.objects.filter(content_type=ContentType.objects.get_for_model(Entry),
object_pk__in=Entry.objects.filter(category="some category")).
Alex
terForm' object has no attribute 'email'
>
> Exception Location: /home/projects/tst/authprof/views.py in
> regattempt, line 47
>
> line 47 is the p = tuser(so-on and so-forth
>
> If anyone can explain
req = self.cleaned_data['storage_required']
>obj_id = ?
>
> btw I am using gae but this shouldn't affect this I think.
>
> Thanks guys
>
> Simon
> >
>
self.instance will be the current object, and therefore
self.instances.pkwill be that object
ontext unless you
specifically pass it in.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
--~--~-~--~~~---~--~~
You received this mess
as using others methods returns a
QuerySet. A single object is just that, one object, whereas a QuerySet is a
group of objects, so you need to know which one you have to know how to work
with it.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it.&q
t; > > Is it possible to create a foreign key to a model referring to a
> non
> > > > > primary column from other model.
> >
> > > > > class details(models.Model):
> > > > > username =
> >
> > > > > ?? ->
foreign key to username
> column which is from auth_user table.
>
> Thanks in advance.
>
> Regards,
> Lokesh
>
> >
>
You can do this using the "to_field" option as documented here:
http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models
underlying Query
> to
> > allow support for additional conditions on a join clause).
>
> Alex, thanks for your comment.
> However, this code works for me with Django 1.1 beta1 (rev10793).
> I understand that one should not rely on undocumented behaviour, but
> does this case
Thanks for reply, Jim.
Hmm, just saved full page to disk. Almost the same time... now i think
it's just cost of transferring of big select box. I'll make it a bit
smaller.
Gzip will help me I think)
Thanks again.
On May 16, 4:44 pm, Jim wrote:
> > I have made a small form, only 10 fields. But
Hi,
I have a model which looks like:
class Person(models.Model):
friends = models.ManyToManyField("self", through="Friendship")
class Friendship(models.Model):
person_a = models.ForeignKey(Person)
person_b = models.ForeignKey(Person, related_name="_unused_")
Now, as mentioned in:
htt
Hello all!
First of all sorry for my bad english:)
I have made a small form, only 10 fields. But now I see that page
loads more than two times slower!
I found problem in this field:
age = forms.ChoiceField(required=True, choices=AGE_CHOICES,
initial='18')
without this field page loads much fast
))
> >
> > AttributeError: 'NoneType' object has no attribute 'cursor'
> >
> > running syncdb works fine and updates my database.
> >
>
I don't believe you are correctly running r10790, as that code no longer
exists in it, this was a bug fixe
="object_pk")
>
> However, denormalization would still be better in most cases.
> >
>
Any aggregation over generic relations is currently unsupported, it was
hoped this would make it into 1.1, but unfortunately some of the way SQL
works prevented this (since it requires us t
Hello all! First of all sorry for my english.
I have made a small form, just 10 fields. now I see that page loads
much slower then without this form...
I found problem in this part of form:
age = forms.ChoiceField(required=True, choices=AGE_CHOICES,
initial='18')
without this field page loads
On Fri, May 15, 2009 at 1:38 PM, Rusty Greer wrote:
>
>
> On Fri, May 15, 2009 at 10:10 AM, Alex Gaynor wrote:
>
>>
>>
>> On Fri, May 15, 2009 at 12:08 PM, Rusty Greer wrote:
>>
>>>
>>>
>>> On Fri, May 15, 2009 at 9:57 AM, Geor
gt; How do I order a query by comments connected to a model?
>
> -Martin
> >
>
If you are using the latest development version you can do this using
aggregates:
http://docs.djangoproject.com/en/dev/topics/db/aggregation/#order-by
Alex
--
"I disapprove of what you say, but I will defe
On Fri, May 15, 2009 at 12:11 PM, aa56280 wrote:
>
> So to be clear then, yes, I want to delete the object from the
> database entirely. How to go about doing that using location_set?
>
> On May 15, 12:07 pm, Alex Gaynor wrote:
> > On Fri, May 15, 2009 at 12:04 PM, aa56280
y what is expected
>
> from python code, class1.abstractthing_set.all gives me an AttributeError
>
> 'class1' object has no attribute 'abstractthing_set'
>
>
> class1.thingtype1_set.all returns exactly what is expected
>
> i was hoping that the abstr
eign key isn't
nullable the only option is to actually delete the object, which isn't
exactly the same as what you specifified (since its destructive).
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's
the currently logged in user there,
you'll need to pass it in from the view.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
--~--~-~--~~~
gt;
> Using 1.0. Has this been fixed?
> >
>
This was fixed in the 1.1 development branch and the 1.0.X devel branch.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law.
t; and I'm getting what I expect. But I just hit a roadblock with the
> size, since it is an attribute of file_system_object.
>
> Can I aggregate over a field property?
>
> Best regards,
> Carlos.
>
> >
>
No, since the size isn't stored in the database you n
On Wed, May 13, 2009 at 2:56 PM, Alex Rades wrote:
>
> Hi,
> in one of my templates I'd like to show the last images taken from
> a queryset. So the equivalent of:
>
> images.all()[:5]
>
> in a template.
> Is there a simple way to do this? Do i need a templa
Hi,
in one of my templates I'd like to show the last images taken from
a queryset. So the equivalent of:
images.all()[:5]
in a template.
Is there a simple way to do this? Do i need a templatetag?
--~--~-~--~~~---~--~~
You received this message because you are su
/django-trunk/django/db/models/fields/files.py",
> line
> 239, in save
> self._dimensions_cache = get_image_dimensions(content)
>
> File "/home/mybandsite/django-trunk/django/core/files/images.py", line 39,
> in
> get_image_dimensions
>data = file.re
is to have a seperate slug field, Django's
SlugField for models serves to fill this exact purpose, it can only be used
in conjuction with the prepopulated_fields ModelAdmin option.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --V
ModelAdmin form factory pattern is a pretty good one to follow.
>
> --
> George
>
> >
>
You can control the order of fields on a modelform by settings the ordering
in the fields option in the inner Meta class. That is if you set fields =
['b', 'a', 'c
ct=type)
>
> If my table has 1000s of pets, isn't the above a bit slow when
> compared to the retrieving a pet by id? How is this kind of situation
> handle in some of the Django web application out there?
>
> On May 11, 11:00 pm, Mike Ramirez wrote:
> > On M
ll do it in a few minutes if no
one still has), but AFAICT the issue is here:
http://code.djangoproject.com/browser/django/trunk/django/db/models/sql/query.py#L1622
with the if not value triggering the issue. It's probably solvable by
changing that to if (not hasattr(value, 'as_sql') and n
701 - 800 of 1906 matches
Mail list logo