Re: Directory structuring

2010-06-03 Thread Mike Dewhirst
EJ - one comment below ... On 4/06/2010 11:41am, EJ wrote: Hi guys, first of all: Thanks! Django-users has been a great resource for me so far; I've come across many solutions for my own problems here. I'm not even really sure if this question is totally appropriate for this page, but here

how should reusable apps handle url namespace?

2010-06-03 Thread HARRY POTTRER
I'm writing a forum app that I want to be reusable. All of my urls I have named. Some of them are named like "index" and "thread" which are generic and will likely collide with existing project's urls. I don't want to do something like name all my urls "forum_index" and "forum_thread" either. I

Re: design question - forms as meta-data to a model

2010-06-03 Thread Jason Beaudoin
Silence usually implies some key piece of documentation was missed, or was this just lost amongst more interesting posts? :) On Tue, Jun 1, 2010 at 9:54 PM, Jason Beaudoin wrote: > Hi, > > I've a situation where the following functionality is desirable.. > >  - one

Directory structuring

2010-06-03 Thread EJ
Hi guys, first of all: Thanks! Django-users has been a great resource for me so far; I've come across many solutions for my own problems here. I'm not even really sure if this question is totally appropriate for this page, but here goes: I'm a new developer working on a small social networking

how to call label_tag?

2010-06-03 Thread Phlip
Djangoists: Given a form, I can expand a template with {{ form.my_field.label }} which inserts the string of label into my HTML. How do I call label_tag? It seems to decorate the label string with and similar HTML-correctness. {{ form.my_field.label_tag }} did not work. -- Phlip

analyzing slow view

2010-06-03 Thread Dmitry Beransky
Hi, I'm trying to figure out why a certain view is taking a long time to render. It all comes down to DB access, but here's where I'm starting to get confused. Looking at connections[].queries, I can see that the query in question takes around 300s to execute (does this include re-hydration

Re: File Upload with Progress Bar

2010-06-03 Thread Brad Pitcher
Some versions of flash have a bug that causes the entire browser to freeze while uploading. I am afflicted by the bug, running Flash 10.0 r45 on Ubuntu 10.04. It seems that there is no good solution at the moment. My host is Webfaction and I just discovered that they have a non-configurable

Re: Error with dumpdata: User matching query does not exist.

2010-06-03 Thread bastir
okay, found the problem. It is not allowed that there are zero valued foreign keys. On 3 Jun., 22:36, bastir wrote: > thx 4 your answer. If there is a foreign user key that links to a user > that does not exist is this the problem? Because I'm pretty sure that > is not the case

Re: Error with dumpdata: User matching query does not exist.

2010-06-03 Thread bastir
thx 4 your answer. If there is a foreign user key that links to a user that does not exist is this the problem? Because I'm pretty sure that is not the case in my db. I only have one foreign user key in one table. And this table only has one entry at the moment. But i will look at my data again.

Django sessions issue

2010-06-03 Thread aa56280
Django's docs say: "When a user logs in, Django adds a row to the django_session database table. Django updates this row each time the session data changes. If the user logs out manually, Django deletes the row. But if the user does not log out, the row never gets deleted." I'm logging out of my

Re: Error with dumpdata: User matching query does not exist.

2010-06-03 Thread Lee Hinde
On Thu, Jun 3, 2010 at 12:36 PM, bastir wrote: > Hey, > i'm suddenly getting an error with dumpdata: > django.contrib.auth.models.DoesNotExist: User matching query does not > exist. > What's wrong here. I did not change anything (especiallyin the User > model) > Thx, > Sebastian

Error with dumpdata: User matching query does not exist.

2010-06-03 Thread bastir
Hey, i'm suddenly getting an error with dumpdata: django.contrib.auth.models.DoesNotExist: User matching query does not exist. What's wrong here. I did not change anything (especiallyin the User model) Thx, Sebastian -- You received this message because you are subscribed to the Google Groups

Re: this field is required

2010-06-03 Thread bastir
Hey Luca, i think u can give every formfield a dict of error messages like this: forms.InputField(error_messages={'required':u'your MSG'}) Hope this helps Sebastian On 3 Jun., 18:34, luca72 wrote: > hello at all. > during the renderig of a form in any required field is write

