Re: django.core.management changes

2007-08-30 Thread James Bennett
On 8/30/07, akonsu <[EMAIL PROTECTED]> wrote: > 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

Re: Django-based forum software?

2007-08-30 Thread Aaron Maxwell
Thanks, everyone. -Aaron On Thursday 30 August 2007 09:47:41 Aaron Maxwell wrote: > Hi, > > Does anyone know of a django forum app? I.e., to build a site providing a > user forum. > > This is kind of hard to search on - try googling for "django forum"... -- Aaron Maxwell

Choice field value shows up as none in change_list in admin

2007-08-30 Thread Catriona
Hello I have a choice field: interaction_type = models.PositiveIntegerField(choices = INTERACTION_TYPE, default=0, null = False, blank = False) which I have made available in the admin interface using list_display = ( 'interaction_type', 'interaction_date') The problem is that even though a

Template Error

2007-08-30 Thread Jesse G. Lands
This only occurs (as far as I have found) when I use the {% block %} feature of a template. Anyone know of a reason why? Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/django/template/__init__.py" in render_node 723. result = node.render(context) File

Re: Testing/Fixtures/Production/TestRunner

2007-08-30 Thread Chris Green
[ Sorry for long delay, django is one of my "also projects" ] On Aug 11, 11:15 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > As for how to fix this problem, I have two suggestions. > > 1) Are you sure you can't just fix this with a static fixture? Yes, that should work just fine. The

Re: Collapse edit inline?

2007-08-30 Thread Alex Koshelev
No, you can not collapse edit inline block in admin. --~--~-~--~~~---~--~~ 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

Re: Strange encoding behavior

