Re: Say hi.

2006-11-28 Thread Kamil Wdowicz
Hi 06-11-28, Jarosław Świerad <[EMAIL PROTECTED]> napisał(a): > > I just want to say: Hi to all. > > I'm a new django user and hopefully this is a right place to stay and > set/get informations! > > See You in net, > > Messer. > > > > --~--~-~--~~~---~--~~ You rec

OneToOneField

2006-11-28 Thread Ed
Hello, seems like the OneToOneField is broken in the sense that the any model with such field with hit the db whenever the field is accessd. An example: class Client(models.Model): account = models.OneToOneField(ClientAccount) class ClientAccount(models.Model): balance = models.IntegerFiel

RE: utf-8 with MySQL

2006-11-28 Thread Ryan Ginstrom
Thanks a lot for the tips. I was able to find a somewhat hackish solution. > From: django-users@googlegroups.com > - If you're using a version of MySQL prior to 4.1, you should > consider upgrading. 4.1 has a lot more support for unicode. Using 4.1.11 > - Are you *sure* that your entire data

Re: Re: Help with getting connection.queries info

2006-11-28 Thread James Bennett
On 11/28/06, Eric Floehr <[EMAIL PROTECTED]> wrote: > Does this mean that connection.queries isn't "global"? When do > connections get created and destroyed? How can I dump an array of ALL > queries and query times since the server started? The value of 'connection.queries' will persist only as

Re: Help with getting connection.queries info

2006-11-28 Thread Eric Floehr
Thanks James, that makes sense! I think I still have a problem though...I was trying a simple example of a problem I am having. I wanted to create a page that would show all the queries and their times, for performance checking. So I would do various things on the website, which would get actua

Re: Help with getting connection.queries info

2006-11-28 Thread James Bennett
On 11/28/06, Eric Floehr <[EMAIL PROTECTED]> wrote: > >>> DEBUG=True > >>> from myapp.models.references import Stuff > >>> from django.db import connection > >>> p = Stuff.objects.all() > >>> print connection.queries > [] This doesn't add anything to 'connection.queries' because it hasn't actuall

Help with getting connection.queries info

2006-11-28 Thread Eric Floehr
Hi! I am trying to benchmark query times, and I can't seem to get connection.queries to have anything except when I run cursor().execute() myself. Here is an example to better illustrate my question: >>> DEBUG=True >>> from myapp.models.references import Stuff >>> from django.db import connecti

A little help

2006-11-28 Thread Jim Fritchman
I am hoping some of you can give me a little start as to where I can read how to alter some of the admin pages. I have a a Person class in my model and I want to change both the view of people plus I want to change the form page where people are added and deleted. Any links or examples or tutori

Re: Updating multiple models with one form submission

2006-11-28 Thread yun
I can't say that I know the answer since I haven't tried it, yet. In the example that I referenced, the fields were defined and set in the manipulator class. You might be able to to do this as two different forms, that appear on the same page, the javascript may update an ingredient model through

Re: Updating multiple models with one form submission

2006-11-28 Thread flynnguy
Thanks yun, it seems I need to look into a custom manipulator. I do have one question though... Can you have an arbitrary number of form fields or do you have to define them all in the manipulator? An example would be if I want to be able to add ingredient fields (with javascript) so I would say

Re: manage.py webserver

2006-11-28 Thread Ivan Sagalaev
[EMAIL PROTECTED] wrote: > Now with django, I am trying to run through the "Are you generic" > tutorial. When I go out to the URL, I get a 404 "Page not found" > message, but absolutely no more information as to where to look! I > thought by using the devel version with the verbosity flag, i

Re: manage.py webserver

2006-11-28 Thread James Bennett
On 11/28/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Now with django, I am trying to run through the "Are you generic" > tutorial. When I go out to the URL, I get a 404 "Page not found" > message, but absolutely no more information as to where to look! I > thought by using the devel v

manage.py webserver

