Strange 404 error in admin

2009-02-09 Thread Julien Phalip
Hi, This is a strange case. I have a simple blog entry model which can be edited in the admin, from the URL that looks like: http://www.example.com.au/admin/blog/entry/52/ Now, what is strange is that the link above returns a 404. Same with the entry id=51. Yet, entries with id=51,52 do exist.

form invalid

2009-02-09 Thread Praveen
hi i have one form inside the form {% for name in eventname %} {{ name.title }} {{ name.address }} {{ name.summary }} {{ name.title }} {{ name.summary }}

protect from brute force attacks on login

2009-02-09 Thread Markos Gogoulos
Hi all, I'm using django-registration to handle logins, registrations etc. It is very handy and easy to set up, but allows unlimited login attempts, and thus people can brute-force any django-application! So far I've been using fail2ban to ban users that brute force passwords. I would be

Re: Upload ZIP-File into Database

2009-02-09 Thread Robert
Hi Karen, I didn't mind to start a quiz... The problem is that in the code above django seems to control if the ZIP-File contains Images. I'm not sure but when I take a ZIP-File which contains Images there is no problem, but when I take my ZIP-File I always get the error: BadZipfile - File is

Re: protect from brute force attacks on login

2009-02-09 Thread Russell Keith-Magee
On Mon, Feb 9, 2009 at 6:21 PM, Markos Gogoulos wrote: > Hi all, > > I'm using django-registration to handle logins, registrations etc. It is > very handy and easy to set up, but allows unlimited login attempts, and thus > people can brute-force any django-application! > >

Re: Troubles with unicode in django-trunk

2009-02-09 Thread Russell Keith-Magee
On Mon, Feb 9, 2009 at 6:58 PM, jfmxl wrote: > > Hello, > > I downloaded the 1.0.2 version of django to my ubuntu 8.10 box and > began the tutorial. I got as far as adding the unicode print > definitions for poll and choice, and then saw no difference between > afterward : > >

mod_python vs. Django?

2009-02-09 Thread Vincent
Hello I'd like to write a Web 2.0-type web application. I find Python a lot more pleasurable than PHP. I'd like to have information about the pro's and con's of using Apache's mod_python vs. an application server like Django, Turbogears, etc. Thank you.

Troubles with unicode in django-trunk

2009-02-09 Thread jfmxl
Hello, I downloaded the 1.0.2 version of django to my ubuntu 8.10 box and began the tutorial. I got as far as adding the unicode print definitions for poll and choice, and then saw no difference between afterward : In [2]: Poll.objects.all() Out[2]: [] is still what I saw. So I scrubbed the

Re: Form wizard back button

2009-02-09 Thread alain D.
It seems to me like a quite simple requirement for a form wizard ... but I'm still unable to find a simple way to do it ... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: mod_python vs. Django?

2009-02-09 Thread Russell Keith-Magee
On Mon, Feb 9, 2009 at 6:54 PM, Vincent wrote: > > Hello > > I'd like to write a Web 2.0-type web application. I find Python a lot > more pleasurable than PHP. > > I'd like to have information about the pro's and con's of using > Apache's mod_python vs. an application

Re: mod_python vs. Django?

2009-02-09 Thread Christian Hoeppner
Think about Django as Cake PHP, Symfony, Code Igniter, etc from the PHP scene. You still need mod_php to run them =) Obviously, Django has a damn big cool factor added, for not being PHP =) Yours, Chris On 09/02/2009, at 10:26, Russell Keith-Magee wrote: > > On Mon, Feb 9, 2009 at 6:54 PM,

Re: mod_python vs. Django?

2009-02-09 Thread Graham Dumpleton
On Feb 9, 9:26 pm, Russell Keith-Magee wrote: > On Mon, Feb 9, 2009 at 6:54 PM, Vincent wrote: > > > Hello > > > I'd like to write a Web 2.0-type web application. I find Python a lot > > more pleasurable than PHP. > > > I'd like to have

Re: Best practice question: subclassing external app components

2009-02-09 Thread felix
in my own setup I have a few apps where it might go: globalapp - a collection of misc snippets, classes and utilities that I use on every project I work on {website} - the specific website if this code will not be reused accountz - views, forms related to my own styles of login utils,

