Re: Django's documention is horrible

2011-01-10 Thread James Bennett
On Tue, Jan 11, 2011 at 12:44 AM, Sam Lai wrote: > This isn't about patches to the existing docs (which are great for > their purpose). It is about Django missing an API reference manual, > something like .NET Class Library Reference > (http://msdn.microsoft.com/en-us/library/gg145045.aspx), PHP's

Re: Django's documention is horrible

2011-01-10 Thread Kenneth Gonsalves
On Mon, 2011-01-10 at 22:25 +0100, Simon W wrote: > Am I the only one who frown upon this? the documentation is excellent - structure needs revamping as it is very difficult to find any thing unless one knows the key words. It was far better uptil circa .96. I have been working on a small scheme o

Re: Configure LAMPP with Django

2011-01-10 Thread Kenneth Gonsalves
On Mon, 2011-01-10 at 11:12 -0500, Javier Guerra Giraldez wrote: > Django is not a page-based template system like PHP. it's a > long-running application that answers web requests. I do not think it is a long running application -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox htt

Re: Django's documention is horrible

2011-01-10 Thread Sam Lai
On 11 January 2011 13:39, Christophe Pettus wrote: > > On Jan 10, 2011, at 1:25 PM, Simon W wrote: > >> For such a good web framework it's a shame that the documention is not >> structured well .. at all. > > I have no doubt that the project would be more than receptive to doc patches > to fix t

Re: Mailing Lists Vs. Forums

2011-01-10 Thread Torsten Bronger
Hallöchen! Kevin Monceaux writes: > [...] > > My main complaint about Google Groups is that I can't download > message archives when I join a group. You can ready it as a newsgroup through Gmane. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: torste

Re: Django's documention is horrible

2011-01-10 Thread Christophe Pettus
On Jan 10, 2011, at 1:25 PM, Simon W wrote: > For such a good web framework it's a shame that the documention is not > structured well .. at all. I have no doubt that the project would be more than receptive to doc patches to fix the problem. -- -- Christophe Pettus x...@thebuild.com --

Re: image servers?

2011-01-10 Thread Dustin
I haven't used Rackspace, but i would assume (hope) they support remote mounting. I would use sshfs to mount the Rackspace server on your local drive (on the Django server) and reference that in MEDIA_ROOT e.g. sshfs usern...@my.rackspace.domain:/path/to/rackspace/home/dir /mnt/ rackspace chang

Re: Django and PIL problem?

2011-01-10 Thread Martin Ostrovsky
What's the value of form.cleaned_data['image']? That IOError is usually thrown when the contents of what you pass in to open() don't constitute a valid image. On Jan 10, 5:26 pm, atcive wrote: > I have the same problem:/ > Anyone cah help? -- You received this message because you are subscribed

Database Table Locks/unlocks (for reading, writing or both)

2011-01-10 Thread Jagdeep Singh Malhi
Hi.. Is Django automatically done the table locking /unlocking concept in case of Mysql/PostGreSQL? if not how I done this manually? -- 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