Re: Something like admin.StackedInline where 'extra'

2010-06-03 Thread Frank Wiles
On Thu, Jun 3, 2010 at 9:56 AM, jeremy07 wrote: > Hi, I have a simple booking app where first form gets number of > travelers. Based on that number I need to generate another form with > number of rows equal to entered number of travelers to get their > names.  Something

Re: Model Issue - wont let me name it follower or followee

2010-06-03 Thread Frank Wiles
On Wed, Jun 2, 2010 at 10:36 PM, joelklabo wrote: > http://dpaste.org/JjE4/ This should fix it up for you: class Follow(models.Model): follower = models.ForeignKey(User, related_name='following') followee = models.ForeignKey(User, related_name='followers') What I

Postgres's website to migrate to Django

2010-06-03 Thread Masklinn
http://seeknuance.com/2010/06/03/postgres-site-will-migrate-to-django/ During PostgreSQL BOF at OpenSourceBridge, Josh Berkus announced the site was going to be migrated to Django (from what is currently a mishmash of PHP scripts). -- You received this message because you are subscribed to

Re: File Upload with Progress Bar

2010-06-03 Thread Brad Pitcher
Whoops! Just read that the django dev server is not multithreaded so it will not work. But you should be able to use any web server along with an upload_progress view as long as your web server streams the upload in progress to django. I think my troubles may be because the web server isn't

Re: utf8-problems

2010-06-03 Thread kirian
just guessing.. are you developing on a windows machine and your encoding problems occure on a linux machine? did you tried the smart_str and smart_unicode functions!? these solved all my encoding problems.. from django.utils.encoding import smart_str, smart_unicode On 3 Jun., 11:18, "Henrik

Re: form.as_p, as_table variation

2010-06-03 Thread Bill Freeman
Actually, you might try adding them in your form's __init__ method, again, after calling the superclass method. I've done this with choices on a field. Since self.fields is a deep copy, you might be safe setting an attrs attribute on the field's widget:

this field is required

2010-06-03 Thread luca72
hello at all. during the renderig of a form in any required field is write "this field is required", how i can overwrite this or delete it. Thanks Luca -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Filtering

2010-06-03 Thread Dmitry Dulepov
Hi! Mat wrote: > Okay so I am trying to figure out how to do the following. I have some > data in a table that users don't need to see but they need to see > other data in the same table. So I am trying to figure out if there is > any way to do a "global" filter so i don't have to do an exclude

Re: utf8-problems

2010-06-03 Thread Dmitry Dulepov
Hi! Henrik Genssen wrote: > on my dev-system: > character_set_database => latin1 > > on production: > character_set_database => utf-8 > > my testsystem is the one that works. > Does the above have any influence on my requests, as both tables are utf-8? It shouldn't if your database has a

Re: form.as_p, as_table variation

2010-06-03 Thread Thomas Allen
On Jun 3, 12:05 pm, Thomas Allen wrote: > I'm able to get pretty far with the template tag approach. The trouble > is that BoundForms offer no way to directly add attributes, which I > think can only be included when defining the form field in question. Actually if I

Re: form.as_p, as_table variation

2010-06-03 Thread Thomas Allen
On Jun 3, 12:00 pm, Bill Freeman wrote: > If you can't use _html_output, then you have to duplicate a lot of > it's functionality. I'm able to get pretty far with the template tag approach. The trouble is that BoundForms offer no way to directly add attributes, which I think

Re: form.as_p, as_table variation

2010-06-03 Thread Bill Freeman
If you can't use _html_output, then you have to duplicate a lot of it's functionality. That's a lot internals, and you would have to track any changes with revisions. Of course, _html_output is, itself, an internal, according to the naming conventions. If what you're wanting to do is change the

Re: File Upload with Progress Bar

2010-06-03 Thread Venkatraman S
Oh yes! I was referring to a stand alone app. I heard someone complain #django that filebrowser aint working right after uploadify was introduced. Is that True? On Thu, Jun 3, 2010 at 8:11 PM, patrickk wrote: > http://code.google.com/p/django-filebrowser/ > > cheers, >

form.as_p, as_table variation

