Re: How to enter all model-related data on one form?

2006-03-12 Thread Adrian Holovaty
e and update. See the Django tutorial for full information on how the admin site works. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dja

Re: How to enter all model-related data on one form?

2006-03-13 Thread Adrian Holovaty
f. See the "Forms and manipulators" documentation. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: setting up a db in magic-removal branch

2006-03-13 Thread Adrian Holovaty
#x27;t already in the database). (I'll insert the standard disclaimer here that magic-removal is not ready for production use and is only for the faint of heart.) Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received th

Re: Apache/mod_python with 2 different projects

2006-03-13 Thread Adrian Holovaty
You'll need to use the PythonInterpreter directive to tell Apache not to mix those interpreters. See the docs for full information: http://www.djangoproject.com/documentation/modpython/#multiple-django-installations-on-the-same-apache Adrian -- Adrian Holovaty holovaty.

Re: create_update and manipulator

2006-03-13 Thread Adrian Holovaty
t's not currently possible. I'd recommend just writing your own view -- it shouldn't take much code. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: setting up a db in magic-removal branch

2006-03-13 Thread Adrian Holovaty
On 3/13/06, Luke Plant <[EMAIL PROTECTED]> wrote: > On Monday 13 March 2006 15:20, Adrian Holovaty wrote: > > > (I'll insert the standard disclaimer here that magic-removal is not > > ready for production use and is only for the faint of heart.) > > Only for

Re: Usage of Admin Section

2006-03-14 Thread Adrian Holovaty
7;t make much sense to use them. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: applying oracle patch

2006-03-14 Thread Adrian Holovaty
et us know how it goes. def get_table_list(cursor): raise NotImplementedError def get_table_description(cursor, table_name): raise NotImplementedError def get_relations(cursor, table_name): raise NotImplementedError def get_indexes(cursor, table_name): raise NotImplementedError Adrian --

Re: Date format in admin interface

2006-03-15 Thread Adrian Holovaty
d out an easy way to do this in the admin. Is there some > setting I completely missed? Thanks in advance! Hi Yuri, Yes, this is entirely possible. See the DATE_FORMAT, TIME_FORMAT and DATETIME_FORMAT settings. They're documented in the "Settings" documentation.

Re: Date format in admin interface

2006-03-16 Thread Adrian Holovaty
or > example, the calendar widget in the admin men is still entering dates > in the US format, even though the settings for the variables you > mention are set to the european format. Hi Yuri, That part isn't changeable at this point. Adria

Re: Once more: sqlall and sqlindexes

2006-03-16 Thread Adrian Holovaty
tch would certainly be welcome. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Table not found error when ordering by foreign key

2006-03-16 Thread Adrian Holovaty
r database command-line client and type "\dt" (Postgres) or "show tables;" (MySQL) to list the table names. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: Best Link for Perfect Career

2006-03-16 Thread Adrian Holovaty
eeping in to this list I've been deleting each one and marking them as spam in the Google Groups archives. It's best to ignore them. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you a

Re: Sorting and Linking in Admin mode

2006-03-17 Thread Adrian Holovaty
Key(Building, edit_inline=meta.TABULAR) > .. > > class Light(meta.Model): > window = meta.ForeignKey(Window, edit_inline=meta.TABULAR) > .. > > Opening an entry in the Window table correcly shows all Lights. Opening > an entry in

Re: Suggested Method of Coordinating DB Schema and Python Model

2006-03-17 Thread Adrian Holovaty
o the Django community, and thanks for the note! There have been *several* discussions about adding such a feature, and even a few attempts at implementing it. Database schema changes are a hard problem to automate, so we haven't come up with anything perfect enough yet. Specific ideas and implemena

Re: Getting an object' content_type_id

2006-03-17 Thread Adrian Holovaty
'hidden' property or function like: > self.content_type or self.get_content_type The cleanest way to do this would be: from django.models.core import contenttypes ct = contenttypes.get_object(package__package__exact='news', \ python_module_name__ex

Re: Joining foreign keys backwards?

2006-03-19 Thread Adrian Holovaty
ed to remove duplicates: dict([(c.get_poll(), 1) for c in choices.get_list(choice__exact='foo')]).keys() (The second example exploits the fact that dictionaries can't have duplicate keys.) The database API doesn't support this kind of "reverse" lookup in 0.91.

Re: Joining foreign keys backwards?

2006-03-19 Thread Adrian Holovaty
On 3/19/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > Here's how I'd solve this particular problem: > > [c.get_poll() for c in choices.get_list(choice__exact='foo')] > > If you need to remove duplicates: > > dict([(c.get_poll(), 1)

Re: django problem at dreamhost

2006-03-20 Thread Adrian Holovaty
rect and > it works in another host with the same settings. Does the "apps" directory have an __init__.py file in it? Generally that "no module named..." error signifies there's no __init__.py. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-

Re: magick-removal: Suggestion

2006-03-20 Thread Adrian Holovaty
gant importing system and do things like "from django.db.models import IntegerField as IntegerCol" if you're really concerned about the names. You could even create your own module of renamed field classes and import from there. Adrian -

Re: maxlength in the Admin site

2006-03-22 Thread Adrian Holovaty
axlength, because maxlength=200 would result in a horribly long field. There would have to be some sort of upper limit. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: flatpages

2006-03-22 Thread Adrian Holovaty
this could be done Hi Mary, This should be as simple as using your custom code in one place, and other custom code in another place. If the two usages are different enough, there's no point in sharing code -- just make them separate applications. Adrian -- Adrian Holovaty holovaty.

Re: flatpages

2006-03-22 Thread Adrian Holovaty
this could be done Hi Mary, This should be as simple as using your custom code in one place, and other custom code in another place. If the two usages are different enough, there's no point in sharing code -- just make them separate applications. Adrian -- Adrian Holovaty holovaty.

Re: Generic views in magic removal

2006-03-22 Thread Adrian Holovaty
tly passed. We're removing the magic, not adding to it! :) But as for your question, it seems like you're getting that error because you're passing in 'queryset' twice. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~-

Re: custom SQL within object model?

2006-03-22 Thread Adrian Holovaty
On 3/22/06, Alan Bailey <[EMAIL PROTECTED]> wrote: > Thanks! Silly me. But maybe a mention in the custom SQL section pointing > to the where / tables stuff would be good. Good idea! I've updated the docs to put in that pointer. Should be live on the site within 15 minutes.

Re: Django API doc

2006-03-23 Thread Adrian Holovaty
he final product we'd want Wilson's loving design touches. Also, this does a good job of pointing out the areas in which we need to add docstrings. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message be

Re: Advice on using model to bulk/batch load database

2006-03-23 Thread Adrian Holovaty
y your database provides. Or, if you absolutely want to do it in Python, use the cursor.executemany() functionality of the Python DB-API layer. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you

Re: How to change naming convention when creating models?

2006-03-24 Thread Adrian Holovaty
#x27;t change the naming convention on a global level, but you can manually override the name of the database column by specifying "db_column" in the field parameters. For example: foo = meta.ForeignKey(Foo, db_column='foo') The docs are here: http://www.djangoprojec

Re: ManyToManyField corrupts headers

2006-03-24 Thread Adrian Holovaty
#x27;ve removed that print statement and checked in the change. By the way, you might be the first person ever to use Django with CGI. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: admin apache

2006-03-24 Thread Adrian Holovaty
otice] child pid 13817 exit signal > Segmentation fault (11) > > does anybody have an idea what goes wrong? Hey there, Check out the Django/mod_python docs for some possible explanations/solutions. http://www.djangoproject.com/documentation/modpython/#if-you-get-a-segmentation-fau

Re: ASCII or PDF version of docs?

2006-03-26 Thread Adrian Holovaty
/documentation/models/ That's incorrect; you do indeed get the model examples. Although it's not obvious, they're in the directory tests/testapp/models directory of the Django distribution. The model examples are generated automatically from th

Re: Memory leak (db connection related?) with apache/postgres and magic-removal

2006-03-26 Thread Adrian Holovaty
#x27;t set to True. If it's set to True, Django will log every database connection in the variable django.core.db.queries, and that variable is never purged or reset. If you're not using DEBUG=True, could you give more information, such as your model? Adrian -- Adrian

Re: RSS Feeds - what am I doing wrong?

2006-03-26 Thread Adrian Holovaty
rade to the development (Subversion) version, and you should get a clearer error. Hope this makes sense! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Preformatted text in templates

2006-03-26 Thread Adrian Holovaty
ng a tag for that -- it's the right tool for the job. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Custom annotations on error emails

2006-03-27 Thread Adrian Holovaty
formation, I guess. Alternatively, we might be able to move the standard error e-mailing bit into a middleware of its own, so it can be overridden. If neither of those solutions work, we could add a specific hook for this, too. Let us know what you think! Adrian

Re: RSS Feeds - what am I doing wrong?

2006-03-27 Thread Adrian Holovaty
#x27;ve never used J2EE (or any Java at all, actually), so I certainly couldn't write that chapter. Not sure on the final deadlines of the book yet -- we're just now firming that up after having submitted the first couple rounds of drafts. Adrian

Re: Overthinking urls.py?

2006-03-27 Thread Adrian Holovaty
lower().replace(' ', '')) You're right to imply that this goes against the DRY principle, because you have to define URLs in two places -- the URLconfs and the models. In practice, this isn't that big of a deal (in my humble opinion), but we've given some th

Re: ASCII or PDF version of docs?

2006-03-28 Thread Adrian Holovaty
CSS and images. I would prefer not to include all of that in the main Django distribution, because it's a lot of cruft. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: apache threading - 'QueryDict' object has no attribute '_mutable'

2006-03-28 Thread Adrian Holovaty
ing the fix. Thanks, guys! I've commited that. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Customising Admin

2006-03-28 Thread Adrian Holovaty
ixed in Django's development branch and will no longer be an issue in the next release. For now, you could hack around it by removing that button with JavaScript using the admin.js hook... Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~--

Re: Overthinking urls.py?

2006-03-29 Thread Adrian Holovaty
; it's been this way since the first public > release of Django. Adrian and others have said elsewhere that it's not > nice and they'd love to see a better way to handle this, but no-one's > yet come up with one that works. Yeah, precisely. Elegant solutions are qui

Re: Multi level template inheritance

2006-04-10 Thread Adrian Holovaty
specify the blocks. I believe we have unit tests backing that up. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: Is select_related broken in magic removal?

2006-04-10 Thread Adrian Holovaty
I'm still digging into this one, but is this a > known issue? I'm not aware of any problems with select_related...Could you paste the exact code you're using? Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~

Re: Database views

2006-04-10 Thread Adrian Holovaty
make any changes to data (assuming you're dealing with read-only views). The other thing to be aware of is you'll want to manually make sure not to install a database table for your model, because it'll be hitting a view instead. Adr

Re: Memory leak (db connection related?) with apache/postgres and magic-removal

2006-04-10 Thread Adrian Holovaty
us far. (I'm on Linux/Apache, which appears to make a difference, I guess...) Keep us posted! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dja

Re: Strange exception when creating a user.

2006-04-11 Thread Adrian Holovaty
an SQL statement failed and the error wasn't caught until the *next* statement was executed. So the SET TIME ZONE query isn't the one that failed -- it's the one that happened just before that. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~-

Re: Model module naming in m-r

2006-04-11 Thread Adrian Holovaty
e issue was resolved yesterday in http://code.djangoproject.com/changeset/2655 . It no longer throws ImportError if an imported model isn't in INSTALLED_APPS. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message b

Re: Error in saferef.py?

2006-04-11 Thread Adrian Holovaty
te" your code, and all will be well. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Query for "missing" information

2006-04-11 Thread Adrian Holovaty
N a ON b.id=a.b_id WHERE b.a_id IS > NULL; > > How would I construct such a query using the Django ORM? That's not possible with the Django ORM, but you can drop into raw SQL quite easily. See this page for an example: http://www.djangoproject.com/documentation/models/custo

Re: where is the meta?

2006-04-12 Thread Adrian Holovaty
uot;models.TABULAR" is wrong now. "svn update" your magic-removal code, and all should be well. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: Django vs Rails

2006-04-12 Thread Adrian Holovaty
. Django 0.92 will *definitely* be out before the book comes out. Possibly Django 1.0 will be out before the book. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: Fate of 0.91 projects

2006-04-13 Thread Adrian Holovaty
it'll be 0.92 and magic-removal will be 0.95, to signify it's a big leap. Thoughts? For your immediate concern, I'd urge you to use Django's trunk. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received th

Re: Fate of 0.91 projects

2006-04-13 Thread Adrian Holovaty
many more changes are expected before a new release or in other > words: what's the schedule? :) Look for an announcement on this soon...It's about time to get a schedule set up. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--

Re: PostgreSQL Schemas.

2006-04-14 Thread Adrian Holovaty
g against them, just that we've never found a use for them.) That said, we'd be happy to accept patches that add schema support! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are s

Re: "choices" field option - how to make dynamic?

2006-04-14 Thread Adrian Holovaty
ngth=250, > choices=getDirs()) > > with a custom getDirs method that uses python os module and returns a > list of 2 tuples of the desired directories. Hey Frank, The FilePathField solves that exact problem. The docs are here: http://www.djangoproject.com/documentation/model_api/

Re: Trunk and docs

2006-04-14 Thread Adrian Holovaty
jango development version**". Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ 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

Re: PostgreSQL Schemas.

2006-04-14 Thread Adrian Holovaty
o maybe it's not as big of a question as I'm making it out to be. Maybe it doesn't make sense to put the schema in the model?) I forgot to mention this ticket, which has a patch for adding schema support: http://code.djangoproject.com/ticket/1051 That's on an older v

Re: [newbie] foreign key dereference issue

2006-04-14 Thread Adrian Holovaty
tried replacing self.vendor.name > with self.vendor.get_name() but with the same results. Hey Scott, Change the __repr__() of ServerModel to this: return (self.get_vendor().name + " " + self.model) Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~

Re: pictorial representation of models?

2006-04-14 Thread Adrian Holovaty
like that exists (to my knowledge) for Django, but it wouldn't be too hard to do, I don't think. Could be a nice pet project for somebody! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you ar

Re: Django Summer of Code

2006-04-15 Thread Adrian Holovaty
t Django involved in Summer of Code. We'll set something up. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Re: PostgreSQL Schemas.

2006-04-15 Thread Adrian Holovaty
ht proposal. Give it a shot (on the magic-removal branch, please), and keep us posted... Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django user

Re: Decoupling "choices" from Fields

2006-04-16 Thread Adrian Holovaty
,100]) > > would work as expected and not return string instead ? If not, I'll add > a ticket, though I'm not sure if it should be filed as an enhancement > or a bug; certainly the current behaviour is surprising, to say the > least. Hi George, I don't follow w

Re: Database selection

2006-04-18 Thread Adrian Holovaty
the matter, or you can find similar discussions across the Internet using your favorite search engine. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: MySQL Query cache hits stay zero

2006-04-20 Thread Adrian Holovaty
7;, db='foo', passwd='foo') >>> cursor = connection.cursor() >>> cursor.execute('select ...') Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you ar

Re: Passing variables to include?

2006-04-20 Thread Adrian Holovaty
for that functionality. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ 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

Re: Add a Button in Admin

2006-04-20 Thread Adrian Holovaty
andard Django view with the admin look-and-feel. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: MySQL Query cache hits stay zero

2006-04-20 Thread Adrian Holovaty
ngs out on the Django mailing list, so he might be able to shed more light on the issue. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

magic-removal call for testing

2006-04-20 Thread Adrian Holovaty
the magic-removal branch: http://code.djangoproject.com/wiki/RemovingTheMagic Please feel free to ask questions on the django-developers mailing list. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message

Re: Documentation HTML structure

2006-04-20 Thread Adrian Holovaty
ind what > I'm looking for At the end of the day, this isn't a huge problem. If you're looking for something that you know is in the sidebar, just look at the sidebar. It's pretty short! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~

Re: How to extend Django template objects?

2006-04-20 Thread Adrian Holovaty
ates for Python programmers" docs). An example of this is in run_tests() method in tests/othertests/templates.py. It's hackish, but it works. If there's interest, we can expose things so that you pass in the loader list as an optional argument to g

Re: MySQL Query cache hits stay zero

2006-04-20 Thread Adrian Holovaty
On 4/20/06, Andy Dustman <[EMAIL PROTECTED]> wrote: > Do statements generated by Django have columns in a deterministic order? Just for the record, yes, the columns will always be in the same order. Adrian -- Adrian Holovaty holovaty.com | djangopr

Re: Slow initial startup on Django project

2006-04-21 Thread Adrian Holovaty
x and Solaris). Frankly, it knocks the crap out of any other dynamic-language framework I'm aware of, performance-wise. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: problem with threaded apache

