Re: How to create a Generic Show View ?

2008-08-27 Thread koenb
Hi Mario, a few months ago I posted a snippet on djangosnippets [1] that kind of does something like this: it takes a form (can be the same one you use for editing) and displays it as read-only. The disadvantage is it uses the entire form machinery just to display some values, which is a lot of

Re: Django new comments framework error

2008-08-27 Thread Slavus
Here is the solution: You'll get this if you still have stale pyc files left over from the old comment system. Delete 'em and your code will work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Web hosting control panel with django

2008-08-27 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-08-12, o godz. 20:48, przez mike171562: > > I was thinking of building a web hosting control panel using django. > Anybody have any thoughts on this, or heard of anyone else doing this? djangohosting.ch has account administrative panel build with Django. You can

Re: dictionary from object

2008-08-27 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-08-27, o godz. 07:25, przez Vance Dubberly: > So I want to do something I'd think would be extremely common and > simple. > > user = User.objects.get(pk=data['id']) > > I want a dictionary of the model attributes/values from user. > > user_dict = { 'first_name'

Re: formset issue

2008-08-27 Thread patrickk
anyone? On Aug 26, 12:19 pm, patrickk <[EMAIL PROTECTED]> wrote: > scenario: users are uploading documents (e.g. images, files, ...). > these documents are saved in a model "Attachment" assigned to the > currently logged-in "User". now, every user has the possibility to > attach documents to a

Re: Optimizing Django ORM SQL queries when in a loop

2008-08-27 Thread [EMAIL PROTECTED]
Hi Malcolm, Thanks very much for your help! I was (up until a few weeks ago) running off of the trunk, but I've stopped at an earlier revision (7922, I think). I kept updating but things kept breaking so I thought I'd just finalise the revision. I did actually give it a go using Q objects

Re: FileUploadHandler does strange things

2008-08-27 Thread mwebs
Hm, now I have the newest Revision 8618, but still the missbehaviour that the file is copied in an endless loop. any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

custom field: clean-method not called ...

2008-08-27 Thread patrickk
I´m just trying to write a custom field for the django filebrowser (a filebrowsefield). the __init__ method of the form-field is called, but the clean method is not ... instead the clean method of forms.CharField is called, which is strange, because a) I´ve made a model field (FileBrowseField)

Re: custom field: clean-method not called ...

2008-08-27 Thread Malcolm Tredinnick
On Wed, 2008-08-27 at 01:42 -0700, patrickk wrote: > I´m just trying to write a custom field for the django filebrowser (a > filebrowsefield). the __init__ method of the form-field is called, but > the clean method is not ... instead the clean method of > forms.CharField is called, which is

Re: custom field: clean-method not called ...

2008-08-27 Thread patrickk
ah, thanks a lot. this is it ... defaults = {'max_length': self.max_length} defaults['form_class'] = FileBrowseFormField defaults['widget'] = FileBrowseWidget(attrs=attrs) patrick. On Aug 27, 11:11 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2008-08-27 at 01:42 -0700, patrickk

Re: Newbie Question - Regex Field to deal with Feet/Inches

2008-08-27 Thread Ronny Haryanto
On Wed, Aug 27, 2008 at 3:13 AM, bkev <[EMAIL PROTECTED]> wrote: > I'm working on a site that has several imperial measurements (feet and > inches) and I'd like to implement a field in my model that uses a > regular expression like: > ^(\d{1,5})\'((\s?)(-?)(\s?)([0-9]|(1[0-1]))\")?$ > to parse

Nice representation for Querying with ForeignKeys

2008-08-27 Thread johnny
Hi, This should be a simple question but I just couldn't seem to find the answer. I have a simple 2 model relationship: class B(models.Model): bfield = models.CharField(...) class A(models.Model): afield = models.CharField(...) modelB = models.ForeignKey(B) what is the best way

TemporaryFileUploadHandler missbehaviour

2008-08-27 Thread mwebs
Hello, I already posted a message describing this problem. For me solving this problem is very important because I cant proceed for hours. http://code.djangoproject.com/ticket/8333 in a few words: when I want to upload a file with temporaryFileUploadHandler than in fact I have 215 copies of