2007-08-30 Thread Michael Radziej
On Thu, Aug 30, Anderson Santos wrote: > > I am still having this issue. > I have in my settings DEFAULT_CHARSET = "utf-8", and I created a new > database with UTF-8 encoding (using PGAdmin). > So I go to admin page, click on my model and then the "add" button, I > include a special char (á, ç,

Re: django-voting and django-tagging error

2007-08-30 Thread Benoit Chesneau
If you use trunk. problem was fixed. - benoît On 8/30/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > On 8/30/07, Kelsey Ruger <[EMAIL PROTECTED]> wrote: > > > > I just checked out the latest versions of django-voting and django- > > tagging. When attempting a syncdb I get the following error -

Collapse edit inline?

2007-08-30 Thread [EMAIL PROTECTED]
I've got a Model that I'm editing inline, but it's not used often. Any way I can collapse it? I know there's class Admin: fields = ( ('Date information', {'fields': ('pub_date',), 'classes': 'collapse'}), ) But I don't think that'll work for something being edited inline.

Re: django-voting and django-tagging error

2007-08-30 Thread Jeremy Dunck
On 8/30/07, Kelsey Ruger <[EMAIL PROTECTED]> wrote: > > I just checked out the latest versions of django-voting and django- > tagging. When attempting a syncdb I get the following error - tagging: > 'DatabaseWrapper' object has no attribute 'ops' or voting: > 'DatabaseWrapper' object has no

Unicode JSON Serialization Bug?

2007-08-30 Thread mynameisgabe
Hello All- I've been told that I may have encountered a bug - I'm trying to serialize a model that includes fields that could be unicode data. Here is the information I collected. Let me know if there's anything else that would be helpful. Specs of the local dev workstation - having the same

django-voting and django-tagging error

2007-08-30 Thread Kelsey Ruger
I just checked out the latest versions of django-voting and django- tagging. When attempting a syncdb I get the following error - tagging: 'DatabaseWrapper' object has no attribute 'ops' or voting: 'DatabaseWrapper' object has no attribute 'ops'. Anyone have an idea on what this is?

Re: @url tag - getting rid of urlpatterns

2007-08-30 Thread Gary Wilson
On Aug 30, 3:08 am, Ilya Semenov <[EMAIL PROTECTED]> wrote: > Second, I think the use of generic views is over-estimated. I tend to agree a bit here. I like having all my URLs in one file and all my views in another. Using generic views usually clutters the urls file too much for me. Generic

Re: Strange encoding behavior

2007-08-30 Thread Anderson Santos
I am still having this issue. I have in my settings DEFAULT_CHARSET = "utf-8", and I created a new database with UTF-8 encoding (using PGAdmin). So I go to admin page, click on my model and then the "add" button, I include a special char (á, ç, etc) and I get a Unicode error on both, Linux and

Re: Django-based forum software?

2007-08-30 Thread Jarek Zgoda
At some point of time we decided to use this software in our product, but now it's clear it would be more feasible to write something like that on our own. It's very hard to customize and does not play good with current django auth framework. On 30 Sie, 18:50, daev <[EMAIL PROTECTED]> wrote: >

Re: Stand-alone Django ORM question

2007-08-30 Thread Abhijit Choudhury
Thanks, I had to create mysite/app, add mysite.app to the INSTALLED_APPS and then run django_admin.py syncdb to create the tables. Is there a programmatic way to create the tables? BTW, the class Meta app_name did not seem to work. Thanks again, Abhijit - Original Message From: daev

Seeking Django Developer

2007-08-30 Thread Jeremy Rue
Hi Guys, I hope this is the appropriate venue to send this out to. If not, I apologize for the spam; it's the only message I will send out. We're looking for two web developers at the UC Berkeley Graduate School of Journalism, one who specializes in Django/Python. I've included the job

Re: unique_together and composite columns indexing

2007-08-30 Thread Peter Melvyn
On 8/30/07, Peter Melvyn <[EMAIL PROTECTED]> wrote: > 2.a If I let MySQL to explain a select command from such table, there is no >composite index listed > 2.a If I create a composite index by explicit command, it is listed by explain >command among available indices You are

Re: unique_together and composite columns indexing

2007-08-30 Thread Peter Melvyn
On 8/30/07, Nis Jørgensen <[EMAIL PROTECTED]> wrote: > > CREATE INDEX `xxx_amodel_col_a_col_b` > >ON `wss_amodel` (`col_a`,`col_b`); > > Postgresql will implicitly generate this index when it encounters the > UNIQUE constraint. My guess is that other backends will do the same. Are you sure?

Re: admin site and parent/child relationship

2007-08-30 Thread Lic. José M. Rodriguez Bacallao
ok, thanks On 8/30/07, Alex Koshelev <[EMAIL PROTECTED]> wrote: > > > There is no way to do so in django admin now. > > > > > -- Lic. José M. Rodriguez Bacallao Cupet - Todos somos muy ignorantes, lo que ocurre es que no todos

Re: admin site and parent/child relationship

2007-08-30 Thread Alex Koshelev
There is no way to do so in django admin now. --~--~-~--~~~---~--~~ 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,

Re: django.core.management changes

2007-08-30 Thread akonsu
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

Re: Newbie with generic views

2007-08-30 Thread Mike Atlas
I'm on my way. Thanks...sometimes asking the right question is the best way to answer it for yourself :( competitor_list.html = {% extends "base.html" %} {% block content %} {% for object in object_list %} {{ object.fullname }} {% endfor %} {% endblock %}

admin site and parent/child relationship

2007-08-30 Thread Lic. José M. Rodriguez Bacallao
Hi people, I got a little problem with the admin page, I have models to represent Country/State situation and a Person model that reference Country and State models but I want in admin that when I change a country of a person, the list of states get updated to states of that country. How can I do

Re: Newbie with generic views

2007-08-30 Thread Mike Atlas
Hmm... Looks like I need to access the object_list context... that seems to be the first step that I'm missing... I understand better somewhat already...although a link to any resources anyone might know of would be nice... Thanks. Mike On Aug 30, 2:59 pm, Mike Atlas <[EMAIL PROTECTED]>

Re: Newbie with generic views

2007-08-30 Thread Alex Koshelev
What is field.choices ? object_list doesn't pass _field_ variable to context. http://www.djangoproject.com/documentation/generic_views/#django-views-generic-list-detail-object-list see Template context section --~--~-~--~~~---~--~~ You received this message

Newbie with generic views

2007-08-30 Thread Mike Atlas
Hi guys, I'm trying to make a generic view to see some data, and I'm having some trouble. I have some objects already in the database for the model I'm trying to generate this for. Here's my urls.py: #= from django.conf.urls.defaults import * from

Re: django.core.management changes

2007-08-30 Thread Alex Koshelev
try this: from django.core.management import call_command call_command( "reset", models.get_app('myapp'), interactive = False ) call_command( "load_data", [FIXTURE_PATH], verbosity = 0 ) --~--~-~--~~~---~--~~ You received this message because you are subscribed

django.core.management changes

2007-08-30 Thread akonsu
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

Re: dynamic filtering in a QuerySet

2007-08-30 Thread daev
Use strings instead of unicode. Key word arguments names must be strings. --~--~-~--~~~---~--~~ 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

Re: dynamic filtering in a QuerySet

2007-08-30 Thread Greg Donald
On 8/30/07, daev <[EMAIL PROTECTED]> wrote: > > widgets = widgets.filter( **filters ) When I try that I get the error: filter() keywords must be strings Does that have anything to do with the fact that they are unicode? filters: {u'LOB': u'B'} -- Greg Donald http://destiney.com/

Re: Django-based forum software?

2007-08-30 Thread Nicolas Steinmetz
Aaron Maxwell a écrit : > Hi, > > Does anyone know of a django forum app? I.e., to build a site providing a > user forum. > > This is kind of hard to search on - try googling for "django forum"... >

Re: Django-based forum software?

2007-08-30 Thread Empty
http://code.google.com/p/counterpoint/ Empty blog.michaeltrier.com On 8/30/07, daev <[EMAIL PROTECTED]> wrote: > > http://code.google.com/p/diamanda/ > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Django-based forum software?

2007-08-30 Thread Aaron Maxwell
Hi, Does anyone know of a django forum app? I.e., to build a site providing a user forum. This is kind of hard to search on - try googling for "django forum"... -- Aaron Maxwell http://redsymbol.net Business Owners and Self-Employed: You're NOT Alone! The Business Butler -

Re: Django-based forum software?

2007-08-30 Thread daev
http://code.google.com/p/diamanda/ --~--~-~--~~~---~--~~ 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

dynamic filtering in a QuerySet

2007-08-30 Thread Greg Donald
How can I apply dynamic filtering to a Django QuerySet? widgets = Widget.objects.all()[:10] filters = {'foo':1,'bar':1,'baz':1} for f in filters: widgets = widgets.filter(f=filters[f]) This breaks down because I can't figure out how to use an expression as a named parameter. I've tried

Re: dynamic filtering in a QuerySet

2007-08-30 Thread daev
widgets = widgets.filter( **filters ) --~--~-~--~~~---~--~~ 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

Re: Stand-alone Django ORM question

2007-08-30 Thread daev
Define app_name in Meta nested-class: class Meta: app_name = "some_name" --~--~-~--~~~---~--~~ 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

Re: django under 2.5

2007-08-30 Thread Alvaro Mouriño
On 8/30/07, John Shaffer <[EMAIL PROTECTED]> wrote: > > On 8/28/07, Alvaro Mouriño <[EMAIL PROTECTED]> wrote: > > I have been running django under python 2.4 but now I'm considering > > switching to 2.5. Are there any known compatibility issues? Or is it > > just straightforward? > > Django

Re: Stand-alone Django ORM question

2007-08-30 Thread canen
I'm not sure but maybe you need the INSTALLED_APPS setting. On Aug 30, 10:21 am, ceeed <[EMAIL PROTECTED]> wrote: > Hello, > I am a Django newbie and trying to learn it. > > As a project, I am trying to use the Django ORM in a stand-alone sense > (i.e., without creating a project and app). I am

Re: template image problem

2007-08-30 Thread Tim Chase
> Static content is served by http server not django. > http://www.djangoproject.com/documentation/static_files/ For development purposes, in my urls.py after defining all my "business" urls, I have from sys import argv if 'runserver' in argv: urlpatterns += patterns('',

Stand-alone Django ORM question

2007-08-30 Thread ceeed
Hello, I am a Django newbie and trying to learn it. As a project, I am trying to use the Django ORM in a stand-alone sense (i.e., without creating a project and app). I am using SQLITE and have defined the models. I would like to a) create the table in the database based on my models, b)