Re: Subclass/Inline Problem - should I be able to do this?

2009-02-09 Thread Bartosz Ptaszynski
All inline models need to have a ForeignKey pointing back to the base model. In your case you need to declare a ForeignKey field from Gallery model to Business model, what you've did instead is you've created foreign key to parent class (Directory). Try this: class Directory(models.Model):

Re: Troubles with unicode in django-trunk

2009-02-09 Thread jfmxl
On Feb 9, 5:21 pm, Russell Keith-Magee wrote: > On Mon, Feb 9, 2009 at 6:58 PM, jfmxl wrote: > > > Hello, > > > I downloaded the 1.0.2 version of django to my ubuntu 8.10 box and > > began the tutorial. I got as far as adding the unicode print > >

Re: Troubles with unicode in django-trunk

2009-02-09 Thread Russell Keith-Magee
On Mon, Feb 9, 2009 at 8:43 PM, jfmxl wrote: > > On Feb 9, 5:21 pm, Russell Keith-Magee wrote: >> On Mon, Feb 9, 2009 at 6:58 PM, jfmxl wrote: > Sorry, I am new to python and I guess you hadn't bothered to read the > elementary

Changing Image in admin deletes the rest - expected behaviour?

2009-02-09 Thread phoebebright
Model: class Car(models.Model): ... lots of fields ... pic1 = models.ImageField(blank=True, upload_to='pics') pic2 = models.ImageField(blank=True, upload_to='pics') pic3 = models.ImageField(blank=True, upload_to='pics') pic4 = models.ImageField(blank=True, upload_to='pics')

Re: default value for foreign key and CharField

2009-02-09 Thread knight
Thanks, My Media_biz is edited inline in another class. So I have: class MetadataInline(admin.StackedInline) and class MetadataAdmin(admin.ModelAdmin) Can you tell what method I should override and in which class in order to set the initial value while editing inline? Regards, Alex Arshavski.

Re: How do I add a Custom ID Field that increments?

2009-02-09 Thread Alfonso
Thanks Guys, Will, your snippet was exactly what I was looking for - thanks for that. Alas Rama, the client has specified that these custom Invoice IDs get saved in the db alongside the primary key, otherwise I'd go with your suggestion (simpler!) On Feb 5, 8:27 am, Rama Vadakattu

Re: Testing Django and HTTP Request

2009-02-09 Thread Vitaly Babiy
Thank you Alex for you help I will look in to this. Vitaly Babiy On Mon, Feb 9, 2009 at 12:32 AM, Alex Gaynor wrote: > > > On Mon, Feb 9, 2009 at 12:28 AM, Vitaly Babiy wrote: > >> Yeah, it does. I am going to have to look to see if can find a

date error

2009-02-09 Thread Séno Hervé Edorh
Hi, I am new in django world and i am a french speaker but i will try to speak english in this mailling list. I have buy the book, Pratical Django projects of James Bennett and i have a problem somewhere. this is the error archive_index() got an unexpected keyword argument 'day' this is my

Re: Troubles with unicode in django-trunk

2009-02-09 Thread jfmxl
On Feb 9, 7:05 pm, Russell Keith-Magee wrote: > On Mon, Feb 9, 2009 at 8:43 PM, jfmxl wrote: > > > On Feb 9, 5:21 pm, Russell Keith-Magee wrote: > >> On Mon, Feb 9, 2009 at 6:58 PM, jfmxl wrote: > > Sorry, I am

Re: Troubles with unicode in django-trunk

2009-02-09 Thread Karen Tracey
On Mon, Feb 9, 2009 at 8:07 AM, jfmxl wrote: > > # Create your models here. > > class Poll(models.Model): >question = models.CharField(max_length=200) >pub_date = models.DateTimeField('date published') > > class Choice(models.Model): >poll = models.ForeignKey(Poll) >

Looking to give presentation on Django at work

2009-02-09 Thread jeffself
Is there a presentation available that I can use? Would like to skip the whole building of the presentation myself if possible. If there isn't one, I may create an "open-source" presentation myself and make it available for others to build on.

