hello,
I am trying to migrate my function based views to class based ones. I
have a search page with a form (which is represented by MySearchForm
class). The form's action URL is set to the current page (). When the form is submitted the search
results are shown in the page below the form. in othe
hello,
can anyone recommend a library or an application for video streaming
that can be used in a commercial site that requires good performance
and scalability? we expect the site to receive a lot of traffic. and
the main functionality is video on demand.
thank you
--
You received this message
hello,
by default an admin url for a model looks like this:
http:///admin///...
is there a way to change it? for different models i need to have
different url structure. say, i want to replace "/admin/" with something else.
ModelAdmin.get_urls()? the documentation is not very helpful for me. i
hello, i myself cannot parse this. what is the question?
On Apr 30, 10:16 pm, kandee wrote:
> I just got this new phone, and was trying to download some sound
> affects, from a download Page, but an error page came on and said that
> I needed to go on my django setting file and change it to false
hello,
i would like to replace my models.py with a package that has a
hierarchical directory structure. in __init__.py i want to define my
base models, and the other files would contain models that inherit the
base models.
in particular i am trying to define proxy models for my models and put
the
hello, may be this will be useful:
http://code.djangoproject.com/wiki/DynamicModels
On Apr 22, 5:53 am, Massimiliano della Rovere
wrote:
> An external process creates tables whose names follow the pattern
> "collector_XYZ"; all the tables will have the very same structure.
>
> For each table I n
hello,
my model is flexible enough to represent different and unrelated
entities in the database. for example it can represent an
advertisement or a blog entry.
i would like to provide separate admin interfaces for creation of
different entities (adverts, blog entries, etc) each of which is
repre
hello,
it would be easier to help if you provided your modes. are you missing
this:
http://docs.djangoproject.com/en/dev/ref/models/relations/#ref-models-relations
for example:
>>> b = Blog.objects.get(id=1)
>>> e = b.entry_set.create(
... headline='Hello',
... body_text='Hi',
... p
hello,
in my custom admin class that inherits ModelAdmin i need to set
ModelAdmin.exclude, ModelAdmin.list_display, etc based on whether the
logged in user is a superuser or not.
is this possible?
thanks
konstantin
--
You received this message because you are subscribed to the Google Groups
"
hello,
if you set the admin email address and the necessary email parameters
in your config file then django will send an email with all the
details to the admin when an exception is thrown. would this be
sufficient?
konstantin
On Nov 26, 11:15 am, Gabriel Rossetti
wrote:
> Hello everyone,
>
>
hello,
anything is possible. you just need to decide how you are going to
store your changes before the model gets "really" saved so that the
preview functionality works. where would preview get the values from?
i propose a "published" boolean field in the model.
konstantin
On Oct 21, 3:41 pm,
hello,
i have a datetime field in my model. is there a way to order a query
set by this field truncated to the given precision?
even worse. i have another field in the model that specifies the
precision ('year', 'day', etc), i need to order the query set by the
datetime field truncated using the
hello,
there is a setting in settings.py that controls where django searches
for templates.
konstantin
On Oct 21, 2:50 pm, NoviceSortOf wrote:
> Although I have 500.html in my
> site-packages/django/contrib/admin/templates folder 500.html does not
> appear when it should, below see my errors (
hello,
is there anything in the web server logs?
konstantin
--~--~-~--~~~---~--~~
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 fro
hello,
django.db.backends.dummy is a good starting point. i have used it to
implement a workaround for a problem in the sqlite3 backend and yu can
find it here: http://code.konstantin.co.uk/mysite/sqlite3_fixed/
hope this helps
konstantin
On Oct 9, 6:29 pm, Daniel Rhoden wrote:
> Can you direc
hello,
i need a datetime field with an associated precision value. the
precision shows which parts of the datatime field are used. in other
words, my datatime field can contain just a year, or a year and a
month, etc. similar to postgres' DATE_TRUNC function. i know i can
just throw in two fields
did you try
company.logo = relative_path
?
On Oct 2, 4:45 pm, Nan wrote:
> OK, this seemed to work:
>
> def create_a_company(name, logo_path):
> company = Company()
> company.name = name
> relative_path = path_relative_to_media_root(logo_path)
> company.logo.name = relative_pat
hello,
try setting the logo.url property. i do it with FileFields all the
time and it works.
konstantin
On Oct 2, 4:12 pm, ringemup wrote:
> Say I have an image file on disk and a model that uses an ImageField.
> If I want to create a model instance with that image file in the image
> field wi
r",
"mymodel"."date")
) AS "year", COUNT("mymodel"."id") AS "total" FROM "mymodel" GROUP BY
django_d
ate_trunc("year", "mymodel"."date")'}]
in sqlite a string in double quotes i not
hello,
i have found an (undocumented?) way to get the db table name from a
model: Model._meta..db_table.
is there a way to get the name of the db column for a field?
thanks
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
hello,
this works with sqlite:
AppModel.objects.extra(select={'year':"django_date_trunc('year', \"date
\")"}).values('year').order_by().annotate(total = Count('id'))
i assume that for postgresql i would have to use date_trunc function.
is there a portable way to do this?
thanks
konstantin
--~
%}
{{ block.super }}
{% if my_list %}
<script src="{{media_url}}js/prototype.js" type="text/
javascript">
{% endif %}
{% endblock %}
On Nov 14, 11:57 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Fri, 2008-11-14 at 20:45 -0800, akonsu wrote:
> > hel
hello,
i noticed that if i put {%block%} tag inside {%if%} tag in my
template, the contents of the block gets rendered even when the {%if%}
test fails. is this a bug?
thanks
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
hello,
i do not see a way to do it without a custom tag. i myself do a
similar thing using my own tag.
konstantin
On Sep 24, 2:17 pm, David Koblas <[EMAIL PROTECTED]> wrote:
> I'm not sure if this is possible to do without writing a templatetag
> (ok, that's my theory).
>
> Basic idea is that I
would work, too. I was thinking more like if you got the
> ringo like this:
>
> ringo = Person.objects.select_related(depth=2).get(name='ringo')
>
> how could you get the data without having to make another DB call.
>
> Ideas?
>
> Thanks,
> Nate
>
>
hello,
how about
for m in Membership.objects.filter(person=ringo) : print m.date_joined
konstantin
On Sep 23, 4:58 pm, Nate Thelen <[EMAIL PROTECTED]> wrote:
> So if I have a Person object "ringo" and I want to get info about the
> Groups he is a member of, I would do this:
>
> for group in ri
hello,
you can override the model's save() method.
konstantin
On Sep 23, 3:05 pm, "Владимир Сидоренко" <[EMAIL PROTECTED]> wrote:
> hi
>
> i need to process a set of denormalized data in single model field.
> for example,
>
> class Place(Model):
> location = LocationField()
>
> it's rendere
hello,
i set up an SVN repository and checked out the files on to my dev
machine as well as in to the directory where the web server can find
them.
i do not have setting.py in my repository, and i have different
versions of settings.py on my dev machine and on the server. so al the
differences a
hello,
what problems are you having?
btw, did you try the webfaction forum?
konstantin
On Sep 20, 5:28 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote:
> hi.
>
> I'm setting up a small django project on webfaction and i'm havnig
> some issues getting my settings.py file correct in regards to media
hello,
syndication feeds have links for each item as well as for the feed.
right now i hard code urls and they are the same as the urls i have in
my urlpatterns. i want to follow django's DRY principle so i am
looking for a way to generate these urls in my feeds class in a way
similar to {% url %
hello,
i would start with tracing the request that is sent from your python
script and making sure it is similar to the one sent from the login
form by the browser.
konstantin
On Sep 18, 5:50 pm, Carol <[EMAIL PROTECTED]> wrote:
> HI,
>
> I'm writing a Django app that allows access to pages eit
wow, my thread has been hijacked :)
thanks to those who replied to my original question.
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-
hello, to my knowlege, you would need a custom tag or filter for that.
konstantin
On Sep 18, 1:06 pm, Xiong Chiamiov <[EMAIL PROTECTED]> wrote:
> Is it possible?
>
> If in the templates I call section.foo (with section being a
> dictionary), then it's the equivalent of section['foo']. Is there a
ok :) so then your solution would be to set up your own file storage
with location that you need.
konstantin
On Sep 17, 11:45 pm, Faheem Mitha <[EMAIL PROTECTED]> wrote:
> [This message has also been posted.]
>
> On Wed, 17 Sep 2008 20:14:54 -0700 (PDT), akonsu <[EMAIL PROTECT
hm, i never used a callable for uplod_to and what you are saying might
be true, but if it is, how this behaviour would interact with the
possibility to use file storage for uploaded files where MEDIA_ROOT
would make little sense?
konstantin
On Sep 17, 11:00 pm, Faheem Mitha <[EMAIL PROTECTED]> w
hello,
upload_to can take a callable, which can be used to change your files'
location.
konstantin
On Sep 17, 2:42 pm, Faheem Mitha <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I wrote some unit tests for file upload. since I didn't want the files in
> the unit tests to be uploaded to the "official lo
hello,
i am looking for an advice from people who know django internals well.
to simplify, i have a template that currently uses a custom tag. the
tag emits the needed markup. suppose the template includes several
instances of the tag to generate different pieces of the page.
so in other words
hello,
you could try named url patterns.
> I am also seeing strange things if I change the order of the URLs in
> my URL patterns list.
please define "strange things" :) in general, the order of urls
matters because django starts rverse lookup from the top of the list
and stops at the first mat
restarting apache after every
single change :)
konstantin
On Sep 16, 8:17 am, Cequiel <[EMAIL PROTECTED]> wrote:
> Hi akonsu.
>
> I wasn't sure about the django dev server. I thought that the django
> dev server was created only to follow the tutorials and for making
> you
hello, try to save your file in utf8 encoding and load data again. may
be it will help.
konstantin
On Sep 15, 10:57 pm, JoeJ <[EMAIL PROTECTED]> wrote:
> 1- Data loaded in DB
> from:http://leathergallery.com/module/data/sql/products/Products.sql--
> includes the phrase "Thinsulate®"
>
> 2- Djan
hello,
would django dev server be a useful alternative for you? it picks up
most changes without a restart.
konstantin
On Sep 15, 11:27 pm, Cequiel <[EMAIL PROTECTED]> wrote:
> Hi all.
>
> I installed Django with Apache in my Windows. It was a little
> complicated but finally it is working fine
hello,
one more reason to develop locally is because doing it on a remote
machine is very slow.
the way i do it, is i set up an svn repository on webfaction and
checked out files in to my django application subtree. i also check it
out to my dev machine, where i change files and when i am ready
hello,
on pgsql 'reset auth' fails with an error saying that it cannot drop
one of the tables (i do not remember which though) because other
objects depend on it. on sqlite it works fine. i did not try it on
mysql.
here is my apps:
INSTALLED_APPS = (
'django.contrib.admin',
'django.cont
hello,
is there a way to make my custom tags and filters available to a
template that i create from a string like this:
template = Template(string)
template.render(context)
i know that i can use the "load" tag in the template, but suppose that
the strings that i create templates from do not hav
hello,
i need to attach an existing file stored in the right location to a
FileField of my model. can this be done without copying the file?
thanks
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
hello,
consider the code below. it has two print statements at the end. their
output should be identical, but it is not. i think there is a bug.
thanks
konstantin
class X(models.Model) :
name = models.SlugField()
def __str__(self) : return self.name
class Y(models.Model) :
name = m
hello,
what is the difference between
MyModel.objects.filter(field=value) and
MyModel.objects.filter(field__exact=value) ?
i could not find an explanation in the docs.
thanks
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribed
hello,
currently the upload_to parameter of FileField can contain only
strftime formatting patterns. i am looking for a way to extend this
and let it contain, say, %s patterns that would be replaced by given
strings during object creation. has anyone done this?
thanks
konstantin
--~--~-~
On Sep 26, 2:38 pm, olivier <[EMAIL PROTECTED]> wrote:
>
> Sure, but you're losing newforms integration, generic views,
> admin, ...
> Not sure it's still django at the end of the day ;o)
>
> Olivier
i agree with you here. i did not know about the integration problems,
thanks.
what has been bo
On Sep 26, 2:17 pm, olivier <[EMAIL PROTECTED]> wrote:
> This doesn't seem to be a problem for most users, but if you have a
> complex data model, and need to do some complex joins, out-of-the-box
> django may not be the best tool for the job, and anything based on
> sqlAlchemy (pylons ? turboge
i woul say do it in php. the reason why they want php might be because
they want to be sure that the app is written in a language that can be
understood by more people than python.
konstantin
On Sep 26, 8:13 am, omat <[EMAIL PROTECTED]> wrote:
> A client requires a web application to be develope
hello,
an obvious one is to check whether the query uses standard syntax and
features. and if not, rewrite it so it does.
also, try to test it on different databases.
cheers
konstantin
On Sep 26, 10:29 am, Filipe Correia <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm using some custom sql which isn'
hello,
is there a way to make django.views.generic.list_detail.object_list
invoke django.template.loader.select_template when searching for
template?
i have a set of items with tags. i want to use object_list generic
view to show items with a specific tag, and i want to use different
templates f
rote:
> are you using django Generic Views or are you using the word to imply
> non-special views (i.e. you have a number of views just like this.)
> -richard
>
> On Sep 15, 6:38 pm, akonsu <[EMAIL PROTECTED]> wrote:
>
>
>
> > his is my understanding of the probl
his is my understanding of the problem:
there are two genric views: list view and detail view. the template
invoked from the former gets the queryset in the context, and the
template invoked from the latter gets the object in the context. note
that the latter does not get the queryset, just a sin
one by pk I would probably do:
> model.objects.filter(pk > current_model_instance_id).order_by(id)[:1]
> which should be the next object in the db, by id ascending
> for the previous one I would do the same just with the order_by(-id)
>
> Like I said, never done it but I'd giv
hello,
in my object_detail view i need to emit links to the previous and next
objects in the object list which invoked this detail view. has anyone
done this? any advice?
thanks
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribe
Alex, thanks for your help.
the code that worked is:
call_command('reset', 'myapp', interactive = False)
call_command('loaddata', FIXTURE_PATH, verbosity = 0)
cheers
konstantin
On Aug 30, 2:51 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
> try this:
>
> from django.core.management imp
hello,
my script creates a fixture file at FIXTURE_PATH, and then runs the
reset command on my application. the relevant code is listed below.
now that i synced to the latest trunk, this code no longer runs
because the management module has no procedure 'reset'.
what is the proper way to do what
hello,
i remember i got this error when i tried to save a file because my
database's auto field sequences were not set up correctly. i am using
postgresql and i use fixtures to populate the database. so there were
a bug in fixtures that did not set sequences in postgresql correctly
(i think it mi
hello,
this problem repro's even on an empty application freshly created
using manage.py. i do think that someone forgot to add a file to the
repository.
konstantin
On Jun 3, 9:32 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 6/4/07, akonsu &
hello,
i have just synched to the latest trunk and my application has stopped
working:
ViewDoesNotExist at /
Could not import mysite.ko.views. Error was: No module named managers
Request Method: GET
Request URL: http://localhost:8000/
Exception Type: ViewDoesNotExist
Exception Value: Could not i
yes, it is an innovative feature. i think it is difficult to implement
right. the general problem in my understanding is to be able to
generate a regex that accepts a (partial) input string. then, to
compare the generated regex with the list in the urls module. this
involves programming language t
hello,
i would say that yes it is a bug. i have seen many bugs in the reverse
resolver code. for example, it crashes (throws a python exception) if
a regex pattern contains question marks (optional elements) and i am
sure it has a lot more. my personal opinoin is that this code is
simply a hack.
, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 5/11/07, akonsu <[EMAIL PROTECTED]> wrote:
>
> > the tags_list field that you propose is an extra field that is stored
> > in the database. i want to avoid this because tags are stored in their
> > own table
thanks for your response.
the tags_list field that you propose is an extra field that is stored
in the database. i want to avoid this because tags are stored in their
own tables and this field is only used for conveniency. the contents
of this field is not needed at all and it goes out of sync wi
hello,
i have a question related to the http://code.google.com/p/django-tagging/
code and how to use it in the admin pages. hopefully someone can help
me.
the problem is that the module documentation sugests that i use a text
field in my model to implement tags:
class Link(models.Model):
hello,
{{block.super}} renders the block contents of the parent, but this
might not be enough for what you want.
konstantin
On Apr 4, 8:05 pm, "Roboto" <[EMAIL PROTECTED]> wrote:
> Hey guys, just a quick question here:
>
> I have a base template called base.html. Essentially all it holds are
>
hello,
{{item.image}} is correct.
konstantin
On Apr 4, 2:15 pm, "James Earl" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm pretty new to python and django. I have a list of items that I'm
> displaying, and each item can have zero, one or many images. I want
> to display the first image if one exis
hello,
i need a way to emit media url in a template. something similar to the
{% url %} tag but for media. curently django site itself is in
violation of the DRY principle:
http://code.djangoproject.com/browser/djangoproject.com/django_website/templates/base.html
(line 18 for example)
i guess i
hello,
you will have to write code for that. i think django does not have
this functionality.
konstantin
On Mar 31, 8:09 pm, "mediumgrade" <[EMAIL PROTECTED]> wrote:
> I have a model with charfield's with choices attached to them. In my
> templates, however, I would like to be able to display
hello,
I myself hink that your solution with foreign keys is good. the fact
that django requires raw sql to handle left joins is its limitation
but not that of your design.
another solution that comes to mind is to have a table of generic
"attributes" for each patron. this way you will have two
hello,
i am running development server from a windows command line and when i
navigate to localhost:8000 i get
Permission denied: /
i do not even know where to start debugging. "manage.py syncdb" works
fine, so it is not because of my setup or anything like that. i think.
thanks
konstantin
-
hello,
thanks for posting.
te way i do it is by creating a variable:
{% let email = company.contact.email %}
after that you can use email variable just like any other.
konstantin
class LetNode(Node) :
def __init__(self, var, expr) :
self.var, self.expr = var, expr
def render
hello,
unless i misunderstood the question, you need to maintain some state
across multiple requests. if so, this is what the database is for. :-)
make a model that has your "marked" flag.
konstantin
On Mar 21, 11:36 am, "MattW" <[EMAIL PROTECTED]> wrote:
> Dear All,
>
> More of a design questi
this helped. thanks. i was not importing the default handler.
konstantin
>
> Make sure the module referred to by ROOT_URLCONF has defined 'handler404'.
>
> This is typically provided via
> "
> from django.conf.urls.defaults import *
> " in the URLConf because urls.defaults.py includes this:
> ha
Scott,
thanks for your reply. the error that i am getting seems to indicate
that it is not 404.html that is the problem. it cannot find the
handler itself, not the template. and i do have this template, but it
does not help :-)
konstantin
On Mar 21, 6:46 am, "ScottB" <[EMAIL PROTECTED]> wrote:
hello,
i have no handler404 defined in my application, so when a 404 is
raised the server returns internal server error and an error message
saying 'module' object has no attribute 'handler404' is written in to
the log. how to make it use the default 404 view?
i am running the current version fr
hello,
urlpatterns = patterns(..., (r'^path/?$', 'path.to.view')...)
in template:
{% url path.to.view %}
rendered as
/path/?
note the trailing '?' which is a part of the regular expression.
konstantin
--~--~-~--~~~---~--~~
You received this message because
could you explain how to add it to an application exactly? the
explanations given with the snippet are not enough for me.
thanks
konstantin
On Mar 13, 8:25 pm, "Ross Poulton" <[EMAIL PROTECTED]> wrote:
> On Mar 14, 8:54 am, "Greg Donald" <[EMAIL PROTECTED]> wrote:
>
> > How can I see the sql Dja
f
course i can always check if my name is the empty string, but using
default values for parameters looks cleaner...
konstantin
On Mar 13, 11:19 am, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
> akonsu wrote:
> > i think the reason is two entries in the urlpatterns with the sam
hello,
in urls.py:
urlpatterns = patterns('', (r'^/?$', 'path.to.myview'), (r'^(\w+)/?$',
'path.to.myview'))
in views.py:
def myview(request, name = 'index') : ...
in template:
{% url path.to.myview var %}
the url tag in the template is rendered as "//?"
if i comment out the first item in
/usr/local/lib/python2.4/site-packages/django/core/servers/
basehttp.py", line 383, in write
assert type(data) is StringType,"write() argument must be string"
AssertionError: write() argument must be string
On Mar 13, 8:46 am, "Ino Pua" <[EMAIL PROTECTED]>
or each entry in my INSTALLED_APPS (from
> settings.py), it looks in that directory, and expects to find a
> models.py there. So I'm looking for an alternative to duplicating the
> same models.py file in multiple directories.
>
> --Mark
>
> On 3/12/07, akonsu <[EMAIL P
hello,
but model.py is imported it as any module. what prevents you from just
having it on the PYTHONPATH and not necessarily in the application
directory?
may be i misunderstood the question...
konstantin
On Mar 12, 9:37 pm, "Mark Engelberg" <[EMAIL PROTECTED]> wrote:
> So I've got several ap
hello,
i do not know what causes this.
i am curious what happens if you replace
return HttpResponse(stdout or stderr)
with
return HttpResponse('hello world')
this is how i would debug
konstantin
On Mar 12, 10:03 pm, "Ino Pua" <[EMAIL PROTECTED]> wrote:
> Quick way of reproducing:
>
>1.
mage?
>
> On Mar 13, 1:04 am, "akonsu" <[EMAIL PROTECTED]> wrote:
>
>
>
> > hello,
>
> > regarding the last part of your post: i have an unconfirmed suspicion
> > that data validation should not be done in models but in the forms
> > that manipulat
hello,
yes, there is search functionality called database API:
http://www.djangoproject.com/documentation/db_api/
do you have anything specific in mind?
konstantin
On Mar 12, 7:09 am, "Mary" <[EMAIL PROTECTED]> wrote:
> is there any search functionality that has been implemented with
> Djang
hello,
i think render_to_response takes a Context object not a dict as the
second parameter.
konstantin
On Mar 12, 10:56 am, "DvD" <[EMAIL PROTECTED]> wrote:
> I got the same problem in a different context:
>
>
> Exception Type: TypeError
> Exception Value:'dict' object is not call
hello,
regarding the last part of your post: i have an unconfirmed suspicion
that data validation should not be done in models but in the forms
that manipulate data. does anyone know if this is correct?
konstantin
On Mar 12, 9:56 am, "gorans" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to a
Hello,
please allow me to disagree. the first two queries in the original
post return result sets which overlap. but they combined return the
empty set. this is the problem.
konstantin
On Mar 12, 9:13 am, Atilla <[EMAIL PROTECTED]> wrote:
> On 12/03/07, Boris Smus <[EMAIL PROTECTED]> wrote:
>
i think i am going insane.
On Mar 11, 9:19 pm, "Cynthia" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am very new in developing systems. So I am seeking help on how to
> complete my system step-by-step. I am using Visual Basic 6.
> Currently,
> I have a form. In that form, I will need to input a Par
hello,
i have several questions:
1. why do you have s;ash (/) before quotes in some places like
> homebutton01up.src = /"media/images/welcome.jpg";
2. what does "The script doesn't work" mean? i suspect it means the
images are not shown. is this correct?
3. "django will not find the ima
t;
> On Mar 9, 8:29 am, Atilla <[EMAIL PROTECTED]> wrote:
>
>
>
> > On 08/03/07, akonsu <[EMAIL PROTECTED]> wrote:
>
> > > hello,
>
> > > as the subject says, select_related() does not return many-to-many
> > > relations. is this a feature
hello,
this page seems to have useful information:
http://www.b-list.org/weblog/2006/08/05/django-tips-simple-ajax-example-part-2
konstantin
On Mar 9, 11:20 am, "Jay Parlar" <[EMAIL PROTECTED]> wrote:
> On 3/9/07, ashwoods <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
> > with so many choices, you
manually:
d = dict()
for x in AB.objects.select_related().filter(aa__name = 'aa') :
y = x.bb
d[y.name] = y
i was trying to avoid this extra list traversal...
konstantin
On Mar 9, 11:28 am, Atilla <[EMAIL PROTECTED]> wrote:
> On 09/03/07, akonsu <[E
hello,
the code below generates two queries to the database. is there a way
to make it get all objects related to object 'aa' and then just look
up the right one when get() is called?
thanks
konstantin
class AA(models.Model) :
name = models.SlugField()
class BB(models.Model) :
name = m
hello,
i suspect you cannot do this (but i can be wrong because i myself do
not have much experience with django).
you could make your own association table manually in stead of using
ManyToManyField. of course in this case you won't have FOO_set methods
on your models.
konstantin
On Mar 8, 10
hello,
as the subject says, select_related() does not return many-to-many
relations. is this a feature or a bug?
thanks
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to t
hello,
but the user will have to wait anyway until the file is processed, no
matter what approach you take. i think what you are doing now is fine.
it may even be better because this way the wait time might be shorter
compared to the cron job that migh ttake a while to get to the file.
konstanti
1 - 100 of 129 matches
Mail list logo