Re: newforms __init__

2007-08-30 Thread Jökull
Awesome. Thanks! BTW it's right there in the documentation. Apologies. http://www.djangoproject.com/documentation/newforms/#using-a-subset-of-fields-on-the-form On Aug 30, 3:40 pm, daev <[EMAIL PROTECTED]> wrote: > То remove fields from from you don't need to use __init__ > form_for_model,

Re: newforms __init__

2007-08-30 Thread daev
То remove fields from from you don't need to use __init__ form_for_model, form_for_instance function has _fields_ parameter where you can specify all the fields you need/ Example: Form = form_for_model( Article, fields = ( "title", "text", "tags" ) ) Creates form with this three fields of

newforms __init__

2007-08-30 Thread Jökull
Does anyone have a code example of __init__ where you modify a form_for_inst/model to remove some fields? I'm trying to build an edit form but don't want to expose all fields of the model. Maybe I missed it but I didn't see this scenario covered in the newforms documentation. Is this maybe not

Re: Keeping track of the original values for a record...

2007-08-30 Thread [EMAIL PROTECTED]
Blah... I could have sworn that worked when I tried it yesterday. but when I went to start working on it today..that method is returning the changed values as well... very strange... I might have to resort to calling the values from the DB again before doing a save :( On Aug 29, 4:34 pm,

Re: Internet Explorer, sessions, django on 64-bit machine

2007-08-30 Thread Jarek Zgoda
Jarek Zgoda napisał(a): > I just got into some strange problem with session and its cookies. > > I have 2 instances of the same app, one running on 64-bit Ubuntu 6.06 > and the second on 32-bit Ubuntu 6.10, both under Django 0.96. Neither > Firefox or Opera shows any problems, but in Internet

Re: django under 2.5

2007-08-30 Thread John Shaffer
On 8/28/07, Alvaro Mouriño <[EMAIL PROTECTED]> wrote: > I have been running django under python 2.4 but now I'm considering > switching to 2.5. Are there any known compatibility issues? Or is it > just straightforward? Django itself should work fine. Usually your apps and projects will work

Re: unique_together and composite columns indexing

2007-08-30 Thread Nis Jørgensen
Peter Melvyn skrev: > Hi all, > > if I'm not mistaken, if I have a model with unique constraint > 'unique_together', Django does not support composite index of related > columns, i.e. > > class AModel (models.Model): > col_a = models.CharField(maxlength=20, db_index=True) > col_b =

Re: Internet Explorer, sessions, django on 64-bit machine

2007-08-30 Thread Jarek Zgoda
James Bennett napisał(a): >> The session cookies for 64-bit machine based app have >> additionally all this __utma .. __utmz items, not found in cookies for >> 32-bit machine. >> >> Anybody experienced similar weirdness? > > The "utma", "utmz", etc. cookies are not set by Django. They are set >

Re: is possible to only select the specified fields?

2007-08-30 Thread Diego pylorca
aha Great, exelent! and now the question is: can I get a model instance from a dict without pick the database? class Entry(models.Model): e1 = models.x() e2 = models.x() e3 = models.y() def crazymethod(self): return "blah blah %s" % self.e2 >>> qsv =

Re: Internet Explorer, sessions, django on 64-bit machine

2007-08-30 Thread James Bennett
On 8/30/07, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > The session cookies for 64-bit machine based app have > additionally all this __utma .. __utmz items, not found in cookies for > 32-bit machine. > > Anybody experienced similar weirdness? The "utma", "utmz", etc. cookies are not set by Django.

Re: dynamic links

2007-08-30 Thread Rufman
never mind...i found my error after i got th pydev debugger to work with django. I didn't know that i was getting the whole object...i was under the impression i was just getting the primary key. i have to say django is really neat!! jake, thx for your help greets stephane

Re: is possible to only select the specified fields?

2007-08-30 Thread James Bennett
On 8/29/07, Diego pylorca <[EMAIL PROTECTED]> wrote: > ok, but this not return a querySet, return a dictionary :S Read the documentation more carefully. Specifically: > Returns a ValuesQuerySet -- a QuerySet that evaluates to a list > of dictionaries instead of model-instance objects. And: >

Re: [Urgent] Freelance Django Developers Wanted

2007-08-30 Thread Nis Jørgensen
Siliconbits skrev: > [This is a repost] > > We are currently looking for more Django developers to join us on a > freelance basis. > > Location is irrelevant as long as you have a fast and reliable > Internet access. > > You will be working from home, so you should be able to work >

Re: doc question

2007-08-30 Thread eXt
If you browsed the docs at djangoproject.com and djangobook.com then there is not much more available. You have to use a search engine and read the django's source code. On the other hand Admin is not very flexible at the moment. You might want to use newforms-admin branch and then read it's

Re: foreign keys between different application models

2007-08-30 Thread Graham Carlyle
On Thu, 2007-08-30 at 07:27 +0800, Russell Keith-Magee wrote: > 1) If you have a non-trivial amount of data in your production > database, the space and time required to deserialize, store and > reserialize the contents of the databse could be problematic. Fortunately I have a small amount of