FreeBSD 6.2 trouble using postgresql_psycopg2

2009-02-09 Thread rihad
Hi there! I have py25-django-1.0.2 port installed on FreeBSD. While following this tutorial: http://docs.djangoproject.com/en/dev/intro/tutorial01/#intro-tutorial01 I've reached the line that says DATABASE_ENGINE -- Either 'postgresql_psycopg2', 'mysql' or 'sqlite3'. Other backends are also

Re: FreeBSD 6.2 trouble using postgresql_psycopg2

2009-02-09 Thread James Bennett
On Mon, Feb 9, 2009 at 7:38 AM, rihad wrote: > This is no surprise, as django always attempts to install databases/py- > psycopg, and not databases/py-psycopg2, since the former is hardcoded > in its port Makefile. Any ideas? Django's documentation lists all available values for

Re: Looking to give presentation on Django at work

2009-02-09 Thread Andrew Ingram
have you looked on djangosnippets.org? 2009/2/9 jeffself : > > Is there a presentation available that I can use? Would like to skip > the whole building of the presentation myself if possible. If there > isn't one, I may create an "open-source" presentation myself and make

Re: Changing Image in admin deletes the rest - expected behaviour?

2009-02-09 Thread James Bennett
On Mon, Feb 9, 2009 at 6:39 AM, phoebebright wrote: > In admin, if I change the content of one pic it blanks the rest. Is > this expected behaviour? Generally, when you think you've found a bug, searching the Django bug tracker will turn up useful information, as in

Re: mod_python vs. Django?

2009-02-09 Thread Vincent
On 9 fév, 12:25, Graham Dumpleton wrote: > By using a separate system they ensure there application is portable > to different hosting mechanisms, which will be good protection given > that mod_python is dying a slow death and is unlikely to be ported to > Python 3.0.

Re: FreeBSD 6.2 trouble using postgresql_psycopg2

2009-02-09 Thread rihad
Thanks, as 'postgresql' was one of the types listed in the comment, I tried that and it worked. I understand this is a wrong place to post issues with Django FreeBSD port, so I might try doing it somewhere else. --~--~-~--~~~---~--~~ You received this message

Re: Upload ZIP-File into Database

2009-02-09 Thread Ariel Mauricio Nunez Gomez
I did that once and had no problem customizing GalleryUpload for my needs. Try start writing some code and get back to us if it fails. http://code.google.com/p/django-photologue/source/browse/trunk/photologue/models.py#194 Ariel. --~--~-~--~~~---~--~~ You

Re: date error

2009-02-09 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 7:42 AM, Séno Hervé Edorh wrote: > Hi, > I am new in django world and i am a french speaker but i will try to speak > english in this mailling list. I have buy the book, Pratical Django projects > of James Bennett and i have a problem somewhere. this

Re: problem with simple shopping cart

2009-02-09 Thread lnysrogh
I'm also getting an Index Error, "list index out of range" for the "request.session['cart'][1] += 1" line. I can't figure out what's wrong. On Feb 9, 3:02 am, lnysrogh wrote: > Thank you so much. That helped a lot. Such a simple mistake. > > I've got some other questions

Re: Looking to give presentation on Django at work

2009-02-09 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 9:01 AM, Andrew Ingram wrote: > > have you looked on djangosnippets.org? > > 2009/2/9 jeffself : > > > > Is there a presentation available that I can use? Would like to skip > > the whole building of the presentation myself if

Apache, Django configuration

2009-02-09 Thread Xian Chen
Hi All, I use mod_python to run Django on Apache. But, I notice all of the urls that Django received are not correct. In deed, the "/" after the domain name is truncated. e.g. http://localhost/admin/ , Django receives "http://localhostadmin; Why this happen? Thanks, Xian

Re: mod_python vs. Django?

2009-02-09 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 9:05 AM, Vincent wrote: > > On 9 fév, 12:25, Graham Dumpleton wrote: > > By using a separate system they ensure there application is portable > > to different hosting mechanisms, which will be good protection given > >

Re: FreeBSD 6.2 trouble using postgresql_psycopg2

