login problem

2008-12-05 Thread vierda
Dear All, today I try to make login page with follow example code in djangoproject (user authentication chapter), code as following below : def my_view(request): username = request.POST['username'] password = request.POST['password'] user = authenticate(username=username, password=pass

Re: Ruby on Rails vs Django

2008-12-05 Thread Kenneth Gonsalves
On Saturday 06 Dec 2008 1:01:37 am JonathanB wrote: > admin interface, on the other hand, is permanent. It may not intended > for public consumption, but it does make sanity-testing your models > (wait! That DecimalField has the wrong max_digits! Doh!) hey - this is a good point - should go in th

Re: Can't edit reverse relation in a many2many field in admin site

2008-12-05 Thread anode
Hi, I'm not an expert either, but I think you can get what you want using a technique from here: http://code.djangoproject.com/ticket/897 Basically you just tell your Track model it's part of a many to many relationship like this: class Track(models.Model): name = models.CharField(max_lengt

Re: Django And os.path Behavior

2008-12-05 Thread Graham Dumpleton
On Dec 6, 10:07 am, dayvo <[EMAIL PROTECTED]> wrote: > Good question.  That could affect the app if I were using relative > path's or relying on the environment to locate files.  The path's I'm > using in the app are stored are absolute paths.  They work correctly > for path's that don't have un

Re: template tag

2008-12-05 Thread Eric Abrahamsen
On Dec 6, 2008, at 8:31 AM, Alfredo Alessandrini wrote: > > Hi, > > I've this variable in my template: {{ challenger.rating }} > > It'a a number... > > Can I calculate a sum like this: > > {{ challenger.rating }} + 200 ?? > > I must write a custom tag? There's already a filter for that: http

Re: transactions and locking in postgreSQL

2008-12-05 Thread Jeffrey Straszheim
msoulier wrote: > Looking at the transaction middleware that wraps a transaction around > every HTTP request, I've found that it only commits if the transaction > is "dirty" (you change something). > > So, if you use this middleware unconditionally, then in view functions > that only read, the tra

Re: Ruby on Rails vs Django

2008-12-05 Thread Jeffrey Straszheim
yejun wrote: > This is unnecessary true. Python can be very dynamic with decorate, > meta table and runtime code modification. > Of course, one can write obscure code in any languages. Personally, however, I find most online examples of meta-programming in Ruby pretty obtuse -- and I've writ

Re: UserChangeForm not working

2008-12-05 Thread Brandon Taylor
Hi Karen, I did finally get this figured out, but decided not to implement the functionality after all :) Thanks, Brandon On Dec 5, 7:47 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, Dec 5, 2008 at 3:18 AM, Brandon Taylor <[EMAIL PROTECTED]>wrote: > > > > > > > Hi everyone, > > > I wa

Re: Ruby on Rails vs Django

2008-12-05 Thread yejun
On Dec 5, 9:10 pm, Jeffrey Straszheim <[EMAIL PROTECTED]> wrote: > I give a slight edge to Python/Django over Ruby/Rails, however, because > in Python-land, things seem more transparent.  I seldom have to guess > what the language/framework will do.  With Ruby/Rails I string together > code then

Re: using locals() with render_to_response()

2008-12-05 Thread Malcolm Tredinnick
On Fri, 2008-12-05 at 13:12 -0800, Bluebit wrote: > Hey, > I was wondering if there was any disadvantages using locals() when > calling render_to_response(). One aspect that is relevant as your codebases grow and you work in larger teams, is that it's kind of a lazy, messy coding practice. It be

Re: django table locking

2008-12-05 Thread Malcolm Tredinnick
On Wed, 2008-12-03 at 11:16 -0800, msoulier wrote: > On Nov 18, 7:46 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > Django doesn't do any explicit table locking, although there are > > transactions involved. However, that shouldn't be affecting this. > > So Django is not safe to use in

Re: Bay Area Django consultant wanted

2008-12-05 Thread Malcolm Tredinnick
On Fri, 2008-12-05 at 12:47 -0800, Margie wrote: > Hi, > > I am looking for a django developer/consultant that I can consult with > in getting myself bootstrapped on django. I have an application in > mind and would like to develop it myself, but I would like someone to > advise me on the model

Re: Django And os.path Behavior

2008-12-05 Thread dayvo
Solved. I had to surround my folderpath field with smart_str according to http://docs.djangobrasil.org/ref/unicode.html#ref-unicode The only change needed in the example was on the last line: [EMAIL PROTECTED]:/home/published/www/django/catalog/music# cat demo.py import os import music.models

Re: Invalid block tag: render_comment_form (repost)

2008-12-05 Thread Malcolm Tredinnick
On Fri, 2008-12-05 at 03:17 -0600, James Bennett wrote: > On Fri, Dec 5, 2008 at 2:07 AM, Florian Lindner <[EMAIL PROTECTED]> wrote: > > Last time I used Django (pre 1.0) it was recommended to always use > > trunk since the last released version was too outdated. Has this > > changed? > > Yes. >

Re: Django And os.path Behavior

2008-12-05 Thread Karen Tracey
On Fri, Dec 5, 2008 at 6:07 PM, dayvo <[EMAIL PROTECTED]> wrote: > > Good question. That could affect the app if I were using relative > path's or relying on the environment to locate files. The path's I'm > using in the app are stored are absolute paths. They work correctly > for path's that d

Re: confused with session chapters in djangoproject

2008-12-05 Thread vierda
Dear Karen, thanks for your clarification. it clear now. Ok I will try to make the Comment model and see how it code works. regards, -vierda- On Dec 6, 8:47 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, Dec 5, 2008 at 4:10 PM, vierda <[EMAIL PROTECTED]> wrote: > > > Dear Karen, > >

Re: Ruby on Rails vs Django

2008-12-05 Thread Jeffrey Straszheim
Masklinn wrote: > I'd say that Rails and Django differ much more than Python and Ruby. > There are "small" differences between Python and Ruby, but the core > philosophies and structures of Rails and Django on the other hand are > completely unrelated and pretty much incompatible. > Consi

Re: Django And os.path Behavior

2008-12-05 Thread dayvo
from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.contrib.auth.models import User import datetime class TagItem(models.Model): foreignID = models.IntegerField() description = models.

Re: Ruby on Rails vs Django

2008-12-05 Thread Colin Bean
On Fri, Dec 5, 2008 at 4:06 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi All, > > I'm new to the django world and I was just wondering how Django > compears with Ruby on Rails ? > > did anybody try Ruby on Rails so can give us a feedback ? > > thanks > > > > Another big difference be

Re: confused with session chapters in djangoproject

2008-12-05 Thread Karen Tracey
On Fri, Dec 5, 2008 at 4:10 PM, vierda <[EMAIL PROTECTED]> wrote: > > Dear Karen, > > thanks for your reply. Actually in my learning I try to follow the > code which is provide in the book to understand how it works. It > sounds silly but from above code, I really didn't get what below line > tryi

Re: Ruby on Rails vs Django

2008-12-05 Thread yejun
I think he means python is a more traditional procedure like language than ruby is. On Dec 5, 2:43 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 5 déc, 16:16, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > Metaphorically that Python/Djangois for a conservative engineer > > minds

Re: Django And os.path Behavior

2008-12-05 Thread Carlos A. Carnero Delgado
Hello, > The path in this demo contains "El Camarón de la Isla", where the > accent character is the trouble maker. Can you post your music.models? Best regards, Carlos. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: Paginator - JSON - Serializing related issue

2008-12-05 Thread chachra
Why don't you create a new list l = [] put the pagenumber etc. only a map and append to list Then iterate over your objects and append them too. Then use simplejson.dumps() and job done ? Works for me! Cheers! Sumit On Oct 20, 5:48 am, "H. de Vries" <[EMAIL PROTECTED]> wrote: > Hey Rajesh, >

Re: Ruby on Rails vs Django

2008-12-05 Thread Bluebit
My experience with rails was fantastic. I thought there wouldn't be anything that could replace it. but eventually, as you get to know the inner workings and the limitations and the issues it has, you stop and think for a moment and look for solutions/alternatives. That was what happened to me. I

using locals() with render_to_response()

2008-12-05 Thread Bluebit
Hey, I was wondering if there was any disadvantages using locals() when calling render_to_response(). I know it might return more variables than what I need to use in the template, but in terms of performance/security, is there a reasonable concern? thanks, --~--~-~--~~~--

'extra' modifier and generic relations

2008-12-05 Thread Julien Phalip
Hi, I have an Event model which can have comments. Comments can be added to any kind of objects so the Comment model uses a generic relation via content types. When displaying a list of events I would like to display the number of comments for each event. To improve performance and limit the num

template tag

2008-12-05 Thread Alfredo Alessandrini
Hi, I've this variable in my template: {{ challenger.rating }} It'a a number... Can I calculate a sum like this: {{ challenger.rating }} + 200 ?? I must write a custom tag? Alfredo --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: How to use Fixtures and/or Initial SQL for project auth_user data?

2008-12-05 Thread Russell Keith-Magee
On Sat, Dec 6, 2008 at 1:54 AM, Jeff Kowalczyk <[EMAIL PROTECTED]> wrote: > > During early prototyping, I'm relying on specific auth_user content in > the project admin, as my app model use User as a ForeignKeyField. > > Project layout is:myproject/myapp > > Initial SQL myproject/myapp/mymodel/sql

Re: Using managers for related object access

2008-12-05 Thread Luke Graybill
Thanks for the help, bruno. I'm glad to hear that I wasn't misreading the documentation in some fashion. I'll apply your suggestions. Luke On Thu, Dec 4, 2008 at 2:21 PM, bruno desthuilliers < [EMAIL PROTECTED]> wrote: > > > > On 4 déc, 21:39, "Luke Graybill" <[EMAIL PROTECTED]> wrote: > > I am

Re: Django And os.path Behavior

2008-12-05 Thread dayvo
Good question. That could affect the app if I were using relative path's or relying on the environment to locate files. The path's I'm using in the app are stored are absolute paths. They work correctly for path's that don't have unicode characters in them. My Django app works correctly with %

transactions and locking in postgreSQL

2008-12-05 Thread msoulier
Looking at the transaction middleware that wraps a transaction around every HTTP request, I've found that it only commits if the transaction is "dirty" (you change something). So, if you use this middleware unconditionally, then in view functions that only read, the transaction will never be comm

Re: Django And os.path Behavior

2008-12-05 Thread Graham Dumpleton
What locale settings do you have set in the environment of your user account? These will not be getting used in context of Apache. Graham On Dec 6, 9:21 am, dayvo <[EMAIL PROTECTED]> wrote: > Thanks for the response Andy. > > The code does work fine in the interpreter.  It's when the code is > c

Re: djangobook.com sourcecode

2008-12-05 Thread Manu
> If you go and read about the comments system on the site, it tells you > (see:http://djangobook.com/about/comments/) exactly where it came > from: > > "Many, many thanks to Jack Slocum; the inspiration and much of the > code for the comment system comes from Jack's blog, and this site > couldn'

Re: Django And os.path Behavior

2008-12-05 Thread dayvo
Thanks for the response Andy. The code does work fine in the interpreter. It's when the code is called from a web page where it throws an error. I know it has something to do with unicode but I can't understand why os.stat is behaving differently. To test from a view:

Re: djangobook.com sourcecode

2008-12-05 Thread James Bennett
On Fri, Dec 5, 2008 at 3:45 PM, Manu <[EMAIL PROTECTED]> wrote: > Has the source code for djangobook.com ever released ? Is there a plan > to release it if it is not released ? And lastly does anyone know of > any projects which can provide the comments functionality of > djangobook.com ? If you

Re: ImportError: Could not import settings 'djangoblog.settings' (Is it on sys.path? Does it have syntax errors?): No module named djangoblog.settings

2008-12-05 Thread garagefan
nevermind. I've borked the server messing around again :) On Dec 5, 4:19 pm, garagefan <[EMAIL PROTECTED]> wrote: > http://www.kennethdavid.net/djangoblog/admin/ > getting this error on my admin page. just started working w/ > webmonkey.com's > tutorialhttp://www.webmonkey.com/tutorial/Install_D

Re: Django And os.path Behavior

2008-12-05 Thread Andy McKay
> os.path.exists behaves differently if called from a django app. Why? I don't think it does, for example: ~/sandboxes/arecibo $ ls -al ~/Desktop/ [...snip..] drwxr-xr-x 2 andy andy 68 5 Dec 21:57 El Camarón de la Isla ~/sandboxes/arecibo $ cat test.py # -*- coding: utf-8 -*- import o

Django And os.path Behavior

2008-12-05 Thread dayvo
os.path.exists behaves differently if called from a django app. Why? Can I work around this? I need to check if pathnames exist where the path may have special/unicode characters. I also need to open files from that path. The path in this demo contains "El Camarón de la Isla", where the accent

Re:

2008-12-05 Thread PFL
Rajesh -- THANK YOU very much! you are correct. My issue was not on the side -- it was on the target side -- i had a typo that was messing up the text of the id="". Once that was fixed, it worked exactly as you said it should; this was a PIBKAC issue. I did however learn something: I was not

djangobook.com sourcecode

2008-12-05 Thread Manu
Has the source code for djangobook.com ever released ? Is there a plan to release it if it is not released ? And lastly does anyone know of any projects which can provide the comments functionality of djangobook.com ? --~--~-~--~~~---~--~~ You received this message

ImportError: Could not import settings 'djangoblog.settings' (Is it on sys.path? Does it have syntax errors?): No module named djangoblog.settings

2008-12-05 Thread garagefan
http://www.kennethdavid.net/djangoblog/admin/ getting this error on my admin page. just started working w/ webmonkey.com's tutorial http://www.webmonkey.com/tutorial/Install_Django_and_Build_Your_First_App this is occurring after installing the tagging module... which including me needing to ins

Re: confused with session chapters in djangoproject

2008-12-05 Thread vierda
Dear Karen, thanks for your reply. Actually in my learning I try to follow the code which is provide in the book to understand how it works. It sounds silly but from above code, I really didn't get what below line trying to do : c = comments.Comment(comment=new_comment) somebody kindly help to

Re: django table locking

2008-12-05 Thread msoulier
On Dec 3, 2:16 pm, msoulier <[EMAIL PROTECTED]> wrote: > So one process was waiting to acquire an AccessExclusiveLock, and > there was already an AccessShareLock on it (the clients table). I've tried Django's transaction middleware, but I'm not sure that a commit is taking place in postgres, as t

Re: Error when querying with unicode data

2008-12-05 Thread dayvo
Please ignore. I've resolved this. --~--~-~--~~~---~--~~ 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 t

Bay Area Django consultant wanted

2008-12-05 Thread Margie
Hi, I am looking for a django developer/consultant that I can consult with in getting myself bootstrapped on django. I have an application in mind and would like to develop it myself, but I would like someone to advise me on the model creation and basically help guide me in getting started. Thi

Error when querying with unicode data

2008-12-05 Thread dayvo
I have the following code: otherAlbums = models.Album.objects.filter (song_album__artist__name=artist).distinct().order_by('releasedate') when artist contains a unicode value, such as 'El Camarón de la Isla', then I receive the following: Exception Type: UnicodeEncodeErr

Re:

2008-12-05 Thread Rajesh Dhawan
On Dec 5, 2:41 pm, PFL <[EMAIL PROTECTED]> wrote: > Thanks for your replies --I am still stuck here. > > >Have a look in the output from the development server - I very much doubt > >that the click results in any request being sent. > > A request is definitely sent for each of these cases: "/do

Re:

2008-12-05 Thread David Zhou
On Fri, Dec 5, 2008 at 2:41 PM, PFL <[EMAIL PROTECTED]> wrote: > A request is definitely sent for each of these cases: "/doc/", "/ > doc#", "/doc#1/". I can see each of these generating a hit on the > local dev server standard out. Are you opening them in a new tab or anything of that nature?

Re: Ruby on Rails vs Django

2008-12-05 Thread bruno desthuilliers
On 5 déc, 16:16, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Metaphorically that Python/Djangois for a conservative engineer > mindset, ??? care to elaborate on this ??? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Ruby on Rails vs Django

2008-12-05 Thread bruno desthuilliers
On 5 déc, 15:31, Masklinn <[EMAIL PROTECTED]> wrote: > On 5 Dec 2008, at 14:30 , bruno desthuilliers wrote:> On 5 déc, 13:06, > "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > >> Hi All, > > >> I'm new to the django world and I was just wondering how Django > >> compears with Ruby on Rail

Re:

2008-12-05 Thread PFL
Thanks for your replies --I am still stuck here. >Have a look in the output from the development server - I very much doubt that >the click results in any request being sent. A request is definitely sent for each of these cases: "/doc/", "/ doc#", "/doc#1/". I can see each of these generating

Re: Ruby on Rails vs Django

2008-12-05 Thread JonathanB
On Dec 5, 7:06 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > did anybody try Ruby on Rails so can give us a feedback ? As someone who tried both, I have personally found that Django better fits my conceptual models than RoR. YMMV, because conceptions are a very personal thing. My friend f

template tags for simple comparison

2008-12-05 Thread Aaron Lee
I found this wiki and seems pretty useful in general, is there any reason why it's not included in Django by default? http://code.djangoproject.com/wiki/BasicComparisonFilters --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re:

2008-12-05 Thread Daniel Roseman
On Dec 5, 6:04 pm, PFL <[EMAIL PROTECTED]> wrote: > The source generated by the templates is indeed correct; it looks > like: > > Section1 > > However,  when I click on the link, Django(?) tries to resolve it as: > > http://localhost:8000/doc/#1 -- not ---http://localhost:8000/doc#1 > > So -- how

Re: Admin widget for large number of related records

2008-12-05 Thread Daniel Roseman
On Dec 5, 6:23 pm, "Jim D." <[EMAIL PROTECTED]> wrote: > I apologize if this question has been asked/answered here before, but > I searched around and couldn't find anything. > > We're working on a django app in which we're porting some existing > user data overwe have about 100,000 user recor

Admin widget for large number of related records

2008-12-05 Thread Jim D.
I apologize if this question has been asked/answered here before, but I searched around and couldn't find anything. We're working on a django app in which we're porting some existing user data overwe have about 100,000 user records that are being imported. We have many other models that are l

Re:

2008-12-05 Thread PFL
The source generated by the templates is indeed correct; it looks like: Section1 However, when I click on the link, Django(?) tries to resolve it as: http://localhost:8000/doc/#1 -- not --- http://localhost:8000/doc#1 So -- how do I get local links working with Django? --~--~-~--~

Re: Session based messages without touching DB

2008-12-05 Thread Andre P LeBlanc
Sorry, I didn't notice that you said you didn't like the DB hits associated with the session based approach, you can use memcached sessions, or file-backed if avoid the database hits. :P On Dec 5, 12:33 pm, Andre P LeBlanc <[EMAIL PROTECTED]> wrote: > What about the patches on the ticket?  The co

Re: Session based messages without touching DB

2008-12-05 Thread Andre P LeBlanc
What about the patches on the ticket? The cookie-based approach is not the right way to do it, as the comments on that page indicate, these things should be stored server side, especially since it is being unpickled serverside, it leave a larges security hole. (and the encryption he later added

Re: Ruby on Rails vs Django

2008-12-05 Thread Marinho Brandao
I see... but what I mean is that you will find "better" informations about this on Google than asking on a list of Django-fans :P good luck :) 2008/12/5 [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > yes... I saw that thread... but it is 14 months old !!! and in IT 14 > months is a LOT > > On 5 dic,

Re: Custom Widget for admin application

2008-12-05 Thread Ricardo Bánffy
But what if I have a ForeignKey or a ManyToManyField in my model? On Fri, Dec 5, 2008 at 12:58 PM, Michel Thadeu Sabchuk <[EMAIL PROTECTED]> wrote: > Pass a grouped list to choices: > > ['group1', [(1, 'item 1'), (2, 'item 2'), ...], ...] --~--~-~--~~~---~--~~ You

How to use Fixtures and/or Initial SQL for project auth_user data?

2008-12-05 Thread Jeff Kowalczyk
During early prototyping, I'm relying on specific auth_user content in the project admin, as my app model use User as a ForeignKeyField. Project layout is:myproject/myapp Initial SQL myproject/myapp/mymodel/sql/mymodel.sql works fine, and I'm interested in initial_data.[xml/yaml/json for the sam

Re: Ruby on Rails vs Django

2008-12-05 Thread David Zhou
On Fri, Dec 5, 2008 at 9:31 AM, Masklinn <[EMAIL PROTECTED]> wrote: > > On 5 Dec 2008, at 14:30 , bruno desthuilliers wrote: >> On 5 déc, 13:06, "[EMAIL PROTECTED]" >> <[EMAIL PROTECTED]> wrote: >>> Hi All, >>> >>> I'm new to the django world and I was just wondering how Django >>> compears with R

Re: Custom Middleware TypeError exception

2008-12-05 Thread Rajesh Dhawan
On Dec 5, 11:20 am, Chris Smith <[EMAIL PROTECTED]> wrote: > Found an oddity - possibly in my code. Can't seem to work around it. > > Code in question (current multi-tenant middleware implementation): > > middleware.py .. > > from projectname.models import Tenant, HostEntry

Re: Custom Middleware TypeError exception

2008-12-05 Thread Chris Smith
On Dec 5, 4:20 pm, Chris Smith <[EMAIL PROTECTED]> wrote: > Any ideas?  Is it something silly I've done? Actually, please ignore this. The exception was firing in user code due to me forgetting to handle a capture group in a URL regex. Back to the coffee machine... Cheers, Chris. --~--~-

Re:

2008-12-05 Thread Rajesh Dhawan
> How can I get Django templates to generate links to anchors that are > *local* to the document? > In a static HTML page, I have a table of contents with links to > internal sections within the same page: > > Section1 > Section2 > > These link to sections that that look like this: > > 111 > 2

Custom Middleware TypeError exception

2008-12-05 Thread Chris Smith
Found an oddity - possibly in my code. Can't seem to work around it. Code in question (current multi-tenant middleware implementation): middleware.py .. from projectname.models import Tenant, HostEntry from django.http import HttpResponseNotFound from django.core.exceptions

Re: help with file uploads

2008-12-05 Thread Karen Tracey
On Thu, Dec 4, 2008 at 6:12 PM, Alan <[EMAIL PROTECTED]> wrote: > Hi there! > Although I have some experience in Python and Plone and have done Django > tutorial, I am still not getting how to do a simple task I proposed myself: > build a submitting page for a zip file. > > So I am looking at > ht

django-users@googlegroups.com

2008-12-05 Thread PFL
How can I get Django templates to generate links to anchors that are *local* to the document? In a static HTML page, I have a table of contents with links to internal sections within the same page: Section1 Section2 These link to sections that that look like this: 111 222 Converting the

Re: Add fields to another app model

2008-12-05 Thread Bojan Mihelac
Hey RM, thanks for your answer. I am looking into 2nd option and try to get more links on this subject. best, Bojan On Dec 4, 6:32 pm, redmonkey <[EMAIL PROTECTED]> wrote: > Hey Bojan > > There is a few ways you could do this (certainly more that what I'm > about to tell you). It depends on the

Re: Advanced list_filter in admin

2008-12-05 Thread Karen Tracey
On Fri, Dec 5, 2008 at 10:04 AM, Michel Thadeu Sabchuk <[EMAIL PROTECTED]>wrote: > > Hi guys, > > Is there a way to use advanced list_filter in admin? I can filter by > pub_date but is there a way to filter by pub_date__isnull or by some > python function? > > I want to filter all entries with pub

Re: Ruby on Rails vs Django

2008-12-05 Thread Masklinn
On 5 Dec 2008, at 14:30 , bruno desthuilliers wrote: > On 5 déc, 13:06, "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> wrote: >> Hi All, >> >> I'm new to the django world and I was just wondering how Django >> compears with Ruby on Rails ? > > Mostly just like Python compares with (with ??? to ???) Ru

Re: Ruby on Rails vs Django

2008-12-05 Thread [EMAIL PROTECTED]
I worked with Rails for about 2 years. I see a lot of innovative ideas in Rails; however, I was constantly running into issues with them changing the API. Add to that, the documentation is poor relative to that of Python Django. Metaphorically that Python/Djangois for a conservative engineer mind

Re: confused with session chapters in djangoproject

2008-12-05 Thread Karen Tracey
On Fri, Dec 5, 2008 at 9:53 AM, vierda <[EMAIL PROTECTED]> wrote: > > Dear all, > > I'm newbie in Django and have started study since two weeks. I tried > code that shows in djangoproject.com, in session chapters I got > problem with below code. It shows error that says module comments > doesn't h

Advanced list_filter in admin

2008-12-05 Thread Michel Thadeu Sabchuk
Hi guys, Is there a way to use advanced list_filter in admin? I can filter by pub_date but is there a way to filter by pub_date__isnull or by some python function? I want to filter all entries with pub_date set to None but I don´t want to change the modeladmin queryset, how can I do this? Best

AuditTrail with Django-1.0 Admin: how to define type() as dj.c.admin.autodiscovered module attribute?

2008-12-05 Thread Jeff Kowalczyk
For AuditTrail [1] to appear in Django-1.0.x Admin, I need to define a ModelAdmin subclass as a module attribute. The current version of AuditTrail still uses the Admin class attribute. How can I set the result of type('FooAdmin',admin.ModelAdmin) as a module attribute that will be located by dja

confused with session chapters in djangoproject

2008-12-05 Thread vierda
Dear all, I'm newbie in Django and have started study since two weeks. I tried code that shows in djangoproject.com, in session chapters I got problem with below code. It shows error that says module comments doesn't have attribute Comment. am I missing something here? Kindly help and thank you i

Re: Django & referential integrity

2008-12-05 Thread Karen Tracey
On Fri, Dec 5, 2008 at 8:50 AM, Thierry <[EMAIL PROTECTED]>wrote: > > I noticed that Django handles all the referential integrity issues for > delete statements at the Python/ORM level. > - Is this documented anywhere? > http://docs.djangoproject.com/en/dev/topics/db/queries/#deleting-objects >

Re: Custom Widget for admin application

2008-12-05 Thread Michel Thadeu Sabchuk
Hi Ricardo, > 1) Is there a sane way to make a custom widget that extends Select and > that has its options grouped by in tags according to some > criteria? Pass a grouped list to choices: ['group1', [(1, 'item 1'), (2, 'item 2'), ...], ...] > 2) How one does make the built-in admin app to us

Re: Change message unicode issue

2008-12-05 Thread Karen Tracey
2008/12/5 Will McGugan <[EMAIL PROTECTED]> > Hi, > > I'm getting an 500 error in my admin site when modifying an object > containing unicode. It seems to be an issue when constructing the change > message. Here's the details (running on Django 1.0). Any help would be > appreciated. > > > 'ascii' c

Custom Widget for admin application

2008-12-05 Thread Ricardo Bánffy
Hi folks. I am looking into Django and the admin framework and I have a couple newbie-ish questions: 1) Is there a sane way to make a custom widget that extends Select and that has its options grouped by in tags according to some criteria? 2) How one does make the built-in admin app to use it?

Re: modeling questions

2008-12-05 Thread Karen Tracey
On Fri, Dec 5, 2008 at 3:38 AM, Margie <[EMAIL PROTECTED]> wrote: > > Am trying to get the hang of specifying my models, so bear with me ... > > Suppose that I want to reprsent states and the cities that are in > them. I think I would have a model that looks like this: > > class State(models.Mode

Django & referential integrity

2008-12-05 Thread Thierry
I noticed that Django handles all the referential integrity issues for delete statements at the Python/ORM level. - Is this documented anywhere? Furthermore I can't seem to find a switch to turn the whole ORM/python level referential stuff off. Is there a setting for this somewhere? (I prefer the

Re: UserChangeForm not working

2008-12-05 Thread Karen Tracey
On Fri, Dec 5, 2008 at 3:18 AM, Brandon Taylor <[EMAIL PROTECTED]>wrote: > > Hi everyone, > > I want to allow users to change their username in a non-admin form. I > have a login form already working, and I can successfully show user > information. I have granted the change user permission to the

Re: Change message unicode issue

2008-12-05 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-12-05, o godz. 12:43, przez Will McGugan: > I'm getting an 500 error in my admin site when modifying an object > containing unicode. It seems to be an issue when constructing the > change message. Here's the details (running on Django 1.0). Any help > would

Re: Ruby on Rails vs Django

2008-12-05 Thread bruno desthuilliers
On 5 déc, 13:06, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi All, > > I'm new to the django world and I was just wondering how Django > compears with Ruby on Rails ? Mostly just like Python compares with (with ??? to ???) Ruby IMHO. Quite close overall, and yet very different philosophie

Session based messages without touching DB

2008-12-05 Thread Thomas Guettler
Hi, I use code based on "session based messages" from: http://code.djangoproject.com/ticket/4604 What I don't like: There are two database hits, which are not necessary: Store message in session-pickle and pop message from session-pickle. I found this: http://www.djangosnippets.org/snippets/

Re: Ruby on Rails vs Django

2008-12-05 Thread leonel
[EMAIL PROTECTED] wrote: > Hi All, > > I'm new to the django world and I was just wondering how Django > compears with Ruby on Rails ? > > did anybody try Ruby on Rails so can give us a feedback ? > > thanks > > > > > > I was as you long time ago . I was going to test both and choose . Teste

Re: Ruby on Rails vs Django

2008-12-05 Thread [EMAIL PROTECTED]
yes... I saw that thread... but it is 14 months old !!! and in IT 14 months is a LOT On 5 dic, 10:17, "Marinho Brandao" <[EMAIL PROTECTED]> wrote: > http://www.google.com.br/search?q=Ruby+on+Rails+vs+Django > > 2008/12/5 [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > > > > Hi All, > > > I'm new to th

Re: Ruby on Rails vs Django

2008-12-05 Thread Marinho Brandao
http://www.google.com.br/search?q=Ruby+on+Rails+vs+Django 2008/12/5 [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > Hi All, > > I'm new to the django world and I was just wondering how Django > compears with Ruby on Rails ? > > did anybody try Ruby on Rails so can give us a feedback ? > > thanks > >

Ruby on Rails vs Django

2008-12-05 Thread [EMAIL PROTECTED]
Hi All, I'm new to the django world and I was just wondering how Django compears with Ruby on Rails ? did anybody try Ruby on Rails so can give us a feedback ? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Change message unicode issue

2008-12-05 Thread Will McGugan
Hi, I'm getting an 500 error in my admin site when modifying an object containing unicode. It seems to be an issue when constructing the change message. Here's the details (running on Django 1.0). Any help would be appreciated. 'ascii' codec can't decode byte 0xe2 in position 37: ordinal not in

Re: Invalid block tag: render_comment_form (repost)

2008-12-05 Thread James Bennett
On Fri, Dec 5, 2008 at 2:07 AM, Florian Lindner <[EMAIL PROTECTED]> wrote: > Last time I used Django (pre 1.0) it was recommended to always use > trunk since the last released version was too outdated. Has this > changed? Yes. 0.96 -> 1.0 involved a large number of backwards-incompatible changes

modeling questions

2008-12-05 Thread Margie
Am trying to get the hang of specifying my models, so bear with me ... Suppose that I want to reprsent states and the cities that are in them. I think I would have a model that looks like this: class State(models.Model): name = models.CharField('name', max_length=20) class City(models.Mode

Re: Django is changing my html!

2008-12-05 Thread Masklinn
On 5 déc. 08, at 04:19, DragonSlayre <[EMAIL PROTECTED]> wrote: > yes, this fixed the problem. I should change my original title to > "Firefox is changing my html!" > > Thanks for the speedy responses... I was trying to do things *right* > using xhtml standards, but I guess that it's more trou

UserChangeForm not working

2008-12-05 Thread Brandon Taylor
Hi everyone, I want to allow users to change their username in a non-admin form. I have a login form already working, and I can successfully show user information. I have granted the change user permission to the user that is logged in. When I pull in the UserChangeForm from contrib.auth.forms a

Re: Populating form from instance not working

2008-12-05 Thread Brandon Taylor
Hi David, Stupid error on my part. Problem has been resolved. On Dec 5, 1:34 am, "David Zhou" <[EMAIL PROTECTED]> wrote: > On Fri, Dec 5, 2008 at 1:44 AM, Brandon Taylor <[EMAIL PROTECTED]> wrote: > > > But, the form fields aren't being populated. What am I doing wrong? > > form_for_instance is

Re: Invalid block tag: render_comment_form (repost)

2008-12-05 Thread Florian Lindner
Am 04.12.2008 um 21:58 schrieb [EMAIL PROTECTED]: > > On 04.12-20:22, Florian Lindner wrote: > [ ... ] >> I use the comments framework from the newest Django SVN checkout. > > sorry to not be of more help (i've never used the comments framework) > but i can only suggest that you select a release

Re: best practices for SOAP client in Django

2008-12-05 Thread Antoni Aloy
2008/12/4 wynfred <[EMAIL PROTECTED]>: > > Hi, all. I am new to Django/Python. For one project, I need to be > posting data to a .NET SOAP web service. I've read about the various > Python SOAP libraries, mainly SOAPpy (http://diveintopython.org/ > soap_web_services/). What is not clear yet is how

Re: Populating form from instance not working

2008-12-05 Thread David Zhou
On Fri, Dec 5, 2008 at 1:44 AM, Brandon Taylor <[EMAIL PROTECTED]> wrote: > > But, the form fields aren't being populated. What am I doing wrong? > form_for_instance is deprecated in 1.0, and everything I'm doing looks > correct from the docs at: > http://docs.djangoproject.com/en/dev/topics/form

  1   2   >