Re: how to locate the OS currently logged in user??

2008-08-27 Thread PeteDK
On 21 Aug., 16:25, "Guillaume Lederrey" <[EMAIL PROTECTED]> wrote: > 2008/8/21 PeteDK <[EMAIL PROTECTED]>: > > > > > > > > > On 21 Aug., 13:10, "Guillaume Lederrey" <[EMAIL PROTECTED]> > > wrote: > >> 2008/8/21 PeteDK <[EMAIL PROTECTED]>: > > >> > The server is running Debian Linux and they are

Nice representation for Querying with ForeignKeys

2008-08-27 Thread johnny
Hi, This should be a simple question but I just couldn't seem to find the answer. I have a simple 2 model relationship: class B(models.Model): bfield = models.CharField(...) class A(models.Model): afield = models.CharField(...) bfieldFK = models.ForeignKey(B) what is the best

Re: Web hosting control panel with django

2008-08-27 Thread AndyB
I also keep meaning to look at Pinax but I was rather put off by the apparent focus on social apps (in which I don't currently have much of an interest). I would like to see a some documentation about their proposed standard architecture. Does this exist other than in the current source code?

Re: Bug in ImageFieldFile.save() ?

2008-08-27 Thread Marty Alchin
On Wed, Aug 27, 2008 at 12:37 AM, Brian Morton <[EMAIL PROTECTED]> wrote: > The docs (and an analysis of the code) indicate that the second > argument to save should be the content. > > http://docs.djangoproject.com/en/dev/ref/files/file/#ref-files-file > > I am assuming this is binary or text

Uploadhandler exceptions not raised

2008-08-27 Thread mwebs
Hello, I wrote a custum Uploadhandler for processing the chunks of an uploaded file during upload. class MyFileUploadHandler(MemoryFileUploadHandler): ... def receive_data_chunk(...): convert_data(raw_data) ___ def convert_data(...): raise Exception() The exceptions

Re: ImportError: cannot import name parse_lookup

2008-08-27 Thread --- [EMAIL PROTECTED] ---
I am also following the Apress book and am trying to implement that coltrane stuff . am using the latest django from svn i got the ""ImportError: cannot import name parse_lookup "" error initially when i used "tagging-0.2.1" as told above i tried to check out the latest tagging code from svn

Complex, somewhat formula...

2008-08-27 Thread mccomas . chris
I have a system that I created a few years back in PHP (it actually started in VB with Excel) that goes through all the college football games, compute a team's win/loss record, then a "power rating" which is based on their winning percentage and their opponents winning percentage. Could I do

Django Party in Montreal?

2008-08-27 Thread Dan
Are there other people in the Montreal area that would like to celebrate the 1.0 release? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

ANN: Django 1.0 beta 2 released

2008-08-27 Thread James Bennett
As part of the run up to the final Django 1.0 release (scheduled for next week!), tonight we've pushed out Django 1.0 beta 2, including the final new features for 1.0 (mainly a refactoring of django.contrib.comments). As a beta release, we of course don't recommend it for production use, but if

Re: Complex, somewhat formula...

2008-08-27 Thread James Bennett
On Wed, Aug 27, 2008 at 7:41 AM, <[EMAIL PROTECTED]> wrote: > Could I do this with Django? You could do it with Python, and then use Django to make it visible over the Web, yes. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct."

Re: Complex, somewhat formula...

2008-08-27 Thread mccomas . chris
Thnx. I'm half tempted, just to leave it as is in PHP to compute the stuff, then dump it into a DB and use Django to display everything... On Aug 27, 8:42 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Wed, Aug 27, 2008 at 7:41 AM,  <[EMAIL PROTECTED]> wrote: > > Could I do this with

Re: Complex, somewhat formula...

2008-08-27 Thread Tim Chase
> I have a system that I created a few years back in PHP (it > actually started in VB with Excel) that goes through all the > college football games, compute a team's win/loss record, then > a "power rating" which is based on their winning percentage > and their opponents winning percentage. > >

Re: Django Party in Montreal?

2008-08-27 Thread didier rano
One more ! 2008/8/27, Dan <[EMAIL PROTECTED]>: > > Are there other people in the Montreal area that would like to celebrate > the 1.0 release? > > > > > -- Didier Rano [EMAIL PROTECTED] http://www.jaxtr.com/didierrano --~--~-~--~~~---~--~~ You received this

Re: Complex, somewhat formula...

2008-08-27 Thread mccomas . chris
Here's how I had it setup with PHP, and the process of solving the ratings... TEAM name nickname win loss rating rank GAMES date away_team (fk) home_team (fk) away_score home_score With the PHP file, the first thing it does is loop through all the games with scores and computes the outcome of

Re: Template inherite and direct_to_template

2008-08-27 Thread Erik Allik
You have assumed that child templates also inherit any context that is passed to the parent templates. Unfortunately, this is not the case. This is not a limitation, but in fact makes sense -- passing the context happens when templates are rendered (in your case, in URLconf where you use

Re: how to locate the OS currently logged in user??

2008-08-27 Thread Guillaume Lederrey
2008/8/27 PeteDK <[EMAIL PROTECTED]>: > On 21 Aug., 16:25, "Guillaume Lederrey" <[EMAIL PROTECTED]> > wrote: >> 2008/8/21 PeteDK <[EMAIL PROTECTED]>: >> > On 21 Aug., 13:10, "Guillaume Lederrey" <[EMAIL PROTECTED]> >> > wrote: >> >> 2008/8/21 PeteDK <[EMAIL PROTECTED]>: >> >> I'm still not clear

Re: FileUploadHandler does strange things

2008-08-27 Thread Karen Tracey
On Wed, Aug 27, 2008 at 4:30 AM, mwebs <[EMAIL PROTECTED]> wrote: > > Hm, > > now I have the newest Revision 8618, but still the missbehaviour that > the file is copied in an endless loop. > any ideas? > That fix was tested pretty extensively so I'm pretty sure it fixed the base problem. I do

Re: how to locate the OS currently logged in user??

2008-08-27 Thread koenb
Did you look at the information attached to ticket 689 [1] ? This is about using the credentials provided by the webserver. Typical use case is having apache authenticate the user (eg via mod_ntlm, mod_auth_sspi or another authentication system), pass the username into the django app and use

setting a form to invalid after having called form.is_valid()

2008-08-27 Thread Berco Beute
I have an image upload form and I want to INvalidate the form if the uploaded image it too big. How can I get an error message in the form saying the uploaded image is too big? ===Model== class Image(models.Model): image = models.ImageField(upload_to='imageupload')

Re: ImportError: cannot import name parse_lookup

2008-08-27 Thread Karen Tracey
On Wed, Aug 27, 2008 at 8:09 AM, --- [EMAIL PROTECTED] --- <[EMAIL PROTECTED]>wrote: > > I am also following the Apress book and am trying to implement that > coltrane stuff . > am using the latest django from svn > i got the ""ImportError: cannot import name parse_lookup "" error > initially

Re: Complex, somewhat formula...

2008-08-27 Thread Baczek
On 27 Sie, 14:41, [EMAIL PROTECTED] wrote: > I have a system that I created a few years back in PHP (it actually > started in VB with Excel) that goes through all the college football > games, compute a team's win/loss record, then a "power rating" which > is based on their winning percentage and

Re: Wiki/CMS app?

2008-08-27 Thread Thomas Guettler
Tim Kersten schrieb: > At present it uses the webserver for user authentication instead of > django's built in user system. I'll haven't added support for this > yet. > This should be easy to fix. > It does look like a homepage, and not a wiki. > Content is pure html. No wiki markup. > Has

Re: Wiki/CMS app?

2008-08-27 Thread Tim Kersten
Yes, quite correct, it doesn't require a database. I wanted to keep the requirements as minimal as possbile and thought it would be good to let something designed for keeping revisions do the heavy lifting. I know I have a good way to go with timiki yet, but it's already in heavy use and therefor

Re: database relationships

2008-08-27 Thread nek4life
Well this works great while using the generic detail view, but when I return a list view the relationships won't work. in my view def album_list(request, page=0): return list_detail.object_list( request, queryset = Album.objects.select_related().all(), paginate_by =

Re: How to create a Generic Show View ?

2008-08-27 Thread Mario Hozano
Hi Koen, I think your code snippet will work fine in my application too. But, how instantiate the DisplayModelForm directly in my urls.py showed below? (r'^core/user/show/(?P\d+)/$', 'object_detail', dict(queryset=User.objects.all(), template_name="baseshow.html",

Many to One Relationship

2008-08-27 Thread Daniel A.
Hi! I'm a switcher from Rails and I'm learning Django. I'm stuck with something I thing should be easy but for some reason I can't find the error. I'm trying to define a model to manage shifts for volunteers. I have three diferent models, Shifts, Users and Swaps. A User have many Shifts and a

Problem with i18n - "en_US" locale translations coming through for "en"

2008-08-27 Thread Fran O'Reilly
Hi all, I've got a situation where even though the user has selected language "en", the "en_US" translations are being rendered. My setup has three languages - "en", "en-us" and "en-gb". I also have three locale translations corresponding, i.e. "en", "en_GB" and "en_US". Anyone seen a similar

Re: Django and CSS

2008-08-27 Thread jgomo3
I have no problem serving static content, but i'm still confused about the MEDIA_ROOT and MEDIA_URL. Why the ROOT if i have the URL? how do you actually use those variables? In production and in develpment server i havent used them, i simply serve the statics content in some virtual server for

Re: FileUploadHandler does strange things

2008-08-27 Thread mwebs
Thanks for your help. Datafile is a model and just contains a CharField, a FileField a ForeignKey and some Booleanfields. --- class DataFile(models.Model): name = models.CharField(max_length=255, null = True) file =

Re: Optimizing Django ORM SQL queries when in a loop

2008-08-27 Thread [EMAIL PROTECTED]
user_id_list=User.objects.filter(whatever).values_list('id', flat=True) posts=Post.objects.filter(user__id__in=user_id_list) Would that work? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Many to One Relationship

2008-08-27 Thread lingrlongr
The error is generated because you have two fields in the Swap model that refer to the User model, and two that refer to the Shifts model. As the error states you need to specify the related_name value for those ForeignKeys. Take a look at the documentation for related_name here:

Re: Django and CSS

2008-08-27 Thread Juan Miguel
MEDIA_URL: Says what is the RELATIVE PATH to media files. So it is relative to the root dir in server. Used when referring links in templates. I.E: http://{{MEDIA_URL}}img/img.jpg. It has many other uses but the most important is the one before. MEDIA_ROOT: Says what is the ABSOLUTE PATH to media

Re: database relationships

2008-08-27 Thread lingrlongr
Try this is the template: {% for albumart in album.albumart_set.all %} {{ albumart.image }} {% endfor %} On Aug 27, 11:58 am, nek4life <[EMAIL PROTECTED]> wrote: > Well this works great while using the generic detail view, but when I > return a list view the relationships won't work. > > in

Re: Many to One Relationship

2008-08-27 Thread Daniel A.
Thanks, now is working fine. On 27 ago, 19:22, lingrlongr <[EMAIL PROTECTED]> wrote: > The error is generated because you have two fields in the Swap model > that refer to the User model, and two that refer to the Shifts model. > As the error states you need to specify the related_name value for

Re: Complex, somewhat formula...

2008-08-27 Thread Tim Chase
> TEAM > name > nickname > win > loss > rating > rank > > GAMES > date > away_team (fk) > home_team (fk) > away_score > home_score Shooting from the hip, with no actual data to experiment with, and not knowing your back-end SQL server, the SQL could look something like SELECT Team.*,

Re: database relationships

2008-08-27 Thread nek4life
Yup that did it. I could have sworn I tried that, but I guess not. Thanks again. Charlie On Aug 27, 1:27 pm, lingrlongr <[EMAIL PROTECTED]> wrote: > Try this is the template: > > {% for albumart in album.albumart_set.all %} >     {{ albumart.image }} > {% endfor %} > > On Aug 27, 11:58 am,

Re: setting a form to invalid after having called form.is_valid()

2008-08-27 Thread Rajesh Dhawan
Hi, > I have an image upload form and I want to INvalidate the form if the > uploaded image it too big. How can I get an error message in the form > saying the uploaded image is too big? > > ===Model== > class Image(models.Model): > image =

newbie question - import conflicts

2008-08-27 Thread [EMAIL PROTECTED]
All apps works fine in the local development environment, upload it to the server run syncdb and bang! import conflicts all over the place 'cannot import xxx'. Django apps and standalone apps are fine, it's only with the import statements amongst inter-related models in the project's own apps

Re: HowTo: Django view as a class

2008-08-27 Thread Jenan Wise
V: Defining a __call__ method will make *instances* of the class callable. Calling the class itself will still just instantiate it. On Tue, Aug 26, 2008 at 7:00 AM, V <[EMAIL PROTECTED]> wrote: > > Hi! > > Interesting solution. > > Another possibility if you would like to stick with a class is

Re: newbie question - import conflicts

2008-08-27 Thread Tim Kersten
Your app folder must be in the current directory, iirc, or in the python path for the import to work. Because the project is in the python path you'll always be able to import project.app. Rather than trying to "import something from app" - which as you said fails, you could try "import

Django svn 8631

2008-08-27 Thread Hernan Olivera
Hello My app crashes when I update to the last svn version 8631 with this error: ImproperlyConfigured: Error while importing URLconf 'dataentry.urls': 'module' object has no attribute 'STACKED' Obviously, my app were ok before that. Ideas?

Re: Django svn 8631

2008-08-27 Thread Ramiro Morales
On Wed, Aug 27, 2008 at 4:44 PM, Hernan Olivera <[EMAIL PROTECTED]> wrote: > > Hello > > My app crashes when I update to the last svn version 8631 with this error: > > ImproperlyConfigured: Error while importing URLconf 'dataentry.urls': > 'module' object has no attribute 'STACKED' > > Obviously,

Re: Django svn 8631

2008-08-27 Thread Jesaja Everling
Hi Hernan, I'm sure it has something to do with newforms-admin. You probably use something like this in your admin-definition: item = models.ForeignKey(Item, related_name='photos', edit_inline=models.STACKED) I don't know if you are aware of the changes that have been made to the way the

Re: Bug in ImageFieldFile.save() ?

2008-08-27 Thread Brian Morton
Thanks for the clarification. I will definitely look forward to having file-like objects work this way. I'll keep my eye out for the commit. On Aug 27, 7:23 am, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On Wed, Aug 27, 2008 at 12:37 AM, Brian Morton <[EMAIL PROTECTED]> wrote: > > The docs

running Django on a very small VPS

2008-08-27 Thread Edwin W
I was just wondering whether anyone out there has experience with running a Django application on a really small VPS. I'm using Django for small personal projects and experimentation, and I found vpslink which has a plan with 2.5 GB of disk space but only 64 MB RAM. I know that it won't work

Re: running Django on a very small VPS

2008-08-27 Thread James Matthews
Use sqllite instead of a regular DB Server. Also set a usage limit on Apache. You Should be fine. Many people run Django in a shared environment. like Webfaction and Dreamhost. Where you have a limit on the memory you can use. On Wed, Aug 27, 2008 at 1:14 PM, Edwin W <[EMAIL PROTECTED]> wrote:

Re: newbie question - import conflicts

2008-08-27 Thread James Matthews
Make the structer sitedir (manage.py urls.py,settings.py)->app(models.py views.py) And import it accordingly If your code is running in the sitedir then it should be able to import it. On Wed, Aug 27, 2008 at 12:34 PM, Tim Kersten <[EMAIL PROTECTED]> wrote: > > Your app folder must be in

Re: FileUploadHandler does strange things

2008-08-27 Thread Karen Tracey
On Wed, Aug 27, 2008 at 1:16 PM, mwebs <[EMAIL PROTECTED]> wrote: > > Thanks for your help. > > Datafile is a model and just contains a CharField, a FileField a > ForeignKey and some Booleanfields. > --- > class DataFile(models.Model): >name =

Re: setting a form to invalid after having called form.is_valid()

2008-08-27 Thread James Matthews
In your forum code you can add the clean_imageForm and add your cleaning code in there. On Wed, Aug 27, 2008 at 11:39 AM, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > > Hi, > >> I have an image upload form and I want to INvalidate the form if the >> uploaded image it too big. How can I get an

Re: setting a form to invalid after having called form.is_valid()

2008-08-27 Thread James Matthews
Whoops I pressed send too soon. In your forms code create a method called clean_imageForm and add your custom error code there. On Wed, Aug 27, 2008 at 1:33 PM, James Matthews <[EMAIL PROTECTED]> wrote: > In your forum code you can add the clean_imageForm and add your cleaning > code in there. >

droplist pre set selected

2008-08-27 Thread Gerard Petersen
Hi All, I'm trying to preset a dropdown list in a template. On a customer detail page I have a link to add a project. I got as far that the customer_id is already in the project_add method. What do I pass on to the template so that the dropdown list (with customers) has the customer with the

Re: droplist pre set selected

2008-08-27 Thread Gerard Petersen
In addition .. I just seen this one: field1 = forms.ModelChoiceField(..., initial=1,...) But i'm using this in the template: {{ form.as_table }} In combination with the ModelForm class: class ProjectForm(ModelForm): class Meta: model = Project Thanx again. Regards, Gerard.

Re: running Django on a very small VPS

2008-08-27 Thread Erik Allik
You should check out http://lincolnloop.com/blog/2008/mar/25/serving-django-cherrypy/ or simply google for "django cherrypy". Looks cool to me, I'm planning on using this in WebFaction which has 80MB RAM for the cheapest plan. Erik On 27.08.2008, at 23:14, Edwin W wrote: > > I was just

Re: running Django on a very small VPS

2008-08-27 Thread Tim Kersten
I know this isn't exactly on topic, but I signed up for http://djangohosting.ch/ today and was rather impressed. It's not a VPS, but quite impressive all the same. Tim ^,^ On Wed, Aug 27, 2008 at 9:57 PM, Erik Allik <[EMAIL PROTECTED]> wrote: > > You should check out >

Django ORM-level Caching

2008-08-27 Thread bradcater
Greetings from SF! Here's a bit from one of our internal projects. Does something like this already exist? If so, does it work well? If not, would anyone be interested in this? We now have this working (well, at least limping) with Django 0.96 and memcached. MOTIVATION: - Suppose the following

Re: newbie question - import conflicts

2008-08-27 Thread Ben Eliott
Thank you for coming back on this. Tim - The structure is organised as you say. James - Thanks for confirming it is simply a path situation, which is all it could be i guess, but for some reason things haven't been working out which has been making me think something else might have been

Re: running Django on a very small VPS

2008-08-27 Thread lingrlongr
You could also check out westhost.com. They offer VPS pretty cheap too. I successfully set up Django there a number of times already. I usually use the development (SVN) version, but since an svn client isn't installed there, I just "svn update" locally then FTP the tarball up there when I

an easy was to overwrite the submit_row templatetag

2008-08-27 Thread V
Hi! I am writing my first custom admin page where I would like to add an extra button (action). I think the easiest would be if I could simply overwrite the submit_row templatetag or just the template it calls (submit_line.html) defined in contrib.admin.templatetags.admin_modify is there a

Re: setting a form to invalid after having called form.is_valid()

2008-08-27 Thread Berco Beute
Thanks, that works great! I didn't know about 'from django.core.files.images import get_image_dimensions'. Where can I find documentation about that? I've tried a custom 'clean_image' before using PIL, but that was just plain ugly. I never knew about 'get_image_dimensions'. 2B > It's much

Another django db memory leak?

2008-08-27 Thread ristretto.rb
Previously I found get_or_create() to be leaky, so I stopped using it. Now I'm seeing filter() to be leaky. First, yes, I have DEBUG=False, and I have double checked that connection.queries is empty. Suppose the following model class Page(models.Model): type =

Re: Django Party in Montreal?

2008-08-27 Thread Dan
Nice. Any other people? Do you have any preference about where we should go? On Wed, Aug 27, 2008 at 9:26 AM, didier rano <[EMAIL PROTECTED]> wrote: > One more ! > > 2008/8/27, Dan <[EMAIL PROTECTED]>: >> >> Are there other people in the Montreal area that would like to celebrate >> the 1.0

Re: Another django db memory leak?

2008-08-27 Thread ristretto.rb
To summarize - I double checked that DEBUG=False and ran all the tests again: # 20k per call x = Page.objects.filter( #(Q(type='P') & (Q(status='N') | Q(status='R'))) & #(Q(last_action_datetime__isnull=True) |

Re: FileUploadHandler does strange things

2008-08-27 Thread mwebs
Hi Karen, for me it seems very very strange. The code I used is so simple and theoretical does not contain any bugs. I deleted every file that I uploaded in a former trial, so I dont have any file with the - for test purposes static - filename test.txt in my media-directory. What happens is

Problems With The Tutorial

2008-08-27 Thread Sonny
When I type ' python manage.py runserver' bash says no file or directory found. I'm running ubuntu 7.02? Thanks for any help you can give. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Problems With The Tutorial

2008-08-27 Thread Ray Smith
On Wed, 27 Aug 2008 15:42:08 -0700 (PDT), Sonny <[EMAIL PROTECTED]> wrote: > > When I type ' python manage.py runserver' bash says no file or > directory found. > I'm running ubuntu 7.02? > Thanks for any help you can give. Hi Sonny, Did you do a: django-admin.py startproject mysite then

Re: Problems With The Tutorial

2008-08-27 Thread lingrlongr
If manage.py is not in your PATH (it most likely isn't), you need to qualify the location. You can just use this command from within your project directory: ./manage.py runserver ./ means current directory. HTH Keith On Aug 27, 6:42 pm, Sonny <[EMAIL PROTECTED]> wrote: > When I type '

Re: Problems With The Tutorial

2008-08-27 Thread Tim Kersten
Make sure your typing the command without the quotes too. Example: python manage.py runserver Tim ^,^ On Wed, Aug 27, 2008 at 11:42 PM, Sonny <[EMAIL PROTECTED]> wrote: > > When I type ' python manage.py runserver' bash says no file or > directory found. > I'm running ubuntu 7.02? > Thanks

Dynamic URL

2008-08-27 Thread djandrow
I'm trying to create a situation where you can bring up all the blog entries in a category through the URL. I've got this in my urls.py: from django.conf.urls.defaults import * from akonline.views import current_datetime urlpatterns = patterns('', (r'^test/$', 'address.blog.views.blog'),

Re: Dynamic URL

2008-08-27 Thread lingrlongr
Your problem is here: def category_entry(request, category): entries_in_cat = Entry.objects.filter(entry_cat=category) return render_to_response('blog/index.html', locals()) Remember, the value of "category" is a string. One way or another you need adjust the filter. Something

Re: Dynamic URL

2008-08-27 Thread lingrlongr
Also, convention seems to be to spell out the field names. Because of a different namespaces, you shouldn't have to worry about too much name clashing. And if you don't provide an ID for your model, one is automatically created for you. For example: class Category(models.Model): name

How to handle platform dependent settings?

2008-08-27 Thread Gremmie
I test my code locally on my PC using the XAMPP package, and deploy the real site on Linux with Apache. My code is all common, except for settings.py and urls.py. I'd rather not have 2 versions of these files and try to manage that in my SVN repository. I was thinking about doing something like

Re: Another django db memory leak?

2008-08-27 Thread ristretto.rb
For some reason, when I do x.save() over an over, it takes about 200k, too. either I have something really messed up, or there is a real problem with this api. On Aug 28, 10:34 am, "ristretto.rb" <[EMAIL PROTECTED]> wrote: > To summarize - I double checked that DEBUG=False and ran all

Re: Problem with i18n - "en_US" locale translations coming through for "en"

2008-08-27 Thread Fran O'Reilly
I've raised the following ticket for this issue: http://code.djangoproject.com/ticket/8626 Have also confirmed on latest from svn, 1.0-beta_2-SVN-8643. The ticket includes all the files needed to reproduce the problem. On Aug 27, 5:35 pm, "Fran O'Reilly" <[EMAIL PROTECTED]> wrote: > Hi all, >

About Site in django

2008-08-27 Thread PENPEN
Hi there, I have a question on the site concept. While reading the source code, I found that there is the site related statement in django.contrib.auth.views.login: if Site._meta.installed: current_site = Site.objects.get_current() else: current_site =

Re: Wiki/CMS app?

2008-08-27 Thread Eduardo O. Padoan
On Tue, Aug 26, 2008 at 12:23 PM, Thomas Guettler <[EMAIL PROTECTED]> wrote: > > Hi, > > I search a Wiki/CMS application to manage a homepage. > > This application should: > - look like a homepage, not like a Wiki > - Content can be HTML and wiki like markup. > - No anonymous editing > -

site using Django/mod_python/apache2 randomly showing "It worked!" page

2008-08-27 Thread Richard Simões
I have non-root access to a server with apache2 and mod_python. I installed django with svn to a location in my home directory and created a test project. When I go to a URL defined with urls.py and views.py, 9/10 times the expected page is shown. The remaining 1/10 times the "It worked!" page

Re: Problem with reverse lookups in Weblog example

2008-08-27 Thread Rodney Topor
OK, I solved my problem. I now understand reverse lookups well enough to be embarrassed by the code below. Sorry to have bothered you. Rodney On Aug 27, 10:39 am, Rodney Topor <[EMAIL PROTECTED]> wrote: > Hi.  Sorry to botther the group again.  I'm working through the Weblog > example in

Marking form field label as safe?

2008-08-27 Thread Brian Morton
I am trying to do raw HTML output in a form field's label. I've tried using mark_safe on the string being passed as the label argument, but it is still escaped. Can anyone point me in the right direction please? --~--~-~--~~~---~--~~ You received this message

Re: Another django db memory leak?

2008-08-27 Thread ristretto.rb
I wanted to point this out primarily to see if anyone was experiencing similar problems, or if there are any other general comments. I also am somewhat wondering if there should be bugs reported? Or am I outside the expected use cases for the db api? When I can free up time, I would be happy to

Re: About Site in django

2008-08-27 Thread Ronny Haryanto
On Thu, Aug 28, 2008 at 8:27 AM, PENPEN <[EMAIL PROTECTED]> wrote: > I have a question on the site concept. > While reading the source code, I found that there is the site related > statement in django.contrib.auth.views.login: > >if Site._meta.installed: >current_site =

Re: site using Django/mod_python/apache2 randomly showing "It worked!" page

2008-08-27 Thread David Zhou
On Aug 27, 2008, at 9:18 PM, Richard Simões wrote: > I have non-root access to a server with apache2 and mod_python. I > installed django with svn to a location in my home directory and > created a test project. When I go to a URL defined with urls.py and > views.py, 9/10 times the expected page

Re: How to handle platform dependent settings?

2008-08-27 Thread David Zhou
On Aug 27, 2008, at 8:12 PM, Gremmie wrote: > > I test my code locally on my PC using the XAMPP package, and deploy > the real site on Linux with Apache. My code is all common, except for > settings.py and urls.py. I'd rather not have 2 versions of these files > and try to manage that in my SVN

Re: ImportError: cannot import name parse_lookup

2008-08-27 Thread Krishnaprasad Varma
Thank You Karen , for your instant reply!! Work as if you have no need of the money. Love as if nobody ever made you suffer. Dance as if nobody is watching you. Sing as if nobody is hearing you. Live as if the Paradise were on this Earth. Krishnaprasad Varma