2009-02-09 Thread rihad
On Feb 9, 6:23 pm, rihad wrote: > I understand this is a wrong place to post > issues with Django FreeBSD port, so I might try doing it somewhere > else. The "issue" being that www/py-django port unconditionally installs py- psycopg if WITH_POSTGRESQL is selected before building

Re: date error

2009-02-09 Thread Hervé Edorh
i forgot, the first ulrs.py (in the project directory) is like this (r'^weblog/$',include('dibongo.urls')), (r'^weblog/(?P\d{4})/(?P\w{3})/(?P\d{2})/(? P\w+)/$',include('dibongo.urls')), this is the second that i put before. It for the chapiter decoupling the URLs

Problem reopening files

2009-02-09 Thread Benjamin Wohlwend
Hi, I've written a form ImageField that is cropable with the help of a javascript cropper. In the course of saving the cropped image, I have to reopen the image file a couple of times in different modes in the "clean"-method of the ImageField. Unfortunately, despite the docs saying something

Re: Extending the User model

2009-02-09 Thread Karen Tracey
On Sun, Feb 8, 2009 at 7:51 PM, Patricio Palma wrote: > [snip] > --- > models.py > from django.contrib.auth.models import User > class MyUser(User): >chilean_rut = CLRutField(_('RUT'),primary_key=True) >

Re: Troubles with unicode in django-trunk

2009-02-09 Thread jfmxl
On Feb 9, 8:22 pm, Karen Tracey wrote: > On Mon, Feb 9, 2009 at 8:07 AM, jfmxl wrote: > > > # Create your models here. > > > class Poll(models.Model): > >    question = models.CharField(max_length=200) > >    pub_date = models.DateTimeField('date published')

Question about INNER JOIN vs LEFT JOIN and some strange issue when model binds to in self through many-to-many relationship.

2009-02-09 Thread AlexMVdovin
At first step I will describe my models: class Meter(models.Model): id = models.IntegerField(primary_key=True) some stuff here... collector = models.ManyToManyField("self", through='MeterCollector', symmetrical=False) class MeterCollector(models.Model): meter =

Re: form invalid