Re: doc question

2007-08-30 Thread Sheriff26
thanks !!! On Aug 30, 1:01 pm, Paul Rauch <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Sheriff26 schrieb: > > > hi all > > > Where can I find all Admin class stuff like list_display, > > list_filter, ordering, search_fields ? > > I have readed the

Re: doc question

2007-08-30 Thread Paul Rauch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sheriff26 schrieb: > hi all > > Where can I find all Admin class stuff like list_display, > list_filter, ordering, search_fields ? > I have readed the documentation, ... but i don't find only a few. I > suppose there are mor options. > > Thanks >

doc question

2007-08-30 Thread Sheriff26
hi all Where can I find all Admin class stuff like list_display, list_filter, ordering, search_fields ? I have readed the documentation, ... but i don't find only a few. I suppose there are mor options. Thanks --~--~-~--~~~---~--~~ You received this message

Re: count() causes QuerySet re-evaluation?

2007-08-30 Thread SmileyChris
On Aug 30, 8:19 pm, Bjorn Ruud <[EMAIL PROTECTED]> wrote: > > > On 8/29/07, Bjorn Ruud <[EMAIL PROTECTED]> wrote: > > > > The pool QuerySet gets re-evaluated when the count() in the loop is > > > run. Since one of the fields in the filter gets changed, the amount of > > > objects in the