2010-06-03 Thread Thomas Allen
How can I create my own form renderer, like as_p, as_table, etc? I see that the form class provides _html_output to assist in formatting markup like this, but that substitution technique does not provide enough control for what I am doing, where certain properties of the field in question affect

Something like admin.StackedInline where 'extra'

2010-06-03 Thread jeremy07
Hi, I have a simple booking app where first form gets number of travelers. Based on that number I need to generate another form with number of rows equal to entered number of travelers to get their names. Something like admin.StackedInline where 'extra' would be a number of travelers. Any idea?

Re: File Upload with Progress Bar

2010-06-03 Thread patrickk
http://code.google.com/p/django-filebrowser/ cheers, patrick On 3 Jun., 16:10, Venkatraman S wrote: > Hi Patrick, > > Can you share a simple django app which uses Uploadify?  Did you use vanilla > Uploadify or django-uploadify(github.com/tstone/django-uploadify*)*? > I have

Re: Filtering

2010-06-03 Thread Daniel Roseman
On Jun 3, 3:17 pm, Mat wrote: > Okay so I am trying to figure out how to do the following. I have some > data in a table that users don't need to see but they need to see > other data in the same table. So I am trying to figure out if there is > any way to do a "global"

Filtering

2010-06-03 Thread Mat
Okay so I am trying to figure out how to do the following. I have some data in a table that users don't need to see but they need to see other data in the same table. So I am trying to figure out if there is any way to do a "global" filter so i don't have to do an exclude on every query of that

Re: File Upload with Progress Bar

2010-06-03 Thread Venkatraman S
Hi Patrick, Can you share a simple django app which uses Uploadify? Did you use vanilla Uploadify or django-uploadify(github.com/tstone/django-uploadify*)*? I have been simply unable to make it run. I also tried a django-uploadify, but no results! Frustrating it is. If you can share the code,

Changing AdminSite object

2010-06-03 Thread Mohammad Tayseer
Hello Djangonauts, I want to change the app index page so I add help text to the models themselves, e.g. under each model I want to add help text. I know that I should override AdminSite.app_index. What is the best way to do this? Mohammad Tayseer http://mtayseer.net -- You

Re: Google maps like app for Django for small area?

2010-06-03 Thread Stodge
Thanks. I already know about geodjango but that's not the whole solution from my understanding. Though searching again for geodjango I eventually found MapServer, TileCache and OpenLayers. I *think* this might be what I'm looking for. On Jun 2, 9:54 pm, Sam Walters wrote: >

Re: ImportError: No module named django.core