2009-02-09 Thread Michael Newman
On Feb 9, 3:54 am, Praveen wrote: > hi i have one form inside the form > > method="POST" onSubmit="javascript:self.close();"> > {% for name in eventname %} > > {{ name.title }} > > {{ name.address }} > {{ name.summary }} > style='display:none'> > {{

urlize

2009-02-09 Thread Emily Rodgers
Hi, I have written a django app that manages 'change requests' (and approvals) for IT infrastructure changes in our company, and I am using the urlize filter when displaying certain fields (like description of change, test plan etc). This is so that if a user puts a link to documentation for a

Re: Upload ZIP-File into Database

2009-02-09 Thread Karen Tracey
On Mon, Feb 9, 2009 at 4:37 AM, Robert wrote: > > Hi Karen, > > I didn't mind to start a quiz... > The problem is that in the code above django seems to control if the > ZIP-File contains Images. I'm not sure but when I take a ZIP-File > which contains Images there is

Apache Conf Problem

2009-02-09 Thread veeravendhan
Hi, I am creating dynamically a web sit, from my django project. To achieve that i have to append the site url details in the apache conf. I have tried by having as a septate python script to set the setting, for that file I have given changed the owner as root and tried by event i am getting

Dynamic Apache Conf Problem

2009-02-09 Thread veeravendhan
Hi, I am creating dynamically a web sit, from my django project. To achieve that i have to append the site url details in the apache conf. I have tried by having as a septate python script to set the setting, for that file I have given changed the owner as root and tried by event i am getting

on delete cascade - best way to do override this behaviour?

2009-02-09 Thread Erwin Elling
Dear community, On some of our models we'd like to override Django's default "on delete cascade". (Customers that use our modified version of the Django-admin have proven to pay no attention at all to the messages that warn them for the deletion of multiple objects. It seems that a solution on

User Auth... is_group in a template?

2009-02-09 Thread Alfonso
I'm wondering, I can easily add a if statement to detect whether a user is staff in a template - {% if user.is_staff %} blah {% endif %} but is there a similar syntax for displaying HTML blocks depending on the user group? A kind of {% if user.is_group(customer) %} blah for customer {% endif %}

Re: User Auth... is_group in a template?

2009-02-09 Thread R. Gorman
Just an idea, but what about using a user profile and then using the get_profile function? ex. {% if user.get_profile.customer %} customer block {% endif %} R. On Feb 9, 11:01 am, Alfonso wrote: > I'm wondering, I can easily add a if statement to detect whether a >

Keep getting NameError at /admin/

2009-02-09 Thread claudio.br...@googlemail.com
Hi I am new to django and have just started to play. I have a working (small) app but wanted to turn on the admin console for the project. I edited the settings.py to include the admin module and now get the following errors NameError at /admin/ name 'admin' is not defined Request Method: GET

Re: Keep getting NameError at /admin/

2009-02-09 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 11:11 AM, claudio.br...@googlemail.com < claudio.br...@googlemail.com> wrote: > > Hi > > I am new to django and have just started to play. I have a working > (small) app but wanted to turn on the admin console for the project. I > edited the settings.py to include the admin

Re: Testing Django and HTTP Request

2009-02-09 Thread Vitaly Babiy
Hey Alex I got cherrypy to work great I am going to post a blog as soon as my blog is done :) If anyone cares just ask here and I will post a write up here. Vitaly Babiy On Mon, Feb 9, 2009 at 7:52 AM, Vitaly Babiy wrote: > Thank you Alex for you help I will look in to

Re: User Auth... is_group in a template?

2009-02-09 Thread Nathaniel Whiteinge
On Feb 9, 9:01 am, Alfonso wrote: > but is there a similar syntax for displaying HTML blocks depending on > the user group? Not builtin, no. But easy to add with a filter: http://www.djangosnippets.org/snippets/847/

UnicodeEncodeError with gettext

2009-02-09 Thread Scott
Hello, I'm receiving the following error while running Django 0.96 with Google App Engine: UnicodeDecodeError at / 'ascii' codec can't decode byte 0xe3 in position 0: ordinal not in range(128) GET Request URL:http://localhost:8080/ Exception Type: UnicodeDecodeError Exception

Re: UnicodeEncodeError with gettext

2009-02-09 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 11:27 AM, Scott wrote: > > Hello, > > I'm receiving the following error while running Django 0.96 with > Google App Engine: > > UnicodeDecodeError at / > 'ascii' codec can't decode byte 0xe3 in position 0: ordinal not in > range(128) > > GET > Request

Re: UnicodeEncodeError with gettext

2009-02-09 Thread Scott
Quick edit, I meant to ask if it could be a problem with the '.mo' files being created incorrectly...the '.po' files that contain the unicode translations are UTF-8. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

A quick question about slug fields

2009-02-09 Thread djandrow
I believe these days a statment like this has been depreciated: post_slug = models.SlugField(prepopulate_from=('post_title',)) I had a look through the docs but couldn't find the answer. How can you now specify which field the slug is created from? thanks, Andrew

Re: A quick question about slug fields

2009-02-09 Thread Karen Tracey
On Mon, Feb 9, 2009 at 11:50 AM, djandrow wrote: > > I believe these days a statment like this has been depreciated: > > post_slug = models.SlugField(prepopulate_from=('post_title',)) > > I had a look through the docs but couldn't find the answer. > How can you now

Re: Exception in Django's Exception Handling

2009-02-09 Thread Devel63
I'll see if I can extract some small subset and post the details. In the meantime, more info: the problem only occurs when an error is encountered during a call in which the server will return a HttpResponse('', mimetype='text/xml; charset=utf-8') object in response to some AJAX request; things

Question about media in outside forms

2009-02-09 Thread Robert Ramírez Vique
Hello, I have been working on some forms which has some ajax behaivour, and I use some css and javascripts. This can be used inside a form with {{ form.media }}, which outputs the html tags necessary to import all the javascript and css to get all the fields working, and without duplicates if the

Bizarre sqlite3 / apache2 behaviour

2009-02-09 Thread lazyant
Hello, I installed yesterday Django 1.0.2 (current downloadable version) on a new Ubuntu 8.10 machine with python 2.5.2. I wrote a toy application and it works and shows fine with both the built-in development server and Apache 2 (2.2.9). The database is sqlite3, it came with python (btw, how do

Re: A quick question about slug fields

2009-02-09 Thread djandrow
Thanks Karen On Feb 9, 4:53 pm, Karen Tracey wrote: > On Mon, Feb 9, 2009 at 11:50 AM, djandrow wrote: > > > I believe these days a statment like this has been depreciated: > > > post_slug = models.SlugField(prepopulate_from=('post_title',)) > > >

Re: Looking to give presentation on Django at work

2009-02-09 Thread lazyant
Hi, it can be very powerful if as part of the presentation you add a little hands-on demo, like in: http://www.showmedo.com/videos/video?name=110=110 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: UnicodeEncodeError with gettext

2009-02-09 Thread Scott
Thanks for the quick reply - does anyone know if Django 1.0 is patched into the Google App Engine Django Helper? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: UnicodeEncodeError with gettext

2009-02-09 Thread Karen Tracey
On Mon, Feb 9, 2009 at 12:21 PM, Scott wrote: > > Thanks for the quick reply - does anyone know if Django 1.0 is patched > into the Google App Engine Django Helper? > Per http://code.google.com/p/google-app-engine-django/source/browse/trunk/CHANGES any reasonably current

Re: Extending the User model

2009-02-09 Thread Patricio Palma
Thanks, I owe you a chocolate bar I fix it class MyUser(User): chilean_rut = CLRutField(_('RUT'),unique=True) some_field = models.CharField(max_length=50) voalá I don't really need a PK, my mistake Thanks again. --~--~-~--~~~---~--~~ You received this

signals in 1.0 problem: nesh django utils & django 1.0

2009-02-09 Thread Robocop
Hello, I've recently been porting many projects to 1.0, but have hit a snag with the current one. I'm looking at an old project that uses nesh's django utils (mainly just the thumbnail image field model), and have been slowly porting the project (and by extension nesh's code) to 1.0. Now i have

user defined model

2009-02-09 Thread Dids
Hi, I need to update the model.py file at run-time. Where can I find the file on disk from the views.py please? What I'm trying to do is : Open model.py , append a new class , invoke syncdb. Thx Dids, --~--~-~--~~~---~--~~ You received this message because you

Re: signals in 1.0 problem: nesh django utils & django 1.0

2009-02-09 Thread Jake Elliott
hi robocop - is it enough to add the '**kwargs' syntax to your receiver function? or is that already present? like: def _save(self, **kwargs): ... and def delete(**kwargs): ... -jake On Mon, Feb 9, 2009 at 12:15 PM, Robocop wrote: > > Hello, > I've

checkboxInput values

2009-02-09 Thread Bobby Roberts
If i use the multiple Checkbox Input, It results in list of the items which were selected. My question is can you do the same thing for a single checkbox? As an old ASP guy I'd do this: I'm trying to do this in django by the following: #...snip forms.py el1_Choices = ( ('EN',

Re: Looking to give presentation on Django at work

2009-02-09 Thread jeffself
I already have the demo in place. I just wanted to spruce it up with a presentation and wanted to know if something already existed that I could work from. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: signals in 1.0 problem: nesh django utils & django 1.0

2009-02-09 Thread Robocop
Holy crap it is! Thanks for the idea, i'm going to do a lil testing and verify everything works. Thanks again! On Feb 9, 10:21 am, Jake Elliott wrote: > hi robocop - > > is it enough to add the '**kwargs' syntax to your receiver function? > or is that already present? > >

Re: checkboxInput values

2009-02-09 Thread Bobby Roberts
> What is the proper way to assign a value to a single checkbox?  Am I > just stuck with boolean and true/false?  That seems like a lot of > extra work on the back end. nevermind i just figured out to use a value attribute --~--~-~--~~~---~--~~ You received this

Re: Keep getting NameError at /admin/

2009-02-09 Thread claudio.br...@googlemail.com
Hi Alex Yes I have the line from django.contrib import admin" in urls.py On 9 Feb, 16:20, Alex Gaynor wrote: > On Mon, Feb 9, 2009 at 11:11 AM, claudio.br...@googlemail.com < > > > > claudio.br...@googlemail.com> wrote: > > > Hi > > > I am new to django and have just

Re: Keep getting NameError at /admin/

2009-02-09 Thread Daniel Roseman
On Feb 9, 6:57 pm, "claudio.br...@googlemail.com" wrote: > Hi Alex > > Yes I have the line from django.contrib import admin" in urls.py > You're going to need to post the whole urls.py. It's a bit hard to understand why you're getting that error if you do have that

Re: user defined model

2009-02-09 Thread Daniel Roseman
On Feb 9, 6:13 pm, Dids wrote: > Hi, > > I need to update the model.py file at run-time. > > Where can I find the file on disk from the views.py please? > > What I'm trying to do is : Open model.py , append a new class , invoke > syncdb. > > Thx > Dids, This is

Subclass conflict with admin widgets

2009-02-09 Thread phoebebright
I have implemented this solution successfully with a standard model, but when I try to use it on one which is subclassed I get an error because it is trying to validate the model before it knows about the subclass. I can work around this by defining an Admin class for each of the subclasses, but

Admin Image Handling - ability to display thumb and delete an image - one solution

2009-02-09 Thread phoebebright
In case this helps anyone, here is one implementation I have 4 pictures attached to each record but would work the same if only one. Uses sorl-thumbnails and based on snippet here: http://www.djangosnippets.org/snippets/934/ written by baumer1122 In models.py - used standard

Re: Best practice question: subclassing external app components

2009-02-09 Thread bruno desthuilliers
On 9 fév, 00:35, zinckiwi wrote: > Hi folks, > > I'm just starting to play with django-registration and I want to > subclass the RegistrationForm for a couple of cosmetic tweaks > (capitalising the labels on the fields -- there may be a simpler way > to do this, but indulge

Re: Question about media in outside forms

2009-02-09 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 12:00 PM, Robert Ramírez Vique wrote: > Hello, > > I have been working on some forms which has some ajax behaivour, and I use > some css and javascripts. This can be used inside a form with {{ form.media > }}, which outputs the html tags necessary to

writing a urlpattern for a form submission

2009-02-09 Thread kosuke
I'm sure this will come across as basic to many django users but it has got me stuck so any helpful pointers would be appreciated. I've scoured the docs and come up empty. Upfront apologies done now, here's what I got: Using django forms, i create a form which results in a submission string

Re: user defined model

2009-02-09 Thread Dids
> This is extremely unlikely to work, not to mention very inefficient. > Can you let us know why you want to do this - what's your use case? We > might be able to suggest a better way of doing it. > -- > DR. Users define a set of data they're interested in. Give a mean to get the data (script,

Re: Strange 404 error in admin

2009-02-09 Thread Julien Phalip
On Feb 9, 7:20 pm, Julien Phalip wrote: > Hi, > > This is a strange case. I have a simple blog entry model which can be > edited in the admin, from the URL that looks > like:http://www.example.com.au/admin/blog/entry/52/ > > Now, what is strange is that the link above returns

Re: Strange 404 error in admin

2009-02-09 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 3:40 PM, Julien Phalip wrote: > > On Feb 9, 7:20 pm, Julien Phalip wrote: > > Hi, > > > > This is a strange case. I have a simple blog entry model which can be > > edited in the admin, from the URL that looks like: >

Re: How to detect inactivity session time out?

2009-02-09 Thread ydjango
Any one with a clue on How do I detect time out in my app and give user a page that they have been timed out due to inactivity. I am usingrequest.session.set_expiry(900) , SESSION_COOKIE_AGE = 900 and django standard authentication using autheticate(), login() and logout(). On Feb 8,

Re: writing a urlpattern for a form submission

2009-02-09 Thread Daniel Roseman
On Feb 9, 8:16 pm, kosuke wrote: > I'm sure this will come across as basic to many django users but it > has got me stuck so any helpful pointers would be appreciated.  I've > scoured the docs and come up empty.  Upfront apologies done now, > here's what I got: > > Using

Re: Strange 404 error in admin

2009-02-09 Thread Julien Phalip
On Feb 10, 7:41 am, Alex Gaynor wrote: > I don't know what manager old forms admin used, but do you have a custom > manager that blocks access to some objects. Thanks Alex for your reply. You've made a really good point which helped me track this down. Here are the model

Re: Subclass conflict with admin widgets

2009-02-09 Thread Daniel Roseman
On Feb 9, 7:28 pm, phoebebright wrote: > I have implemented this solution successfully with a standard model, > but when I try to use it on one which is subclassed I get an error > because it is trying to validate the model before it knows about the > subclass.  I can

FormSet with non input-element data possible?

2009-02-09 Thread Info Cascade
Hi -- I'm creating a FormSet and want to include some data in the form output that is not an html input element. Some of the data I pass to the FormSet, which gets passed to the form, I just want to display, I don't want to put it into an HTML input element. I want it to be available in the

Re: Strange 404 error in admin

2009-02-09 Thread Julien Phalip
On Feb 10, 7:52 am, Julien Phalip wrote: > On Feb 10, 7:41 am, Alex Gaynor wrote: > > > I don't know what manager old forms admin used, but do you have a custom > > manager that blocks access to some objects. > > Thanks Alex for your reply. You've made

python manage.py runserver giving strange error

2009-02-09 Thread Arnaud Delobelle
Hello django users, Today I have had this strange error: after a syntax error in a module I had to restart my development server. marigold:qmm arno$ python manage.py runserver /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/ Python.app/Contents/MacOS/Python: can't open file

Re: Subclass conflict with admin widgets

2009-02-09 Thread phoebebright
Yes I see that, it's just if I don't put the custom form in it works fine: class DirectoryAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['cat','name','is_live']}),< CAT FIELD STILL HERE AN OK ('Contact', {'fields':

Forms, fields and widgets

2009-02-09 Thread Serge S. Koval
Hello, I'm fairly new Django user, but have some background experience with other frameworks. Sorry if this topic was discussed before, but I was not able to find any mention of it. My question is related to architectural decisions of the forms, fields and widgets. At the moment in Django,

Re: Forms, fields and widgets

2009-02-09 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 5:18 PM, Serge S. Koval wrote: > > Hello, > > I'm fairly new Django user, but have some background experience with > other frameworks. Sorry if this topic was discussed before, but I was > not able to find any mention of it. > > My question is

using the ImageField with the API

2009-02-09 Thread redmonkey
Hey everyone, I've got an interesting problem concerning file uploads. I'm building an online auction and my `Lot` links to a thin `LotImage` so that I can store multiple images of the lots: class Lot(models.Model): ... lot_number = models.PositiveIntegerField("Lot number")

Re[2]: Forms, fields and widgets

2009-02-09 Thread Serge S. Koval
Hello Alex, Tuesday, February 10, 2009, 12:21:05 AM, you wrote: > I would recommend searching the dev list for a thread titled: "Controlling form/widgets output". Alex  Thanks, I was looking in django-users list and this topic was django-devel. --  Best regards,  Serge            

YUI Image Uploader - OK on Firefox/Mac but not elsewhere

2009-02-09 Thread phoebebright
Have been trying to get a RTE plugin working that will allow upload of images. The YUI verion is almost there but will not play well with browsers. The plugin from here http://allmybrain.com/2008/11/06/example-yui-image-upload-with-yui-260/ I modified to get Javascript to make an asynchronous

Re: Exception in Django's Exception Handling

2009-02-09 Thread Russell Keith-Magee
On Tue, Feb 10, 2009 at 1:59 AM, Devel63 wrote: > > I'll see if I can extract some small subset and post the details. > > In the meantime, more info: the problem only occurs when an error is > encountered during a call in which the server will return a > HttpResponse('',

Re: python manage.py runserver giving strange error

2009-02-09 Thread Arnaud Delobelle
I've avoided the problem by using django-admin instead of manage.py... Which does not tell me what's gone wrong. -- Arnaud --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

  1   2   >