Re: @url tag - getting rid of urlpatterns

2007-08-30 Thread Ivan Sagalaev
Ilya Semenov wrote: > Second, I think the use of generic views is over-estimated. Generic > views do not even support access restrictions (@user_passes_test) and > thus are most of the time proxied via custom one-line views. Actually they support decoration perfectly well, right in urls.py:

Re: @url tag - getting rid of urlpatterns

2007-08-30 Thread daev
On 30 авг, 12:08, Ilya Semenov <[EMAIL PROTECTED]> wrote: > Second, I think the use of generic views is over-estimated. Generic > views do not even support access restrictions (@user_passes_test) and > thus are most of the time proxied via custom one-line views. Look at this:

Re: Choices cannot be marked for translation?

2007-08-30 Thread Kenneth Gonsalves
On 30-Aug-07, at 1:29 PM, Michael Radziej wrote: >> >> True, that's why I call this behaviour "buggy". > > Ah! I thought that you advocated for gettext instead of > gettext_lazy in this > specific situation. well, i am using gettext until the bug is fixed - so far no problems -- regards

Re: @url tag - getting rid of urlpatterns

2007-08-30 Thread Ilya Semenov
Ivan, Thanks for reviewing the snippet. > While the decorator looks nice it creates in my opinion at least as many > problems as it solves. > > 1. You can apply decorators only to custom views, not to generic views. > And as generic views are commonly used one still should keep a separate >

Re: Choices cannot be marked for translation?

2007-08-30 Thread Michael Radziej
On Thu, Aug 30, Jarek Zgoda wrote: > > Michael Radziej napisał(a): > > The next testing option is to try with non-lazy version. > >>> that works! import gettext as _ > >> And that's a real bug, I think. > >> > >> Anyway, for future reference, keep in mind that lazily translated > >>

Re: Choices cannot be marked for translation?

2007-08-30 Thread Jarek Zgoda
Michael Radziej napisał(a): The next testing option is to try with non-lazy version. >>> that works! import gettext as _ >> And that's a real bug, I think. >> >> Anyway, for future reference, keep in mind that lazily translated >> "strings" become real strings at access time. Before that

Re: Django, CherryPy and threading

2007-08-30 Thread Eratothene
I am running CherryPy 3.0.1 with django + nginx for static content on my production server for several months without any issues. It also shows very well perfomance, even better than apache/mod_python and very small memory usage. Ideal solution! On Aug 28, 6:39 pm, Justin Johnson <[EMAIL

Re: Using SQL aggregates

2007-08-30 Thread Eratothene
I know two options for you: 1. First use django-simpleaggregation plugin, you canfind it on googlecode.com 2. Or use raw sql to do it. This is example how I count entries in each blogs blogs = Blog.objects.all().extra(select={'article_count': "SELECT COUNT(*) FROM blog_article a WHERE

Re: @url tag - getting rid of urlpatterns

2007-08-30 Thread Ivan Sagalaev
Ilya Semenov wrote: > === apps/app1/views/__init__.py === > @url(r'^index/$') > def index(request): > ... > > @url(r'^news/$') > def news(request): While the decorator looks nice it creates in my opinion at least as many problems as it solves. 1. You can apply decorators only to custom