Re: Mailing Lists Vs. Forums (Was: Django's documention is horrible)

2011-01-10 Thread Kevin Monceaux
On Tue, Jan 11, 2011 at 07:51:55AM +0800, Russell Keith-Magee wrote: > I am yet to meet an online forum interface that doesn't make me want > to gouge my own eyes out. For my money, email is a vastly preferable > interface in almost every respect. Google's Groups could certainly > do with some wo

Re: Django's documention is horrible

2011-01-10 Thread Javier Guerra Giraldez
On Mon, Jan 10, 2011 at 6:51 PM, Russell Keith-Magee wrote: > I am yet to meet an online forum interface that doesn't make me want > to gouge my own eyes out. For my money, email is a vastly preferable > interface in almost every respect. wholeheartedly agree. (and i'm sure not to be the only on

Re: Configure LAMPP with Django

2011-01-10 Thread kRON
I wager that Javier already has the best possible answer, but, nonetheless, I'll try to elaborate it a just a bit more. When a client requests a resource from your Web server that's handled by PHP, what happens is that an instance of PHP is fired that initializes the request data in the globals (l

Re: Reference Form

2011-01-10 Thread Daniel Corbe
i will try On 10 January 2011 17:22, Michael wrote: > I believe a bound field contains a property pointing to it's form, so > you'd do something like: > > field1.form.field2 > > -- > Michael > > On Mon, 2011-01-10 at 17:03 -0200, Daniel Corbe wrote: > > Hi, > > How to get reference of one fie

image servers?

2011-01-10 Thread garagefan
so i bit the hype and got myself a rackspace cloud account. i also got a rackspace file account for image serving. i would like to write something that overrides where all images are saved, regardless of the model that requests the save. what would this be? would i make this a middleware? I assume

Re: Django's documention is horrible

2011-01-10 Thread Russell Keith-Magee
On Tue, Jan 11, 2011 at 5:49 AM, mrmclovin wrote: > Im just curious > why the django project haven't set up any proper forum? I'll address this one. I am yet to meet an online forum interface that doesn't make me want to gouge my own eyes out. For my money, email is a vastly preferable interface

Re: Django's documention is horrible

2011-01-10 Thread James Bennett
On Mon, Jan 10, 2011 at 3:25 PM, Simon W wrote: > For such a good web framework it's a shame that the documention is not > structured well .. at all. It consists of massive text put on a page with > some random examples. But examples is all there is. In other languages and > frameworks I'm used to

Re: Django's documention is horrible

2011-01-10 Thread Shawn Milochik
On Jan 10, 2011, at 5:23 PM, mrmclovin wrote: > Yes, being part of the community is good. But to base help and > solutions by ask&answer is not good for documentation IMO. I don't > like to ask questions because then I have to explain the problem, word > everything right and then wait for an answ

Re: Admin ignores null=True in ForeignKey

2011-01-10 Thread Daniel Roseman
On Monday, January 10, 2011 8:22:01 PM UTC, David Walker wrote: > > If I create a ForeignKey relationship between two Models with null=True, > the Admin seems to still insist on there being a foreign object to link to. > > For example, I created a very simple ForeignKey relationship from Things to

Flatten template?

2011-01-10 Thread Danny W. Adair
Hi, I need to get the template source of a template "after inheritance", i.e. render just the loader tags "include", "extends" and "block" (incl. variable block.super), so that I end up with one independent template which is otherwise unrendered. Has anyone done this before or has pointers? I'm s

Re: Django's documention is horrible

2011-01-10 Thread selman kocael
you can see or check the django book . i think it's excellent. i am new to django also web, i love django with read it. i want to write a web site immidiately. 2011/1/10 Shawn Milochik > Welcome to the community, and congratulations on putting your best foot > forward! > >

Re: Django's documention is horrible

2011-01-10 Thread Steven Elliott Jr
Ummm... I think thats the first time I've ever heard anyone say that django's documentation sucks. Sent from my iPhone On Jan 10, 2011, at 4:25 PM, Simon W wrote: > Hey, > For such a good web framework it's a shame that the documention is not > structured well .. at all. It consists of massi

Re: Django and PIL problem?

2011-01-10 Thread atcive
I have the same problem:/ Anyone cah help? -- 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 django-users+unsubscr...@googlegroups.c

Re: Django's documention is horrible

2011-01-10 Thread mrmclovin
Yes, being part of the community is good. But to base help and solutions by ask&answer is not good for documentation IMO. I don't like to ask questions because then I have to explain the problem, word everything right and then wait for an answer. I prefer to find the answer quick on my own and only

Re: Django's documention is horrible

2011-01-10 Thread mrmclovin
I usually end up in that way too. But I don't find it convenient. There's lots of class relations and going back and forth is clumsy. Also in most cases Im just after the specification of a class or where it's defined and it takes longer time if you have to scroll down the source code as well. Have

Re: Django's documention is horrible

2011-01-10 Thread Shawn Milochik
I agree that searching the Google group isn't always the most rewarding. There are many blogs maintained by long-time Django users (and developers), but obviously this is no replacement for a consolidated forum. There is the official wiki as well: http://code.djangoproject.com/wiki/ I don't thi

Re: Django's documention is horrible

2011-01-10 Thread Javier Guerra Giraldez
On Mon, Jan 10, 2011 at 5:02 PM, Ovnicraft wrote: >> I just look at the source itself for this. > > or use pydoc right. i think what Simon means (but still can't articulate) is the difference between explanations (which are great in the Django docs) and references (which aren't so good). but th

Re: Django's documention is horrible

2011-01-10 Thread Chris Czub
Yup, that is my approach... The Django sourcecode is eminently readable and well-organized and most of it has documentation associated with it. You can jump into a shell and use the help() command to view API documentation like you requested. e.g. >>> help('django.contrib.auth.models.User') On

Re: IndentationError at /polls/addchoice/

2011-01-10 Thread hank23
Possibly so. I will check. Thanks. On Jan 10, 3:59 pm, Shawn Milochik wrote: > Is there a chance you have a mixture of literal tab characters and spaces? > That would do it. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this grou

Re: Django's documention is horrible

2011-01-10 Thread Ovnicraft
On Mon, Jan 10, 2011 at 4:53 PM, Sam Walters wrote: > Hi, > My approach with regard to: > > > frameworks I'm used to have at least a well structed API documention > listing > > all methods and members of classes with some comment attached to them. > They > > also show the class heirachy, quick an

Re: Django's documention is horrible

2011-01-10 Thread Sam Walters
Hi, My approach with regard to: > frameworks I'm used to have at least a well structed API documention listing > all methods and members of classes with some comment attached to them. They > also show the class heirachy, quick and simple. I just look at the source itself for this. cheers sam_w

Re: IndentationError at /polls/addchoice/

2011-01-10 Thread Shawn Milochik
Is there a chance you have a mixture of literal tab characters and spaces? That would do it. -- 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, sen

IndentationError at /polls/addchoice/

2011-01-10 Thread hank23
I'm getting this error: IndentationError at /polls/addchoice/ unindent does not match any outer indentation level (views.py, line 125)Request Method: POST Request URL: http://127.0.0.1:8000/polls/addchoice/ Django Version: 1.2.4 Exception Type: IndentationError Exception Value: unindent does not m

Re: Django and PIL problem?

2011-01-10 Thread galago
I get another strange error - this time only while adding article. In editing all is fine. def save_model(self, request, obj, form, change): if change == False: obj.save() if ('image' in form.changed_data) or (change == False): tmp_file = Image.open(form.cleaned_data['image']) It gives me

Re: Django's documention is horrible

2011-01-10 Thread mrmclovin
My apologies, didn't mean to sound like an a-hole. I do appreciate django very much for what it is. The library is beautiful really, but the documentation is the opposite. I wish I could spend time to help improve the documentation, but I have not the time. Instead I thought I'd make this (not ve

Re: Django's documention is horrible

2011-01-10 Thread Shawn Milochik
Welcome to the community, and congratulations on putting your best foot forward! I am certain that your non-confrontational tone and obvious appreciation for all the hard work done for free by volunteers has endeared you to all of us. One minor suggestion: In the community, we like to see people

Django's documention is horrible

2011-01-10 Thread Simon W
Hey, For such a good web framework it's a shame that the documention is not structured well .. at all. It consists of massive text put on a page with some random examples. But examples is all there is. In other languages and frameworks I'm used to have at least a well structed API documention listi

Benefits of Field Hiding versus Field Disabling

2011-01-10 Thread hank23
Can someone tell me whether hiding a text input formfield is better than just disabling it and which is easier to implement? -- 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 u

Admin ignores null=True in ForeignKey

2011-01-10 Thread David Walker
If I create a ForeignKey relationship between two Models with null=True, the Admin seems to still insist on there being a foreign object to link to. For example, I created a very simple ForeignKey relationship from Things to Types: from django.db import models class Type(models.Model): name =

Re: Django and PIL problem?

2011-01-10 Thread galago
Thanks. It works great :) -- 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 django-users+unsubscr...@googlegroups.com. For more opti

Re: Screen/Form/View Problem?

2011-01-10 Thread Daniel Roseman
On Monday, January 10, 2011 2:56:42 PM UTC, hank23 wrote: > > This is my first attempt at trying to code a form and use it in a > view, so I've probably got something wrong. At this point I just > wanted to produce the screen with all of the fields displayed on it, > just to see if I have things

Re: Reference Form

2011-01-10 Thread Michael
I believe a bound field contains a property pointing to it's form, so you'd do something like: field1.form.field2 -- Michael On Mon, 2011-01-10 at 17:03 -0200, Daniel Corbe wrote: > Hi, > How to get reference of one field form from another field form when > both are in same form? > > -- >

Reference Form

2011-01-10 Thread Daniel Corbe
Hi, How to get reference of one field form from another field form when both are in same form? -- Daniel Corbe Hahne Latorre dan...@corbe.com.br 55 48 9618-5115 skype: daniel_corbe -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: Screen/Form Fields

2011-01-10 Thread hank23
Regarding question two from above (displaying messages without text input boxes): I want to display the fields as informational at least for now only as a debugging tool, but may keep one of them later after I've pretty much got the screen format finalized. That's why they should be label fields on

Re: Screen/Form Fields

2011-01-10 Thread hank23
So in the widget attrs for the dropdown I should define an event and a javascript function to call whenever the event (like onclick) fires? So where's a good place to find the javascript code to actually display the field? So do I make the field I want to display originally a hidden field and then

Re: Screen/Form Fields

2011-01-10 Thread Tim Sawyer
Pay attention to the notice about how this method (highest-ranked answer) doesn't actually remove it from the form, and a malicious user can still POST a value. Why include it in the form if you can't change the value? Just pass the thing you want to be display only to the page separately and

Re: Screen/Form Fields

2011-01-10 Thread Tim Sawyer
On 10/01/11 17:44, hank23 wrote: First is it possible to conditionally hide a form field on a screen until an item from a dropdown box has been selected? If so how can that be done? Yes, but you'll have to use jQuery or similar and script it with JavaScript, so that when the droplist changes y

Re: Screen/Form Fields

2011-01-10 Thread Shawn Milochik
On Jan 10, 2011, at 12:54 PM, hank23 wrote: > Is there something like a label widget available? If so where is it > defined? I didn't notice it listed in the forms wigdets document at: > > http://docs.djangoproject.com/en/1.2/ref/forms/widgets/ > I just found this. Hopefully someone will let u

Re: Screen/Form Fields

2011-01-10 Thread hank23
Is there something like a label widget available? If so where is it defined? I didn't notice it listed in the forms wigdets document at: http://docs.djangoproject.com/en/1.2/ref/forms/widgets/ On Jan 10, 11:46 am, Shawn Milochik wrote: > 1. AJAX (try jQuery). > > 2. Change the field's widget.

Re: Screen/Form Fields

2011-01-10 Thread Shawn Milochik
1. AJAX (try jQuery). 2. Change the field's widget. -- 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 django-users+unsubscr...@goo

Re: Reconnecting after a database restart

2011-01-10 Thread Jirka Vejrazka
Hi Brennan, You can force Django to reopen the database connection by: >>> from django.db import connection >>> connection.close() Django will then automatically reconnect to the database when it needs it. Obviously, it's up to you to figure out where to put this code in your application (it mig

Screen/Form Fields

2011-01-10 Thread hank23
I have a couple of questions regarding formatting fields on a screen which are coming from a form. First is it possible to conditionally hide a form field on a screen until an item from a dropdown box has been selected? If so how can that be done? Second I have some message fields defined in a fo

Question on the purpose of specific files on a DB Backend(django-odbc)

2011-01-10 Thread czamb...@gmail.com
I am asking the question here because nobody seems to respond to tickets or questions on the django-odbc group. I have found a couple of problems on the django-odbc backend. I fixed one of them, it was using a column alias in the order by clause which is not supported by MSSQL, by making a simple

Re: post messages to facebook wall

2011-01-10 Thread trương thế linh
Hi every body, I'm a newbie to django. please suggest me an app to intergrate with django to do allow me to post messages to facebook wall. It is better if there are example for this matter. i have read on some websites, and knew that we can use facebook.GraphAPI.put_wall_post But i didn't see a

Re: Reconnecting after a database restart

2011-01-10 Thread Euan Goddard
As far as I know Django maintains a persistent connection to the database server and restarting the server without restarting the client isn't possible. We never restart our live database server in production (we fail over to a secondary server so that the app is essentially only vulnerable for a f

Re: Django and PIL problem?

2011-01-10 Thread Steve McConville
Unlike some of the other methods in PIL "thumbnail" modifies the file in place and returns None. This will probably do what you expect: import Image ARTICLE_LARGE_SIZE = 230,300 tmp_file = Image.open(form.cleaned_data['image']) tmp_file.thumbnail(ARTICLE_SMALL_SIZE) tmp_file.save(location + '/smal

Re: Configure LAMPP with Django

2011-01-10 Thread Thomas
Am 10.01.2011 um 16:56 schrieb evstevemd: > I have LAMPP on Ubuntu and I use it fine with PHP. Now I have to add > Django so that I can do PHP and Django projects together. I will have > more than one Django project. I have read of mod_wsgi but I cannot > understand. what exactly is the problem?

Re: Configure LAMPP with Django

2011-01-10 Thread Javier Guerra Giraldez
On Mon, Jan 10, 2011 at 10:56 AM, evstevemd wrote: > In PHP I just put my project as subdirectory of /var/www/ > and then access them via http://localhost/ > How do I do with Django? Django is not a page-based template system like PHP. it's a long-running application that answers web requests.

Configure LAMPP with Django

2011-01-10 Thread evstevemd
I have LAMPP on Ubuntu and I use it fine with PHP. Now I have to add Django so that I can do PHP and Django projects together. I will have more than one Django project. I have read of mod_wsgi but I cannot understand. In PHP I just put my project as subdirectory of /var/www/ and then access them vi

Re: Django and PIL problem?

2011-01-10 Thread Michael
Image.resize returns a new instance of Image of the new size, leaving the internal data of the original intact, so: >> tmp_file = tmp_file.thumbnail(ARTICLE_SMALL_SIZE) will create a new Image instance based on the original, with the new size, then it sets the value of the tmp_file variable to t

Re: django cms without django admin

2011-01-10 Thread Jonas Obrist
Hi As already mentioned, this belongs to http://groups.google.com/group/django-cms?hl=en But let me just quickly say that there's no sane way to get the CMS running without admin. The whole point in having a CMS is to be able to edit content easily, for which you need admin. I have no idea wh

Reconnecting after a database restart

2011-01-10 Thread Brennan Sellner
Hi folks, We're using the Django database layer as part of a Twisted application [1], and we're having some problems with Django failing to reconnect to the database after the database server restarts. It works great otherwise, but once the database server restarts, the Django database layer thro

Django and PIL problem?

2011-01-10 Thread galago
I try to create thumbnail via PIL import Image ARTICLE_LARGE_SIZE = 230,300 tmp_file = Image.open(form.cleaned_data['image']) tmp_file = tmp_file.thumbnail(ARTICLE_SMALL_SIZE) tmp_file.save(location + '/small.jpg', 'JPEG') I get: 'NoneType' object has no attribute 'save' WTF? When i replace tmp_f

Screen/Form/View Problem?

2011-01-10 Thread hank23
This is my first attempt at trying to code a form and use it in a view, so I've probably got something wrong. At this point I just wanted to produce the screen with all of the fields displayed on it, just to see if I have things coded correctly to display the screen the first time. I'm not getting

Re: django cms without django admin

2011-01-10 Thread Joel Goldstick
On Mon, Jan 10, 2011 at 8:06 AM, Shawn Milochik wrote: > This is probably a better question for the Django-CMS Google Group than > this one: > > http://groups.google.com/group/django-cms?hl=en > > It's always possible to subclass their modelforms and templates. I've used > Django CMS, but I don't

Re: upload files via ajax

2011-01-10 Thread Mauro
On 23 Dic 2010, 23:12, Paul Osman wrote: > On Thu, Dec 23, 2010 at 9:39 AM, Mauro wrote: > > Hello, > > is it possible to upload files via ajax? > > > I would like to upload multiple files in my application but i have the > > following exception: > > > MultiPartParserError: Invalid boundary in

current app problem with inclusion_tag

2011-01-10 Thread Raony Araújo
hi, i'm having problems with namespace url resolution and inclusion tags, to say that i have multiple copies of an app deployed, each with its app_name and reversing urls does work well when the current_app parameter is set. also, the {% url %} template tag works well when the current_app is set

Re: django cms without django admin

2011-01-10 Thread Shawn Milochik
This is probably a better question for the Django-CMS Google Group than this one: http://groups.google.com/group/django-cms?hl=en It's always possible to subclass their modelforms and templates. I've used Django CMS, but I don't have a grasp of how much work it would be to disable the admin.

Re: Class based views and form processing

2011-01-10 Thread Justin Murphy
Thanks, Łukasz. I looked into overriding that method too, but it seems like there should be a cleaner way. I almost feel like the ``ModelFormMixin`` should have an API similar to a ``ModelAdmin`` where one could override a ``save_model()`` method on the subclass. The ``form_valid()`` method doe

order of columns in table after syncdb with abstract models

2011-01-10 Thread Rahalevich (Kavalevich) Mila
Hi. Is there any way to specify columns order on syncdb for models? Example: class D(models.Model): date = ... title = ... class Meta: abstract = True class Blog(D): username = ... entry = ... theme = ... table will looks like : date, title, username, entry, them

Admin save_model and ImageField (upload_to)

2011-01-10 Thread galago
Is there any way to get the full path of file, which will be uploaded? in save_model action i can get obj.image but it gives me only the file name. I want to get path with upload_to from model. Is it possible? I need it, because I want to make resizing on my image and make its name with hash to

Best model layout for option variance

2011-01-10 Thread Dustin
I am building an interface that consists of several fields, mostly drop down boxes (menus). Depending on the menu item (option) selected in each menu, however, there may be a unique set of "properties" that the user should be presented with. e.g. "Option A may have the customizable properties Qua

Re: Curious 500 errors

2011-01-10 Thread Justin Murphy
Hi Conor, You might be running into a CSRF protection error. Django expects a CSRF token for all POST requests and the MailChimp webhooks aren't sending one. You will need to decorate your views as @csrf_exempt in order for them to work. Just make sure that you do some extra validation on your par

Re: Error on Production Server (TemplateSyntaxError: Caught ImportError while rendering: No module named testapp)

2011-01-10 Thread Thomas M
I've found the problem. The Configuration was correct. The only problem was that the user running the apache service couldn't access the app directory. :( On 7 Jan., 15:24, Thomas M wrote: > I have to correct myself: > > It still doesnt find "testapp", so nothing has changed :( > > On 7 Jan., 14:

Re: A few beginner questions

2011-01-10 Thread derek
Just one point of clarity - the intention is clearly for apps to be small and focused and "do one thing well". Like much of Python, of course, you as a developer can abuse this to your heart's content and create humugenous and unwieldy code bases. (Pinax, incidentally, is not an "app", but a bund

Re: A few beginner questions

2011-01-10 Thread derek
Apps vs Projects There is probably no one better to address this topic than James Bennet - see: http://www.b-list.org/weblog/2008/feb/11/integrity/ (e.g. "when Django first appeared I was playing with Rails, and the available options for this sort of reusable functionality in Rails all, frankly, s