Add db tables on-the-fly

2008-06-21 Thread MickaelC
Hi, It is a method to add tables to a model without having to manually launch the syncdb command in a shell? If yes can you give me tips ? else :-( thank you for your helps ! MickaelC --~--~-~--~~~---~--~~ You received this message because you are subscri

Re: Django Book translation (es) finished

2008-06-21 Thread Marcelo Barbero
Manuel: En el ticket #54 me preguntan: "Marcelo, ¿Tenes todavía presente en cuál/cuales capítulos encontraste esto que nos reportas?." Contestales que yo lo empecé a ver en el Capítulo 4. No sé si después habrá más casos, pero calculo que sí. Marcelo Barbero --~--~-~--~~--

Re: How to validate for duplicate users?

2008-06-21 Thread ristretto . rb
ok, just wanted to make sure it wasn't something that User.save() or whatever would for me. I thought since User defines 'username' and sets it as unique, then it would validate that and possibly raise an Error for clients (like Forms) to catch. I'll impl that in my subclasses form. Thanks. O

auth context processor setup

2008-06-21 Thread mcordes
Hello, Is there anything I need to do to enable the auth context processor other than adding "django.core.context_processors.auth" to TEMPLATE_CONTEXT_PROCESSORS in my settings.py? I'd like to be able to access the 'auth user' object in my various templates, which from what I understand this pro

Re: help - limit_choices_to

2008-06-21 Thread Karen Tracey
On Sat, Jun 21, 2008 at 9:23 PM, M.Ganesh <[EMAIL PROTECTED]> wrote: > > Hi All, > > This question might have been answered so may times, but I am unable to > glean the information I am looking for from the 260 odd entries that > turn up while searching the mailing-list archives. So here I ask aga

Re: How to validate for duplicate users?

2008-06-21 Thread chefsmart
Override the default save method of the model. In you custom method, do User.objects.get(username=desired_username). If a user does not exist, you will get an ObjectDoesNotExist exception. Create the user _if_ you get the exception. On Jun 22, 8:24 am, ristretto.rb <[EMAIL PROTECTED]> wrote: > I

Re: Automatic Update of template

2008-06-21 Thread Karen Tracey
On Sat, Jun 21, 2008 at 9:13 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Let me give more details.. > > I am trying to write a web-based multi-protocol client. There is an > opensource messenger Pidgin. Pidgin also comes with a dbus interface > with which, you can talk to pidgin, and do a

Re: Django on apache and mod_python.... and problems

2008-06-21 Thread Will Larson
Hi, > The summary of error messages is this: > >> AttributeError: 'module' object has no attribute 'blog' > > I've made sure that /papastudio/blog has __init.py__, and that it's > listed in INSTALLED_APPS (which is logical since the site actually > works if I ./manage.py runserver). Did you follo

Re: Django on apache and mod_python.... and problems

2008-06-21 Thread Karen Tracey
On Sat, Jun 21, 2008 at 9:02 PM, foxbunny <[EMAIL PROTECTED]> wrote: > > Hi, list, > > I'm trying to deploy a very simple Django app, and it's driving me > crazy. I've followed the docs and set up Apache with mod_python. Then > I uploaded the app, did syncdb, and everything works when I ./ > manag

How to validate for duplicate users?

2008-06-21 Thread ristretto . rb
I have a form like this What is the best way to validate for an already existing User when using the django.contrib.auth.models.User and the new forms authentication system? Overiding Form.clean(), and adding some uniqueness validation code works, but binds the form to the DB. There's not much

Re: How to execute method in template?

2008-06-21 Thread Eric Abrahamsen
On Jun 22, 2008, at 11:00 AM, Kenneth McDonald wrote: > > Notice the call on "greeting.key()". However, unless I'm missing > something, there is no way to actually invoke a method from within a > Django template. Hi Kenneth, Leaving the parentheses off after greeting.key will actually result in

How to execute method in template?

2008-06-21 Thread Kenneth McDonald
Is there a way to execute a method in a template? I'm just learning the Google App Engine, and would like to be able to insert the key value for an entity along with the data for that entity: So, I want something similar to this: {% for greeting in greetings %} {% if greeting.aut

help - limit_choices_to

2008-06-21 Thread M.Ganesh
Hi All, This question might have been answered so may times, but I am unable to glean the information I am looking for from the 260 odd entries that turn up while searching the mailing-list archives. So here I ask again #my models class entity(models.Model): name = models.Charfield()

Re: Automatic Update of template

2008-06-21 Thread [EMAIL PROTECTED]
Let me give more details.. I am trying to write a web-based multi-protocol client. There is an opensource messenger Pidgin. Pidgin also comes with a dbus interface with which, you can talk to pidgin, and do all the stuff provided by pidin through scripts. Pidgin has signal handling system. For c

Django on apache and mod_python.... and problems

2008-06-21 Thread foxbunny
Hi, list, I'm trying to deploy a very simple Django app, and it's driving me crazy. I've followed the docs and set up Apache with mod_python. Then I uploaded the app, did syncdb, and everything works when I ./ manage.py runserver on the remote host, but httpd won't serve it. I'm using Django trun

Re: blankiing an ImageField

2008-06-21 Thread Carl Karsten
Amit Ramon wrote: > * Carl Karsten <[EMAIL PROTECTED]> [2008-05-25 17:25 -0500]: >> In the admin UI, is there any way to blank out a foo = >> model.ImageField(...) ? >> >> Carl K > > > foo = model.ImageFields(..., editable=False) > No. (unless I am missing some unexpected use of editable) If

Re: method="POST" form problems. Help required

2008-06-21 Thread [EMAIL PROTECTED]
That clears everything. Thanks a lot. -Priyank On Jun 21, 4:46 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Sat, Jun 21, 2008 at 7:36 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> > wrote: > > > > > Atlast, I found the bug, login.html inherits from base page. So, the > > form mentioned in the

Re: method="POST" form problems. Help required

2008-06-21 Thread Karen Tracey
On Sat, Jun 21, 2008 at 7:36 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Atlast, I found the bug, login.html inherits from base page. So, the > form mentioned in the above code is nested inside a GET form. > > Now I get one doubt. Can't we nest the forms? Does nesting of forms > make sen

Re: model inheritance and admin (qs-rf & nf-a)

2008-06-21 Thread felix
regarding Model Inheritance and the admin I've checked out the newforms-admin branch now. Its wonderful! Lots of great solutions. As of the other day its only a few revisions away from the trunk. (the trunk is being merged into newforms-admin) with Model inheritance the pointer field (to the

Re: method="POST" form problems. Help required

2008-06-21 Thread [EMAIL PROTECTED]
Atlast, I found the bug, login.html inherits from base page. So, the form mentioned in the above code is nested inside a GET form. Now I get one doubt. Can't we nest the forms? Does nesting of forms make sense in any context? On Jun 21, 4:12 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >

Re: method="POST" form problems. Help required

2008-06-21 Thread [EMAIL PROTECTED]
Yeah.. That is one bug. But that is not the reason. Because, execution is not going inside the if condition. request.method is GET instead of POST. So anything inside the if condition shouldn't matter. Any other bugs? I am so much tired of this mysterious looking bug Thanks, Priyank. On Jun 21,

Re: method="POST" form problems. Help required

2008-06-21 Thread Jeff FW
Looks like you forgot a return statement in the if statement. Not sure if that would cause what you're seeing, but it certainly couldn't help. -Jeff On Jun 21, 6:46 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I forgot to post the problem. After clicking the 'Login' button, > Httpreques

Re: method="POST" form problems. Help required

2008-06-21 Thread [EMAIL PROTECTED]
I forgot to post the problem. After clicking the 'Login' button, Httprequest is submitted with method GET instead of POST. When I tried to view the local variables, I am getting the form variables in GET data and I am getting POST data as No data. Sorry for the trouble. Thanks, Priyank On Jun 2

method="POST" form problems. Help required

2008-06-21 Thread [EMAIL PROTECTED]
Hi, I am having problems with POST. I am aware of this newbie mistake http://code.djangoproject.com/wiki/NewbieMistakes#POSTtoviewslosesPOSTdata Could someone help me out. -- My view is lass LoginForm( forms.Form):

Just switched to trunk - Special unicode handling is making me less than happy

2008-06-21 Thread Devin Venable
I'm having to add calls that look like this to my code so that stuff doesn't blow up when passing model strings to other libraries: oldsteadylib.func( smart_str(str) ) # forcing unicode back to bytestring Ouch. Ugly. Reminds me of the bad old days of working with strings in C++. >From what I

Re: very heavy problem with edit_inline

2008-06-21 Thread Scott Moonen
Yes, I think it is incorrect. It should be set on some field that the user can type in and which must not be blank. Then, when that field is left blank, the admin will actually delete the address. I recommend setting core=True on the indirizzo field. -- Scott On Sat, Jun 21, 2008 at 2:39 PM,

Re: very heavy problem with edit_inline

2008-06-21 Thread Alessandro Ronchi
2008/6/21, Scott Moonen <[EMAIL PROTECTED]>: > Alessandro, see the documentation for the "core" model field option: > http://www.djangoproject.com/documentation/model-api/#core > > You should set core=True on some field that must otherwise be present in an > address. Looks like "indirizzo" is such

Re: Why PostgreSQL?

2008-06-21 Thread Jeff FW
I, apparently, need to learn to actually look at code before opening my mouth. I had never actually used the dumpdata command (I usually just used the database server's dump feature), so I didn't realize that it doesn't actually dump just straight SQL. Of course, had I thought about it (instead

user login problem

2008-06-21 Thread R. K.
So the problem is, that I can't login regular users, who has is_staff field set to false. If it is set to true, everything is fine. So now what I have: default login function (django.contrib.auth.views.login) and the view which renders the page after login has django.contrib.auth.decorators.login_

Re: User Profile in Admin interface (using trunk)

2008-06-21 Thread Johan Liseborn
On Sat, Jun 21, 2008 at 02:46, ristretto <[EMAIL PROTECTED]> wrote: > > Was there any solution to this? I'm looking through the tickets, > wiki, docs, web, and now the source trying to figure out how to get my > profile data saved along with a User in the admin. Anyone have that > working? My

Re: Thanks!!!!!!!!!!!!!!!!!

2008-06-21 Thread Jeffrey Johnson
+1 --~--~-~--~~~---~--~~ 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 PROTECTED] For more opt

Re: Thanks!!!!!!!!!!!!!!!!!

2008-06-21 Thread Ariel Mauricio Nunez Gomez
+1 --~--~-~--~~~---~--~~ 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 PROTECTED] For more opti

