Problem with ImageField and inline admin form

2008-08-29 Thread Ramin Miraftabi
Hi. I'm stumped and can't figure out a solution for the following: With the models: class Entry(models.Model): pub_date = models.DateTimeField('date published') created = models.DateTimeField(auto_now_add=True, editable=False) edited = models.DateTimeField(auto_now=True, editable=Fal

Re: ManyToMany + through + using add, d

2008-08-29 Thread Russell Keith-Magee
On Fri, Aug 29, 2008 at 8:09 PM, Richard Ward <[EMAIL PROTECTED]> wrote: > > It looks like the solution to this is in the newest release. Ref. > http://code.djangoproject.com/changeset/8136 Richard - Gergo, Antti, and I are well aware of the m2m intermediate change in [8136]. What we are discuss

Re: URL configuration with Django deployed in a subdirectory

2008-08-29 Thread Graham Dumpleton
On Aug 30, 5:40 am, bryanzera <[EMAIL PROTECTED]> wrote: > I am a new Django user with Django 0.96 deployed in a sub-directory > under our main document root.  My problem is that I cannot get my URL > configuration to work. > > Inside the Django-deployed subdirectory, I have the following urls.p

Problem with example from the book "Learning Website Development with Django" by Ayman Hourieh

2008-08-29 Thread fkunze
Chapter 4 of the book: "Learning Website Development with Django" by Ayman Hourieh offers a simple example of a login page. The example worked with an earlier svn version of Django, and now seems to fail with the latest svn version (8728). Specifically, this pattern: urlpatterns = patterns('

Re: Revised: datetime formatting (mysql vs. django)

2008-08-29 Thread Steve Potter
I can't say for sure, but I believe that the now button in the admin is a javascript. So I think that is where you need to look to control the output. Steve On Aug 29, 4:14 pm, Gerard Petersen <[EMAIL PROTECTED]> wrote: > Hi All, > > Im *still* :-( trying to get the date format from -mm-dd

Photologue Error: NoReverseMatch -- Reverse for 'pl-gallery' not found.

2008-08-29 Thread Jacolyte
Here's a pastebin of the traceback: http://pastebin.com/m43fb0960 Photologue is version 2.0-rc1 Django is version 1.0-beta_1 I did everything the photologue readme said. Put photologue in my installed apps, ran syncdb, plinit, etc. everything went fine. I added a photo and made a gallery, and

Re: imports

2008-08-29 Thread lingrlongr
Thanks Malcolm. That really cleared things up for me! Now I can relax, just a little, for the holiday weekend. That was really driving me nuts! On Aug 29, 6:06 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2008-08-29 at 15:00 -0700, lingrlongr wrote: > > I can see some differenc

Re: How to know which fields a model contains?

2008-08-29 Thread Alexis Bellido
That's also a good idea. Thanks Jim. --~--~-~--~~~---~--~~ 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

Re: Modules path when importing models

2008-08-29 Thread Alexis Bellido
Thanks a lot, now I get it. That's exactly why I asked, I suspected that the imports had to be done is such a way that they would be independent of the location of app so I can reuse the code in many projects. Cheers! --~--~-~--~~~---~--~~ You received this message

Re: Using http header information in settings.py

2008-08-29 Thread Graham Dumpleton
On Aug 30, 12:20 am, Greg Fuller <[EMAIL PROTECTED]> wrote: > Thanks for the replies. > > I like the middleware solution, if you can modify settings variables > during middleware processing. The documentation warns against altering > settings at runtime. > > What are the consequences of  ignoring

Re: "core" is not a field constructor argument anymore

2008-08-29 Thread James Bennett
On Fri, Aug 29, 2008 at 5:58 PM, Guillaume Lederrey <[EMAIL PROTECTED]> wrote: > After updating to the latest trunk, I get a couple of errors when I > have field that define "core=True". After digging into the code, I > find changeset 8616 (http://code.djangoproject.com/changeset/8616) > that docu

"core" is not a field constructor argument anymore

2008-08-29 Thread Guillaume Lederrey
Hello ! After updating to the latest trunk, I get a couple of errors when I have field that define "core=True". After digging into the code, I find changeset 8616 (http://code.djangoproject.com/changeset/8616) that documents that. However, this doesnt seem to be include in the backward incompatib

inlineformset_factory

2008-08-29 Thread cmiller
Hi All, I have been hitting my head against a wall for way to long on this. When I view it on the edit page everything looks great! But when I try to Save or Update, everything unravels. I'm following it just the way the very sparse documentation suggests, and yet I get a "Exception Type:

Re: imports

2008-08-29 Thread Malcolm Tredinnick
On Fri, 2008-08-29 at 15:00 -0700, lingrlongr wrote: > I can see some differences between the Python Path for the dev server > (manage.py runserver) and apache/mod_python. I created an error in a > template using an invalid tag so the Django pretty error screen > appears. Using the development

Re: imports

2008-08-29 Thread lingrlongr
I can see some differences between the Python Path for the dev server (manage.py runserver) and apache/mod_python. I created an error in a template using an invalid tag so the Django pretty error screen appears. Using the development server I see: Python Path:['/home/django/proj/loan', '/us

Proper place to modify FileField data before custom filestorage backend saves it?

2008-08-29 Thread shadfc
I have a situation where I want to edit the IDv3 tag on mp3's uploaded in a FileField. The model with the FileField is being edited inline to a parent model, and I need to use some of the parent data in the IDv3 tag. I am using a custom filestorage backend for Amazon S3, so I basically need a way

Re: Getting things into entries

2008-08-29 Thread Martin Diers
On Aug 29, 2008, at 2:22 PM, Benjamin Buch wrote: > > Clumsy subject, I know... > > I know there was a recent discussion about this, but I lost it, so > sorry for asking again. > So here's the question: > > How can you allow your users to add something like pictures into > something like blog pos

Revised: datetime formatting (mysql vs. django)

2008-08-29 Thread Gerard Petersen
Hi All, Im *still* :-( trying to get the date format from -mm-dd to dd-mm- After a major dig into mysql, it seems that the date format in it's tables is always -mm-dd. Normally, depending on your locale, date and/or time stamps are formatted on the fly. I changed all the date rel

Re: admin widgetry in myapp

2008-08-29 Thread Gerard Petersen
Martin, After a few days of diggin' I'm well on my way. Never saw the page you sent me. Marvelous docs. Thanx!! regards, Gerard. Martin Diers wrote: > I would suggest that first you learn about forms and widgets apart > from the admin. Once that is done, it's pretty trivial to crate your

Re: admin widgetry in myapp

2008-08-29 Thread Martin Diers
I would suggest that first you learn about forms and widgets apart from the admin. Once that is done, it's pretty trivial to crate your own ModelForm and assign it to your admin. As to a tutorial, there's the newforms-admin HOWTO, that may be of use: http://code.djangoproject.com/wiki/Newform

Re: how to get {% url %} working with {% blocktrans %}?

2008-08-29 Thread Martin Diers
There is a currently a discussion an even newer discussion on Dev, where Jacob has proposed a new syntax, and has a patch that would allow this: {% url django-admindocs-docroot as docroot %} Then docroot becomes a variable, containing the url, that can be used in a {% blocktrans %}, obvi

Re: URL configuration with Django deployed in a subdirectory

2008-08-29 Thread Erik Allik
Just to let you know, if you upgraded your Django version, you wouldn't have to manually specify base_url in you URLconf because Django will do it for you. I'm not sure what's causing your problem though. Erik On 29.08.2008, at 22:40, bryanzera wrote: > > I am a new Django user with Djang

URL configuration with Django deployed in a subdirectory

2008-08-29 Thread bryanzera
I am a new Django user with Django 0.96 deployed in a sub-directory under our main document root. My problem is that I cannot get my URL configuration to work. Inside the Django-deployed subdirectory, I have the following urls.py file: from django.conf.urls.defaults import * base_url = 'columb

regrouping

2008-08-29 Thread sholombc
i have a table with name catagory and sub category class Products(models.Model): name = models.CharField(max_length=30) catagory = models.ForeignKey(Catagories) sub_catagory = models.ForeignKey(Sub_Catagory) i want to display the products on a page like this Catagory

Re: problem with accessing django from apache2 & mod_python

2008-08-29 Thread lingrlongr
This sounds like the same problem I'm having I have a post going here too! http://groups.google.com/group/django-users/browse_thread/thread/c30b4395f5153cf3/dad6e7a1ebef3175#dad6e7a1ebef3175 On Aug 29, 2:54 pm, Aaron <[EMAIL PROTECTED]> wrote: > Hi, strange enough, I was having a simil

Getting things into entries

2008-08-29 Thread Benjamin Buch
Clumsy subject, I know... I know there was a recent discussion about this, but I lost it, so sorry for asking again. So here's the question: How can you allow your users to add something like pictures into something like blog posts? Not just below or above (this could be achieved by a simple

Re: Escaping or Unescaping Translations in Templates

2008-08-29 Thread Malcolm Tredinnick
On Fri, 2008-08-29 at 11:16 -0700, Aidas Bendoraitis wrote: > Hello all! > > How to control the escaping of translations in templates? For example, > {% trans "I & Co" %} should be escaped in html templates but not in > javascript (or other language) templates. You'll have to use different mess

Adding Relation Without Saving

2008-08-29 Thread Koen Bok
I'd like to build relations with objects without saving to pre- determine the price for a proposed order based on a set of products. But when I add a Product project to the Order, I first have to save the Order. Is there any way around this? Example: class Order(Model): id = models.AutoF

Get all available urls as select box?

2008-08-29 Thread Benjamin Buch
Hi, in my project I want to give the users the possibility to put in some content (some sort of page intro...) into a text field and than choose on which page the content gets displayed. Perhaps a very common problem while building cmssy projects... I thought I could achieve this by displayi

Re: problem with accessing django from apache2 & mod_python

2008-08-29 Thread Aaron
Hi, strange enough, I was having a similar problem as you just awhile ago (w/ mod_wsgi). The cause as I discovered was that if you have an app inside your project, you'll have to include the project name before any import statements. So, for your case, chances are, there may be references to boo

Re: use crypt algo for user passwords

2008-08-29 Thread Tim Chase
> Maybe I'm wrong but this patch define DEFAULT_ALGO at "django > installation" level. I think it shoud be defined at prject level. > something like this > try: > ... DEFAULT_ALGO = settings.DEFAULT_ALGO > ... except NameError: > ... DEFAULT_ALGO = 'sha1' > > does refer to project s

Escaping or Unescaping Translations in Templates

2008-08-29 Thread Aidas Bendoraitis
Hello all! How to control the escaping of translations in templates? For example, {% trans "I & Co" %} should be escaped in html templates but not in javascript (or other language) templates. Aidas Bendoraitis aka Archatas --~--~-~--~~~---~--~~ You received this

Re: how to display custom messages in admin site

2008-08-29 Thread V
I think you should be able to customize it by simply defining a response_add method in the corresponding class of your admin.py class MyAdmin(admin.ModelAdmin): as your admin interface is derived from ModelAdmin and response_add is defined in it by creating def response_add(self, request, ob

Re: adding javascript files to the admin's "list view"

2008-08-29 Thread V
I think a possibility would be to overwrite the admin template as described in http://www.djangobook.com/en/1.0/chapter17/ V On Aug 29, 3:35 pm, Dennis Schmidt <[EMAIL PROTECTED]> wrote: > Hello again, > > now I'm just wondering how I can add some custom js files to a model's > "list overview pa

Re: Problems with photologue installation

2008-08-29 Thread Benjamin Buch
Am 26.08.2008 um 15:56 schrieb Karen Tracey: > The traceback shows the sequence of calls made. So runserver.py on > line 47 called self.validate... which wound up on line 122 of > base.py calling get_validation_errors, etc. until you get to line > 139 of base.py caling contribute_to_class

Re: Django and CSS

2008-08-29 Thread jgomo3
Juan Miguel: Confirm my suspects, thankyou. varikin: how i didn't think on it before, thanyou. --~--~-~--~~~---~--~~ 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@go

Re: How to view the sql query statement involved in a django web page?

2008-08-29 Thread Tim Chase
> How to view the sql query statement involved in a django web page for > optimization? thx http://www.djangoproject.com/documentation/faq/#how-can-i-see-the-raw-sql-queries-django-is-running Just make sure DEBUG is False in a production environment, or this is one of the first things that will

ModelForm, images and exclude

2008-08-29 Thread flynnguy
I'm probably doing something stupid but this has bugged me all morning. I have a ModelForm form and a view to add info to a Media model I have. This works: class AddPhotoForm(ModelForm): class Meta: model = Media def add_pet_photo(request, pet_id): pet = Pet.objects.get(id=pet_id)

Re: How to pass queryset to the next request (e.g., search term refinement)?

2008-08-29 Thread gordyt
Howdy Egon! About this part: > Now imagine a human enters search terms into a text input field of a > form, which passes a queryset object instance back to a view, which > then renders /calls to a template where I can make use of that > queryset. > So far correct? When the user enters search te

How to view the sql query statement involved in a django web page?

2008-08-29 Thread Ddper
Hi, all: How to view the sql query statement involved in a django web page for optimization? thx --~--~-~--~~~---~--~~ 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@

Re: creating and using postgresql sequences using django orm?

2008-08-29 Thread ydjango
This approach has locking issues in multi user environment. I will need to take an exclusive lock when I read and update the table. How can I take exclusive lock in django ORM? In case of a sequence, DB does the locking for me. has anyone used Sequences (postgresql) using either django ORM or d

Django developers from Toronto - new group for you

2008-08-29 Thread Dimitri Gnidash
Come meet other Django developers from Toronto! http://groups.google.ca/group/django-toronto --~--~-~--~~~---~--~~ 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@goog

Re: photologue installation

2008-08-29 Thread Karen Tracey
On Fri, Aug 29, 2008 at 11:24 AM, Briohny <[EMAIL PROTECTED]>wrote: > > Hi again Karen, > > Just wondering about Pressroom too. I couldn't see a new version > however the version that is currently in trunk doesn't seem to be > working in Django-1.0-alpha-2 version. > > File "C:\Documents and Set

Re: How to view the sql query statement involved in a django web page?

2008-08-29 Thread Ludwig
There is somewhere an SQLLogger floating around. I use the following, which I found a while ago and will print the SQL statements at the bottom of the generated page. from django.db import connection from django.template import Template, Context class SQLLogMiddleware: def process_response (

Re: imports

2008-08-29 Thread lingrlongr
Thanks Malcolm. How do I choose which version I want to use? I just don't understand it. Maybe some errors will help... With DEBUG = True, I don't get any useful information. So I turn that off and now I get this traceback: Traceback (most recent call last): File "/usr/local/python/lib/py

Re: photologue installation

2008-08-29 Thread Briohny
Hi again Karen, Just wondering about Pressroom too. I couldn't see a new version however the version that is currently in trunk doesn't seem to be working in Django-1.0-alpha-2 version. File "C:\Documents and Settings\TR\Sample Projects\newsite\ ", line 7, in from django_apps.photologue.

Working but ugly model code. Need advice.

2008-08-29 Thread drbig
Hi! Before I paste the code here is what I want to achieve: 1) All content is supplied via django admin, no custom upload/edit forms 2) The Photo class holds title and note (the text data), two images (full and thumb), and stats data of hits and comments count 3) The stamp should be updated only

Re: Building ORM relations without saving...

2008-08-29 Thread Norman Harman
Koen Bok wrote: > I'd like to build object relations (Model classes) without saving them > to the database to predict a price for a specific order. Let's say I > have this: > > class Order(Model): > id = models.AutoField(primary_key=True) > number = models.IntegerField() > > de

Re: Using http header information in settings.py

2008-08-29 Thread Greg Fuller
Thanks for the replies. I like the middleware solution, if you can modify settings variables during middleware processing. The documentation warns against altering settings at runtime. What are the consequences of ignoring the warning? Eric, I don't think setting up multiple projects would wor

How to pass queryset to the next request (e.g., search term refinement)?

2008-08-29 Thread Egon Esser
Hi there, as far as I understood and until now needed to know, Django works for me like this: Human enters url into browser -> urls.py -> views.py -> template In the template, I could dynamically generate a url which matches in another urls.py somewhere, and that closes the circle. Now imagine

Re: how to display custom messages in admin site

2008-08-29 Thread Karen Tracey
On Fri, Aug 29, 2008 at 9:47 AM, truebosko <[EMAIL PROTECTED]> wrote: > > Basically lets you over-ride templates. Maybe that message is simply > part of a template, not sure .. but hopefully that helps. > No, these messages are not part of the templates. You can see where they are built in the c

datetime formatting (model vs. form)

2008-08-29 Thread Gerard Petersen
Hi All, Im trying to get the date format to european (dd-mm-). I configured the timezone in settings.py. Since I use modelforms, should this field format be set in the model? Currently the error on the form field is "Enter a valid date". Is this due to the model or the form field definiti

Re: how to display custom messages in admin site

2008-08-29 Thread truebosko
I'm not sure on that specific one, but you can over-ride admin templates piece by piece See: http://www.djangoproject.com/documentation/tutorial02/#customize-the-admin-look-and-feel Basically lets you over-ride templates. Maybe that message is simply part of a template, not sure .. but hopeful

adding javascript files to the admin's "list view"

2008-08-29 Thread Dennis Schmidt
Hello again, now I'm just wondering how I can add some custom js files to a model's "list overview page" in the admin site. When I add this inner Media class to the model's admin class in the admin.py the js files will only be included on the editing page. But I need some js files in the overview

Re: how to display custom messages in admin site

2008-08-29 Thread Karen Tracey
On Fri, Aug 29, 2008 at 9:15 AM, Dennis Schmidt <[EMAIL PROTECTED]>wrote: > > Hello everybody, > > when you do something like saving an object in the admin site this > small yellow bar on top will show up, telling you something like > "correctly saved". I'd like to display my own custom messages t

Re: gis: Current locale considered when converting a geometry to WKT

2008-08-29 Thread Luiz Vital
Issue solved by Sean Gillies! (http://sgillies.net/) See http://trac.osgeo.org/geos/ticket/201 and even a snapshot with the fix http://gispython.org/downloads/geos/geos-r2174.tar.gz Thanks man! You rock! []s Luiz Fernando Barbosa Vital On Tue, Aug 26, 2008 at 6:02 PM, Luiz Vital <[EMAIL PR

how to display custom messages in admin site

2008-08-29 Thread Dennis Schmidt
Hello everybody, when you do something like saving an object in the admin site this small yellow bar on top will show up, telling you something like "correctly saved". I'd like to display my own custom messages there. But I couldn't find out yet how to achieve this. Can someone help me please? r

Re: How to handle platform dependent settings?

2008-08-29 Thread Martin J. Laubach
> > If it's mostly paths that you need to change, check out: > > >http://rob.cogit8.org/blog/2008/Jun/20/django-and-relativity/ There's a much easier (IMO anyway) method that does not involve messing with settings.py. If you just want to find out the directory of the current application, you ca

how to test uploading of a file?

2008-08-29 Thread Viktor Nagy
Hi! I would like to write a simple test to see that the files uploaded through a form are properly saved. Could someone tell me what data should I post in the testclient? thanks, Viktor --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Using http header information in settings.py

2008-08-29 Thread Graham Dumpleton
On Aug 29, 8:50 pm, Erik Allik <[EMAIL PROTECTED]> wrote: > For the iPhone templates issue, I'd set up two projects instead of one   > -- one for regular browsers, one for the iPhone. Then I'd simply   > redirect from the regular one to the iPhone one as needed. Although   > this has the negative

Re: Generate admin files. Views and Templates with Django?

2008-08-29 Thread V
Actually, there is an admin interface built into django. You can get it running by simply adding django.contrib.admin to your settings.py INSTALLED_APPS variable and reading through the comments of your urls.py and uncommenting the corresponding lines. Still, by default this admin is not extremel

Re: Bug in django/contrib/gis/geos?

2008-08-29 Thread Karen Tracey
On Fri, Aug 29, 2008 at 5:18 AM, Benjamin Buch <[EMAIL PROTECTED]> wrote: > > Seems like something in django/contrib/gis/geos broke the python help > system: > > benjamin-buchs-macbook:~ benjamin$ python > Python 2.5.1 (r251:54863, Feb 4 2008, 21:48:13) > [GCC 4.0.1 (Apple Inc. build 5465)] on da

Re: problem with accessing django from apache2 & mod_python

2008-08-29 Thread Aaron
If you can't get this to work out with mod_python, perhaps consider using mod_wsgi. http://code.djangoproject.com/wiki/django_apache_and_mod_wsgi Checkout this post for comparisons between the two: http://groups.google.com/group/django-users/browse_thread/thread/456581f4bc8506b8/5db7dd7bceb87f48

Re: ManyToMany + through + using add, d

2008-08-29 Thread Richard Ward
It looks like the solution to this is in the newest release. Ref. http://code.djangoproject.com/changeset/8136 On Fri, Aug 29, 2008 at 1:40 AM, akaihola <[EMAIL PROTECTED]> wrote: > > This looks like Gergo's ticket for his original request: > http://code.djangoproject.com/ticket/8334 > > > --

Re: problem with accessing django from apache2 & mod_python

2008-08-29 Thread cavebird
No :( I already tried that. same results. cavebird On Aug 29, 4:47 pm, Aaron <[EMAIL PROTECTED]> wrote: > Hi cavebird, > > Not sure if this has anything to do with the symbolic link, but I > remember having some path issues on mod_python awhile back. Try > copying mysite inside htdocs and see

Re: Running individual tests

2008-08-29 Thread Daniel Roseman
On Aug 29, 10:30 am, Martin Gilday <[EMAIL PROTECTED]> wrote: > Is it possible to run a single test using manage.py test, rather than > the whole suite?  I have defined a tests.py in one of my apps and > would just like to run those tests, as the auto generated tests take > far to long to be runni

Re: problem with accessing django from apache2 & mod_python

2008-08-29 Thread Aaron
Hi cavebird, Not sure if this has anything to do with the symbolic link, but I remember having some path issues on mod_python awhile back. Try copying mysite inside htdocs and see if that has any effects. Aaron On Aug 29, 4:32 am, cavebird <[EMAIL PROTECTED]> wrote: > Hi, > I have been learnin

Re: cheatsheet of forms.Form

2008-08-29 Thread Gerard Petersen
A reguler download would be appreciated. Regards, Gerard. DavidY wrote: > Here is a two page, concise, example-based cheat sheet for > forms.Forms > > http://www.scribd.com/doc/5224358/cheatsheet-of-formsForm-for-django > > download is available on the page somewhere > have a good time web de

problem with accessing django from apache2 & mod_python

2008-08-29 Thread cavebird
Hi, I have been learning Django and came across this problem I am trying to access django apps from apache2 but it just wont work : ( Here is what i did: added in /usr/local/apache2/conf/extra/httpd-info.conf: SetHandler python-program PythonHandler django.core.handlers.modpython Pyth

problem with "accounts/login" redirect -- multiple query strings

2008-08-29 Thread Aaron
Hi guys, I am experienced some trouble when using the "accounts/login" next redirection that involves more than one query string. For some reason, the redirected url is truncate and only seems to pick up the first query string. For example, both of the following: accounts/login/?next=/post/add

Building ORM relations without saving...

2008-08-29 Thread Koen Bok
I'd like to build object relations (Model classes) without saving them to the database to predict a price for a specific order. Let's say I have this: class Order(Model): id = models.AutoField(primary_key=True) number = models.IntegerField() def total(self):

Re: Using http header information in settings.py

2008-08-29 Thread Erik Allik
For the iPhone templates issue, I'd set up two projects instead of one -- one for regular browsers, one for the iPhone. Then I'd simply redirect from the regular one to the iPhone one as needed. Although this has the negative side effect of having more than one URL per resource, but you co

Re: creating and using postgresql sequences using django orm?

2008-08-29 Thread Erik Allik
I'm not sure if this will work for you, but I'd simply create a "helper" table and Django model for that and insert new entries there to get the next number in the sequence. You might even find it useful for storing other data such as when a certain number in the sequence was generated and

Re: Inconsistencies/Bug in ModelForm

2008-08-29 Thread Steve Holden
Malcolm Tredinnick wrote: > > On Thu, 2008-08-28 at 21:32 -0400, Steve Holden wrote: >> lingrlongr wrote: >>> Submitted ticket #8663 for the following: >>> >>> When a ModelForm? is used to display a form for a Model, the fields >>> defined with a choices option insert a "---" value for the fi

Running individual tests

2008-08-29 Thread Martin Gilday
Is it possible to run a single test using manage.py test, rather than the whole suite? I have defined a tests.py in one of my apps and would just like to run those tests, as the auto generated tests take far to long to be running every time whilst writing them. This might be because I am new to

Bug in django/contrib/gis/geos?

2008-08-29 Thread Benjamin Buch
Seems like something in django/contrib/gis/geos broke the python help system: benjamin-buchs-macbook:~ benjamin$ python Python 2.5.1 (r251:54863, Feb 4 2008, 21:48:13) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> help

cheatsheet of forms.Form

2008-08-29 Thread DavidY
Here is a two page, concise, example-based cheat sheet for forms.Forms http://www.scribd.com/doc/5224358/cheatsheet-of-formsForm-for-django download is available on the page somewhere have a good time web developing --~--~-~--~~~---~--~~ You received this message

cheatsheet of forms.Form

2008-08-29 Thread DavidY
Here is a two page, concise, example-based cheat sheet for forms.Forms http://www.scribd.com/doc/5224358/cheatsheet-of-formsForm-for-django download is available on the page somewhere have a good time web developing --~--~-~--~~~---~--~~ You received this message

Re: Issues for run "runserver" command.

2008-08-29 Thread Daniel Roseman
On Aug 29, 4:19 am, Issac <[EMAIL PROTECTED]> wrote: > I have installed python2.5 on RH3L-AS4 successfully. > And already installed Django1.0-beta2 successfully. > > After i create a project test, when i use python manage.py runserver > to start the dev server, the log shows error during the start

Re: Using http header information in settings.py

2008-08-29 Thread Daniel Roseman
On Aug 28, 11:24 pm, Greg Fuller <[EMAIL PROTECTED]> wrote: > I would like a way to to adjust settings  based on information in the > http header.  I've seen a similar question asked before, but I don't > need all the django request object, just the http header information. > More specifically, us

Re: Version 1.0. documentation

2008-08-29 Thread Ramdas S
try docs.djangoproject.com RS On Fri, Aug 29, 2008 at 12:28 PM, Luka Birsa <[EMAIL PROTECTED]> wrote: > > Hello > > I'm just starting with Django (I read the djangobook.com) and I've > upgraded to 1.0. There are quite some changes and I'm wondering is > there any documentation (as in a good book

Re: new be Many to many relation question

2008-08-29 Thread Daniel Roseman
On Aug 29, 7:18 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I can get user_utilization but member.user gives me django object. How > can I get that information? > > In [199]: for member in prj_members: >    .:     member.user >    .:     member.user_utilization >    .: > Out[1

Version 1.0. documentation

2008-08-29 Thread Luka Birsa
Hello I'm just starting with Django (I read the djangobook.com) and I've upgraded to 1.0. There are quite some changes and I'm wondering is there any documentation (as in a good book) coming out? Best regards, Luka --~--~-~--~~~---~--~~ You received this message

Re: use crypt algo for user passwords

2008-08-29 Thread SammyRulez
Maybe I'm wrong but this patch define DEFAULT_ALGO at "django installation" level. I think it shoud be defined at prject level. something like this >>> try: ... DEFAULT_ALGO = settings.DEFAULT_ALGO ... except NameError: ... DEFAULT_ALGO = 'sha1' does refer to project settings have some s

Re: HowTo: Django view as a class

2008-08-29 Thread Horst Gutmann
Very interesting approach, going through subclassing HttpResponse for generating views. Just some more alternatives if you don't mind ;-) A couple of months ago, Arne Brodowski wrote some similar on his blog [1] also kind of using the servlet-split (a view-method per http-method). Also some time