2006-11-28 Thread [EMAIL PROTECTED]
Hi! I'm starting to, once again, get really frustrated with Django. I want to learn it so bad, but yet I keep failing! My next problem is with the internal webserver Django uses. Is there some sort of detailed log file that one can look at to debug the program? For example, with PHP a

Re: Why not Django

2006-11-28 Thread Jacob Kaplan-Moss
On 11/28/06 3:21 PM, [EMAIL PROTECTED] wrote: > I appologize for rather provocative subject line. I just want to tell > all why I could not use Django and had to use TurboGears > instead, even though I like Django more. I wrote this memo > for internal use, and then desided to post it inhere. I'm

Re: Why not Django

2006-11-28 Thread Adrian Holovaty
On 11/28/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Thus, the absence (or different meaning) of table inheritance and > FloatField made the choice of TurboGears over Django for our > project. Hey V. Chukharev, Thanks for this detailed critique, and good luck with your project! Everybody

Re: Session problems

2006-11-28 Thread Graham Dumpleton
Brian Ray wrote: > Graham: > > This behavior has been seen with mod_python under certian instances. > For example how to the settings in httpd.conf effect this? For example, > "PythonAutoReload On" and apache's MaxRequestsPerChild 1. Maybe they > can aggravate a problem when something else is go

Re: mod_python : admin can run django apps, but not mine?