2006-04-21 Thread Adrian Holovaty
n't explain > which MPM. Good call. I've updated the docs. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Possible bug in MR

2006-04-23 Thread Adrian Holovaty
model to something more detailed? You'll either have to change __repr__() or specify "list_display" in the "class Admin". I could see some value in adding a hook in the "class Admin" to override the object's __repr__() in the admin interface, though.

Re: MR and users magic

2006-04-23 Thread Adrian Holovaty
ure additions have been frozen for the moment. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, se

Re: BooleanField and MySQL default value

2006-04-23 Thread Adrian Holovaty
REATE TABLE `test_test` ( > `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, > ... some other fields ... > `bool_field` bool NOT NULL > > It doesn't generate the DEFAULT "1" part... Hi Viktor, Default values aren't created at the SQL

Re: Delete session on server?

2006-04-24 Thread Adrian Holovaty
ssion object s, use s.get_decoded() to get the session data, which should be a Python dictionary. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Limit number of edit_inline results in admin?

2006-04-25 Thread Adrian Holovaty
;s no way to limit the inline related objects in the admin, because we've never had a need for that. It's either all or nothin'! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are sub

Re: Different versions of Django - apache virtual hosts

2006-04-28 Thread Adrian Holovaty
tting an error message which indicates that it's using the 0.91 > version of Django. Hi tomass, You want the "PythonInterpreter" directive. See "Multiple Django installations on the same Apache": http://www.djangoproject.com/documentation/modpython/#multiple-django-inst

Re: got unexpected keyword argument

2006-04-29 Thread Adrian Holovaty
gt; from within a view, I get: > > TypeError at /cadastro/pesquisa/ > got unexpected keyword argument 'servicos__id__exact' Hi Luis, When using the Django database API, you use the field names, not the model names. So you want this: cadastros.get_list(serv_cliente

Re: superuser permission by non-superuser!

2006-04-30 Thread Adrian Holovaty
't consider this a bug, but perhaps we should document it more clearly. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gro

Re: [M-R] lookup like Article.objects.filter(id__in = []) will fail

2006-04-30 Thread Adrian Holovaty
e "id IN ()" is utterly meaningless, because a lookup of an ID in an empty list would still return all records. In short, it's up to the developer to be more explicit about what he/she wants. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~-

ATTENTION: magic-removal being merged to trunk TODAY

2006-05-01 Thread Adrian Holovaty
ot; by mistake and aren't yet ready for the magic-removal APIs, you'll be able to "svn switch" back to the last version of pre-magic-removal Django, which will be tagged in Subversion. Look for an announcement here (on both the django-users and django-developers mailing lists)

ANN: magic-removal branch merged to trunk

2006-05-01 Thread Adrian Holovaty
;final" version of 0.91 that has a few months' worth of bugfixes applied.) As always, thanks for using Django. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Re: Tutorial Problem with Magic Removal

2006-05-02 Thread Adrian Holovaty
s a bug or can I just not follow > instructions? Hi Dave, I still haven't proofread the tutorial for the magic-removal version but hope to get to that this evening. I apologize for the general incompletion of it and any errors. Could you copy-and-paste your urls.py file? That'd help us d

Re: For what is useful order_with_respect_to?

2006-05-02 Thread Adrian Holovaty
objects. Continuing Wilson's example, you may want to change the ordering of choices for a given poll. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: [M-R] order by on custom SELECT column

2006-05-02 Thread Adrian Holovaty
ce I try to > avoid doing custom SQL as much as possible for portability purpose. Hi Cheng, There's no cleaner way to get the same thing, but I think that would be a fine addition. Maybe something like Poll.objects.populate_related_aggregates('choice', 'count&#

Re: Template Tags in MR

2006-05-02 Thread Adrian Holovaty
Hi Tom, You've put the tags in the right place, and Django's looking in the correct place, but I suspect there's some sort of syntax or import error in your template library. Try running "python automator.py" to see if it spi

Re: ANN: magic-removal branch merged to trunk

2006-05-02 Thread Adrian Holovaty
On 5/2/06, Eric Walstad <[EMAIL PROTECTED]> wrote: > For those of us cast off to drift with the floating sargasso of > 'pre-magic-removal', this way to the life raft: Man, we *sooo* should've called that tag "floating-sargasso". Adrian -- Adrian Holo

Re: FilePathField blank=True

2006-05-02 Thread Adrian Holovaty
ee with how I think this should work? > > (Of course I'd clean this up and move the import to the proper place in > a patch) Hey Adam, That patch looks pretty decent -- go ahead and file a ticket! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~-

Re: hack for file-browser

2006-05-02 Thread Adrian Holovaty
image lives in the Django source tree: django/contrib/admin/media/img/admin/icon_addlink.gif Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django u

Re: Write a DRY URL configuration

2006-05-02 Thread Adrian Holovaty
d on the Web site within 15 minutes. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Re: M-R DB API Usage Question: How to order_by with extra field?

2006-05-02 Thread Adrian Holovaty
;." not in col_name and col_name not in [k for k in (self._select or > ())]: > > for k[0] will be the first letter of the key in self._select, not the > key itself. I'll submit a ticket for it. That ticket's been committed. Thanks

Re: Write a DRY URL configuration

2006-05-02 Thread Adrian Holovaty
ed' > should be > urlpatterns = patterns( 'django.views.generic.date_based' , All right, I've fixed 'em. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you

Re: database query help

2006-05-03 Thread Adrian Holovaty
nts.get_list(semester__id__exact=1, category__id__exact=2) Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, se

Re: db-api.txt bug

2006-05-03 Thread Adrian Holovaty
On 5/3/06, Sean Perry <[EMAIL PROTECTED]> wrote: > That get_FOO_filename should be save_FOO_filename. Thanks, Sean! I've fixed it, along with another, similar, typo. If you could, please file these sorts of things in the Web ticket system -- things tend to get lost on the mailing

Re: New to Django

2021-10-14 Thread Adrian Valenzuela
Nice! Thanks for this! I'm new too and this already looks like a great resource. On Sunday, October 3, 2021 at 5:01:41 AM UTC-7 bnmng wrote: > I think you'll get a few opinions on this. My opinion is no. I feel the > docs are very good but difficult to understand as a beginner. I like > Moz

Re: Import error

2012-06-22 Thread Adrian Bool
Hi Emily, On 22 Jun 2012, at 15:46, Emily wrote: > This is the class I created... > > import string > import random > > class Helpers: > > def random_password(): Take random_password outside of the Helpers class and you should be OK. On the import statement you need to refer to a 'top

Re: ForeignKey problem

2012-06-25 Thread Adrian Bool
On 25 Jun 2012, at 17:41, Soviet wrote: > I'm new to this Django thing and I run into first problem :). > > Let's say I have two models and in each I have field with ForeignKey > relating to field in other model (hope it's clear). Now that I want to > run migrate with South, I'm getting "NameErr

Re: ForeignKey problem

2012-06-25 Thread Adrian Bool
On 25 Jun 2012, at 17:53, Soviet wrote: > Thank you kind sir for your fast response, that worked brilliantly. > Can I be cheeky and ask why does it work? :) Magic! ;-) Although seriously, Django obviously has some code in there to handle just the situation you have come across. Sorry, I don't

<    5   6   7   8   9   10   11   >