2010-06-03 Thread illuminated
Hi Nuno, Thanks for helping, but it turned out it has nothing to do with the PYTHONPATH but with access rights of the /usr/local and /usr/local/lib (http://blog.petrovic.gr/lang/en-us/2010/05/importerror-no-module- named-django-core/) Thanks, On May 31, 11:55 am, Nuno Maltez

RE: Re: utf8-problems

2010-06-03 Thread Henrik Genssen
>I would also check character sets in "show create table" in both environments. output of both create table statements are equal both are tables are utf-8, collatetion utf8_general_ci >show variables like 'character_set_%' on my dev-system: character_set_database => latin1 on production:

Re: Unable to import libxml2mod from the python script

2010-06-03 Thread Jeliuc Alexandr
You can use ipython or simple idle to see it /usr/local/lib/python2.5. but /bin/python are you sure about default version? On Jun 3, 3:06 pm, Darren wrote: > Go to  /usr/local/bin and do ls -l and see if python is a sym link. If   > so, see where it points and verify it

Re: File Upload with Progress Bar

2010-06-03 Thread patrickk
you could use uploadify, see http://www.uploadify.com/. of course, it´s not an ideal solution since its flash-based. we´ve been using uploadify with django and the filebrowser for about a year now and it works quite well. regards, patrick On 3 Jun., 06:32, Venkatraman S

Re: Unable to import libxml2mod from the python script

2010-06-03 Thread Darren
Go to /usr/local/bin and do ls -l and see if python is a sym link. If so, see where it points and verify it points to python25. Your modules are here: /usr/local/lib/python2.5/site-packages Verify that the python executable matches. Darren On Jun 2, 2010, at 9:38 PM, Superman

Re: utf8-problems

2010-06-03 Thread Dmitry Dulepov
Hi! Henrik Genssen wrote: > I do have utf-8 problems again. > My dev-system works, my stage system works, too - but production does not. > And I do not see the error :-( > As I think, it is a misconfiguration problem, do we have a checklist, what > and where to search for or test? > I have seen

Re: Establish "reverse relationships" between models?

2010-06-03 Thread Dmitry Dulepov
Hi! derek wrote: > when > iterating through Buiding objects, a call to display > "alarm.manufacturer__name" gives me an "AttributeError: 'Building' > object has no attribute 'alarm'". Clearly, this is because, from the > building point of view, there is no known relationship to Alarm. class

Re: Integrating Django with a legacy but active database

2010-06-03 Thread Russell Keith-Magee
On Thu, Jun 3, 2010 at 7:48 PM, kakarukeys wrote: > On Jun 3, 7:23 pm, Russell Keith-Magee > wrote: >> On Thu, Jun 3, 2010 at 6:31 PM, kakarukeys wrote: >> > I am developing a django web app which does some web publishing >> >

Re: Integrating Django with a legacy but active database

2010-06-03 Thread kakarukeys
On Jun 3, 7:23 pm, Russell Keith-Magee wrote: > On Thu, Jun 3, 2010 at 6:31 PM, kakarukeys wrote: > > I am developing a django web app which does some web publishing > > (pushing some data to website). My customer is already using > >

Re: Integrating Django with a legacy but active database

2010-06-03 Thread Russell Keith-Magee
On Thu, Jun 3, 2010 at 6:31 PM, kakarukeys wrote: > I am developing a django web app which does some web publishing > (pushing some data to website). My customer is already using > ExpressionEngine 2.0 for publishing, hopes that I can reuse the CMS > for any publishing

Re: Establish "reverse relationships" between models?

2010-06-03 Thread Daniel Roseman
On Jun 3, 11:40 am, derek wrote: > I have a situation which is parallel to the following: > > class Building(models.Model): >     id = models.AutoField(primary_key=True) >     name = models.CharField(max_length=100) >     def __unicode__(self): >         return self.name > >

Establish "reverse relationships" between models?

2010-06-03 Thread derek
I have a situation which is parallel to the following: class Building(models.Model): id = models.AutoField(primary_key=True) name = models.CharField(max_length=100) def __unicode__(self): return self.name class Manufacturer(models.Model): name =

Integrating Django with a legacy but active database

2010-06-03 Thread kakarukeys
I am developing a django web app which does some web publishing (pushing some data to website). My customer is already using ExpressionEngine 2.0 for publishing, hopes that I can reuse the CMS for any publishing purpose. They does not wish to redevelop the web publishing platform in Django. I'm

Re: utf8-problems

2010-06-03 Thread kanniga sivasubramanian
Yes, you are right. The mysql was not installed correctly. I uninstall that. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to

utf8-problems

2010-06-03 Thread Henrik Genssen
Hi, I do have utf-8 problems again. My dev-system works, my stage system works, too - but production does not. And I do not see the error :-( As I think, it is a misconfiguration problem, do we have a checklist, what and where to search for or test? I have seen utf problems several times on the

Re: utf8-problems

2010-06-03 Thread Fabian Rothfuchs
can you post your MySQL encoding / charset ? what kind of exceptions do you experience ? Cheers Fabian On Jun 3, 2010, at 11:18 AM, Henrik Genssen wrote: > Hi, > > I do have utf-8 problems again. > My dev-system works, my stage system works, too - but production does not. > And I do not see

Re: Getting Duplicate records with Q query

2010-06-03 Thread Thomas Guettler
Hi Lee, search for "distinct", to filter duplicates. But I don't know why one returns no duplicates. HTH Lee Hinde wrote: > Hi; > > Goal is to get a list of notes that include all those created or > addressed to the current user, within the last few days. > > Model is a Note, with a

Re: Class in a Class

2010-06-03 Thread JF Simon
OK, Events is not in the 'global' scope ! Thanks (i'm tired) On 3 juin, 07:18, Daemoneye wrote: > class A: >         class B: >                 pass > a=A() > B=A.B() > you should add A. to control the class B > ÔÚ Thu, 03 Jun 2010 12:50:06 +0800£¬JF Simon