2006-11-28 Thread goodieboy
sorry for the self replies! But just wanted to say that I *have* done syncdb a few times. And even cleared my database before doing so. syncdb output looks great. Still nothing through apache/mod_python. I have about four applications that should be there. On Nov 28, 4:31 pm, "goodieboy" <[EMAIL

Re: Updating multiple models with one form submission

2006-11-28 Thread yun
You can modify multiple models with the same view. I've managed to do it, but involved creating my own manipulator. This isn't nearly as scarry as it sounds, once you understand what's going on. I posted what I did on a http://ssy5.blogspot.com/2006/11/taking-care-of-registration.html";>blog . The

Re: mod_python : admin can run django apps, but not mine?

2006-11-28 Thread goodieboy
If I use curl: $ curl -i http://pyshop.dev/admin HTTP/1.1 301 Moved Permanently Date: Tue, 28 Nov 2006 21:36:14 GMT Server: Apache/2.2.3 (Unix) mod_python/3.2.10 Python/2.5 Vary: Cookie Location: http://pyshop.dev/admin/ Content-Length: 0 Content-Type: text/html; charset=utf-8 On Nov 28, 4:31

mod_python : admin can run django apps, but not mine?

2006-11-28 Thread goodieboy
Hi, runserver is working fine for my applications. But when I switch over to mod_python and apache2, I only see the Users, Groups and Sites applications. My applications are not there? The settings are being read, the database connection is working; I can add/edit/delete users/groups and sites. I

Say hi.

2006-11-28 Thread Jarosław Świerad
I just want to say: Hi to all. I'm a new django user and hopefully this is a right place to stay and set/get informations! See You in net, Messer. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

Why not Django

2006-11-28 Thread tchoukharev
I appologize for rather provocative subject line. I just want to tell all why I could not use Django and had to use TurboGears instead, even though I like Django more. I wrote this memo for internal use, and then desided to post it inhere. I have been involved in an initial development of databas

Re: manage.py can't see project

2006-11-28 Thread [EMAIL PROTECTED]
Yup... like I said, the models and templates and all appear to see it no problem. It's looks like it's just manage.py that's not seeing it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To p

Re: manage.py can't see project

2006-11-28 Thread [EMAIL PROTECTED]
did you add it to your settings.py installed apps section? --~--~-~--~~~---~--~~ 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

manage.py can't see project

2006-11-28 Thread [EMAIL PROTECTED]
Another weird error since I changed servers and went from fcgi to mod_python. I have nesh.thumbnails installed alongside my main project, it's in installed apps, and the models and templates see it fine. Manage.py, on the other hand, doesn't. When I run python2.4 manage.py validate (or manage.py

a question about close the database connection after a request finished

2006-11-28 Thread [EMAIL PROTECTED]
django will close the database connection after a request finished, and i read the source code django/db/__init__.py, i think the behavior cause by the code 'dispatcher.connect(self.close, signal=signals.request_finished)' in class ConnectionInfo, but very strange, i modify the source code like t

auto updating a model

2006-11-28 Thread jelle
I have a model in which I'm using the GenericRelation model for tagging. Here I'm using tagging purely as a method for structuring content throughout the global site, its not ment for users to tag objects. Since the GenericRelation isn't (yet?) fully integrated to the admin site, I'm using a Many

Strange Proxy error

2006-11-28 Thread [EMAIL PROTECTED]
I just moved my Django stuff from Dreamhost to Webfaction, and have been trying to track down a lot of weird problems since the move. One of the oddest is this proxy error problem. If the user attempts to update their profile, it throws a proxy error if the "state" field is in the form. The templ

Re: Session problems

2006-11-28 Thread Brian Ray
Jakub: Why not temporarily switch to SCGI and see if the symptoms goes away? You need to concrete-ize this problem. BTW, is the cookie even being set on the browser. What version of mod_python? Did you compile yourself? Graham: This behavior has been seen with mod_python under certian instance

Re: View on Site link from Admin

2006-11-28 Thread canen
Define the get_absolute_url method in your model. E.g class Entry(models.Model): title = models.CharField(maxlength=200) .. def get_absolute_url(self): return "/entry/%s/" % (self.title) Hope that helps. On Nov 28, 12:12 pm, Dirk Eschler <[EMAIL PROTECTED]> wrote: > Am

Re: View on Site link from Admin

2006-11-28 Thread Dirk Eschler
Am Dienstag, 28. November 2006 18:03 schrieb conrad22: > How do I get the 'View on site' link that appears in the Django > interface to work? > I've tried adding the following to my urls.py > > (r'^r/', include('django.conf.urls.shortcut')), > > > But didn't do anything! > > Thanks! You have to a

View on Site link from Admin

2006-11-28 Thread conrad22
How do I get the 'View on site' link that appears in the Django interface to work? I've tried adding the following to my urls.py (r'^r/', include('django.conf.urls.shortcut')), But didn't do anything! Thanks! --~--~-~--~~~---~--~~ You received this message

ManyRelatedManager object in templates

2006-11-28 Thread conrad22
Hi I have two models, A and B, with B having an M2M relationship to A. What is the best way to access/list the 'joined' data in a Django template? Would it be best to define the potential joint data in the _str_ as well? eg. I have the following error appearing, instead of the object: django.db.

Re: Views Tutorials

2006-11-28 Thread [EMAIL PROTECTED]
Actually, I kind of had an idea of maybe a more advanced tutorial about forms and how to process them, upload files, etc. It seems like I am slowly learning the language, but it is hard to get started and understand everything. Thanks! --~--~-~--~~~---~--~~ Yo

Re: 'NoneType' object has no attribute 'get_field_sets'

2006-11-28 Thread conrad22
Many thanks Ramiro. I did as you suggested, and all was fine. I think that it is easy to forget the purpose of the Django admin site, as it is so polished! (ie the purpose, in this case, would be to be able to edit the Categories. Thanks again! --~--~-~--~~~---~--~---

Re: Django AMF

2006-11-28 Thread Condredge
Tomohiro, Great! Thanks! --~--~-~--~~~---~--~~ 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 to [EMA

Updating multiple models with one form submission

2006-11-28 Thread flynnguy
I had a question a while ago about updating multiple models with one form submission but got no responses so I am going to try and reword it and hopefully someone can help me. I have two models, a recipe model and an ingredients model. The ingredient model is simple and just looks like this: cla

Re: utf-8 with MySQL

2006-11-28 Thread jefurii
Hi Ryan, I'm also using Django to work with Japanese text and had similar problems when I was starting. Actually, you're a step ahead of me, since I didn't even know about MySQLdb at that point. :) - If you haven't already, check the Django docs Internationalization page, including the comments

Using forms: filter foreign key relationships?

2006-11-28 Thread Rory Campbell-Lange
I'm working on my first Django app and wondering how to work with a list in a complicated model situation when editing a "Part". Background: Sites belong in Countries; each site has many Parts; each Part has a unique selection list "Types" based on the Country. Part has a foreign key relationsh

Re: Session data remains after logout

2006-11-28 Thread Antonio Cavedoni
Hi Thierry, On 11/28/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I store user data in sessions, for authenticated users. > When the user logs out (I use the view shortcut > django.contrib.auth.views.logout), his/her session data remains. Is there an > easy way to remove all session data af

small solution for numbering rows in paginated tables

2006-11-28 Thread soundseeker
for who it may concern... is far as I know there is no built-in solution for (continuous) numbering rows in paginated tables, so here's mine, maybe it's helpful for someone. paginate_by = 20 paginator = ObjectPaginator(.., paginate_by) page = int(request.GET.get('page', 0)) row_number_offset

Session data remains after logout

2006-11-28 Thread django-user
Hi, I store user data in sessions, for authenticated users. When the user logs out (I use the view shortcut django.contrib.auth.views.logout), his/her session data remains. Is there an easy way to remove all session data after a user logout? I would prefer to avoid wrapping the automated logout i

utf-8 with MySQL

2006-11-28 Thread ginstrom
My site needs to display and edit Japanese text. I have a MySQL database, with the content encoding set to 'utf-8'. If I use raw SQL queries using MySQLdb, I am able to create, edit, and display entries with Japanese text from within django without problems. However, if I use the django models in

Re: Moving from development server to apache

2006-11-28 Thread Chris Ryland
On Nov 28, 1:58 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > say you have an app called 'myapp'. Create a database user called > myapp and give it right to create databases and have a password: > createuser myapp -P > then create the databases: > createdb myapp -U myapp > enter myapp as us

Re: Pickled Objects or Tuples?

2006-11-28 Thread Steven Armstrong
> > Hi! > > Voltron the Django newbie here! Django IS a breath of fresh air and > I´m happy to be programming again in Python after so many years. That > being said; > > 1. How should one go about marshalling objects for storage in Django? > 2. How should one go about storing tuples in Django? Wou

Re: Submission rejected as potential spam (Akismet says content is spam)

2006-11-28 Thread favo
Thanks Don and James. --~--~-~--~~~---~--~~ 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 to [EMAIL PR

problem related to InvalidTemplateLibrary

2006-11-28 Thread ryver
I tried to make a website, called "dame" but when I load the website "http://localhost:8080/mainpage/"; (I made an app called mainpage) I get this error page: InvalidTemplateLibrary at /mainpage/ Template library django.template.loader_tags does not have a variable named 'register' Request Metho

Re: Django + FastCGI Problems

2006-11-28 Thread Gábor Farkas
Uros Trebec wrote: > On Nov 27, 6:55 pm, "Uros Trebec" <[EMAIL PROTECTED]> wrote: > >> ATM, if I go to "http://localhost:8484/django.fcgi"; I only get "403 >> Forbidden" response. > > OK, nevermind... I had to run "django-fcgi.py" too. > http://manuals.textdrive.com/read/book/15 > >> Now, how d

Re: Re: How do you use multiple forms on one page?

2006-11-28 Thread Antonio Cavedoni
On 11/28/06, enigmadude <[EMAIL PROTECTED]> wrote: > Thank you for the info. I checked out the dev version and it looks like > the attrs parameter is the sort of thing I was looking for, concerning > the CSS issue. As for the multiple forms issue, I guess I'll have to > come up with some classes o

Re: Pickled Objects or Tuples?

2006-11-28 Thread voltron
Thank you all for your help. Just one other question, I noticed that one could use a field type called "CommaSeparatedIntegerField" when laying down models, could I use this instead of pickling tuples? What is the difference? Thanks --~--~-~--~~~---~--~~ You re