Re: Why PostgreSQL?

2008-06-21 Thread Russell Keith-Magee
On Sat, Jun 21, 2008 at 10:19 PM, Jeff FW <[EMAIL PROTECTED]> wrote: > > On Jun 21, 12:46 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> > wrote: >> AFAICT, that's the same idea suggested on #3615. The discussion on >> that ticket describes why it's not the final solution. >> > Ah, I didn't see tha

Re: flatpage for 404

2008-06-21 Thread Karen Tracey
On Sat, Jun 21, 2008 at 8:19 AM, mark <[EMAIL PROTECTED]> wrote: > > I think I found an acceptable solution now. > > I added the following to the files in my project directory... > urls.py: > ... > handler404 = 'mysite.views.page_not_found' > handler500 = 'mysite.views.server_error' > > views.py:

Re: TemplateDoesNotExist at /admin/

2008-06-21 Thread Karen Tracey
On Sat, Jun 21, 2008 at 9:22 AM, sggottlieb <[EMAIL PROTECTED]> wrote: > Thanks Karen! That was the issue. > Glad that was it, and it sounds like you could fix the symptom. To get a real fix implemented it would be helpful for you to post details of your system (new install, upgrade from an ear

Re: Why PostgreSQL?

2008-06-21 Thread Jeff FW
On Jun 21, 12:46 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Fri, Jun 20, 2008 at 9:14 PM, Jeff FW <[EMAIL PROTECTED]> wrote: > > > I haven't yet used Django's dumpdata and loaddata, but I've used > > mysqldump about a million times. (That's mostly what we use at my > > job, though

session logout not being deleted

2008-06-21 Thread ristretto . rb
I've noticed a couple posts on this subject, but I don't understand what's going on. Can someone please explain. The 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,

Re: very heavy problem with edit_inline

2008-06-21 Thread Scott Moonen
Alessandro, see the documentation for the "core" model field option: http://www.djangoproject.com/documentation/model-api/#core You should set core=True on some field that must otherwise be present in an address. Looks like "indirizzo" is such a field. -- Scott On Sat, Jun 21, 2008 at 7:37 AM

Re: TemplateDoesNotExist at /admin/

2008-06-21 Thread sggottlieb
Thanks Karen! That was the issue. --Seth On Jun 21, 12:49 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > 2008/6/20 sggottlieb <[EMAIL PROTECTED]>: > > > > > Hello all, > > > I am running 0.96 and and was breezing through the tutorials until I > > hit the part where you enable the admin site (h

Re: Extending the method that is called the first time a model is deployed.

2008-06-21 Thread Alex Koshelev
try `class_prepared` or `post_syncdb` signals On Jun 21, 3:43 pm, mwebs <[EMAIL PROTECTED]> wrote: > I want to register a specific model(not an object of the model, the > model itself) in another model. > This should be done the first time the model is deployed with syncdb. > > So what I need is

Re: flatpage for 404

2008-06-21 Thread mark
I think I found an acceptable solution now. I added the following to the files in my project directory... urls.py: ... handler404 = 'mysite.views.page_not_found' handler500 = 'mysite.views.server_error' views.py: from django.contrib.flatpages.views import flatpage ... def page_not_found(request)

Re: CSS not working in exe

2008-06-21 Thread johan de taeye
For my frePPle project, I have been using py2exe to package a standalone django application. See here for my manage.py script: http://frepple.svn.sourceforge.net/viewvc/frepple/trunk/contrib/installer/manage.py?revision=640&view=markup Here's a patch for the django code to make also the django

Re: Thanks!!!!!!!!!!!!!!!!!

2008-06-21 Thread mwebs
I saw this an I had no other chance than to join the THANKS-Post. Django is a revolution for all the webdeveloppers that had a undesirable life under the lordship of all these php-frameworks. I LOVE DJANGO, and python too. Poetry pure! THANK YOU DJANGO-PEOPLE --~--~-~--~~

Re: user profile is not getting saved in admin

2008-06-21 Thread Alessandro Ronchi
2008/6/21 ristretto <[EMAIL PROTECTED]>: >> > I have looked through the docs and search the group and web. Seems other's >> > are asking the question, but I haven't seen an answer yet. I have the same problem, but with every edit_inline foreign key. -- Alessandro Ronchi Skype: aronchi http://w

Extending the method that is called the first time a model is deployed.

2008-06-21 Thread mwebs
I want to register a specific model(not an object of the model, the model itself) in another model. This should be done the first time the model is deployed with syncdb. So what I need is the function that is called the first time a model is deployed, so that I can extend this function and regist

very heavy problem with edit_inline

2008-06-21 Thread Alessandro Ronchi
I am trying to let admin users edit related field in one single page. I have a company model that has many addresses, so I've decided to use a Company model and an Address model with foreignkey(Company, edit_inline=models.STACKED) It works correcly until I've edit the company: IT DELETES ALL MY AS

Re: flatpage for 404

2008-06-21 Thread mark
> Lookup django.conf.urls.defaults module how handler404 is defined and > override it by assigning your view function in your application hmm, here is what the documentation says: >>>A string representing the full Python import path to the view that should be >>>called if none of the URL patter

Re: Thanks!!!!!!!!!!!!!!!!!

2008-06-21 Thread chefsmart
Thanks... I was going mad trying out one PHP framework after another to match each one to a particular project's requirements. I spent more than 4 months doing that -- and I think I'm pretty decent in PHP. The deadline for my project was drawing closer, with the client poking me with a red hot iro

Re: upload is working, but how to store the path in the imagefield?

2008-06-21 Thread chefsmart
I'm using the code below. This uploads the image file just fine. But, in the database, the table field corresponding to the image field of the model remains empty. Here < image=form.cleaned_data['image'],> is happening before the save_FOO_file so I can understand that nothing gets saved in the dat

Re: flatpage for 404

2008-06-21 Thread Peter Melvyn
On 6/21/08, mark <[EMAIL PROTECTED]> wrote: > I do not like the django default behaviour for 404 pages since I do > not want to create a 404.html template. I like my flatpages a lot > especially the default.html template I created earlier. Therefore I > would like django to use my default.htm

flatpage for 404

2008-06-21 Thread mark
Hi there, I do not like the django default behaviour for 404 pages since I do not want to create a 404.html template. I like my flatpages a lot especially the default.html template I created earlier. Therefore I would like django to use my default.html template to display the 404 and use the '/40

Re: upload is working, but how to store the path in the imagefield?

2008-06-21 Thread Bradley Wright
It gets saved to your MEDIA_ROOT directory, unless you specify: http://www.djangoproject.com/documentation/model-api/#filefield image = models.ImageField(upload_to='some/path') which will upload the image to that directory under the MEDIA_ROOT path. If you're using a custom form, you also ne

Re: Djangodomain.com is down for the hole day

2008-06-21 Thread bavarianmot
We hosting it there. It has been a big fault in data center, something with networking... Otherwise we are very happy with service... Prompt respond and a lot of help ( for free - what could be better? ) IMHO --- Ernst --~--~-~--~~~---~--~~ You received this m

Re: email this page

2008-06-21 Thread Peter Melvyn
On 6/20/08, Support Desk <[EMAIL PROTECTED]> wrote: > submit button. That will send an email containing all the rendered > information. If *all* should mean that you want to send HTML in-line message including related media (images), you have to: 1. compose MIME message having subparts as follo