Re: Model that calls a function in another model

2008-10-28 Thread Michael Meier
Hi Karen > You might want to read this section of the docs: > http://docs.djangoproject.com/en/dev/topics/db/queries/#related-objects Thank you very much, that helped. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Getting a NameError: global name 'Lesson' is not defined

2008-10-28 Thread Daniel Strasser
Hello Djangonauts, I get a NameError and I don't know why, I'm really getting mad. What I want to do is to list the number of Lessons a Student has passed. My schoolutil/student model looks like this: from django.db import models from schoolutil.lesson.models import * class Student(models.Mode

Re: web 2.0 apps with django

2008-10-28 Thread 王凯王凯
aggua.com haokanbu.com > > > --~--~-~--~~~---~--~~ 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 to [E

Re: Getting a NameError: global name 'Lesson' is not defined

2008-10-28 Thread Daniel Roseman
On Oct 28, 7:32 am, Daniel Strasser <[EMAIL PROTECTED]> wrote: > Hello Djangonauts, > > I get a NameError and I don't know why, I'm really getting mad. What I > want to do is to list the number of Lessons a Student has passed. > > My schoolutil/student model looks like this: > > from django.db imp

Re: Template syntax question

2008-10-28 Thread Daniel Roseman
On Oct 27, 10:04 pm, Robocop <[EMAIL PROTECTED]> wrote: > So i'm looking to have an admin controlled news list, and one thing in > particular i'd like them to be able to control is how many headlines > are shown on the front page, and my current code is not doing that. > > The line i care about is

Re: Getting a NameError: global name 'Lesson' is not defined

2008-10-28 Thread Daniel Strasser
Hi Daniel > This is why it's a bad idea to do from x import *. You should always > import the things you need explicitly, then you can tell what's going > wrong. Try doing > from schoolutil.lesson.models import Lesson > and see if it still goes wrong - or if you get a more informative > error mes

Re: web 2.0 apps with django

2008-10-28 Thread Artis Caune
On Mon, Oct 27, 2008 at 9:36 PM, Ravi Kondamuru <[EMAIL PROTECTED]> wrote: > Hi, > Is there any simple app/ tutorial to understand web 2.0 application > development with django? Check "Learning Website Development with Django". You will learn how to build a bookmarking application and there is on

Re: web 2.0 apps with django

2008-10-28 Thread 王晓
how can i get the "Learning Website Development with Django"? can you give me a link? 2008/10/28 Artis Caune <[EMAIL PROTECTED]> > > On Mon, Oct 27, 2008 at 9:36 PM, Ravi Kondamuru <[EMAIL PROTECTED]> > wrote: > > Hi, > > Is there any simple app/ tutorial to understand web 2.0 application > > dev

Re: web 2.0 apps with django

2008-10-28 Thread Artis Caune
On Tue, Oct 28, 2008 at 10:20 AM, 王晓 <[EMAIL PROTECTED]> wrote: > how can i get the "Learning Website Development with Django"? > can you give me a link? Google can give you a link, just search for: "Learning Website Development with Django.pdf" -- regards, Artis Caune <. CCNA | BSDA <

Re: Getting a NameError: global name 'Lesson' is not defined

2008-10-28 Thread bruno desthuilliers
On 28 oct, 08:54, Daniel Strasser <[EMAIL PROTECTED]> wrote: > Hi Daniel > > > This is why it's a bad idea to do from x import *. You should always > > import the things you need explicitly, then you can tell what's going > > wrong. Try doing > > from schoolutil.lesson.models import Lesson > > and

Re: Foreign key with tons of items

2008-10-28 Thread Fabio Natali
gearheart wrote: > maybe limit_choices_to is what you're looking for > i had similar problem and solved with ajax autocomplete widget. I haven't yet get rid of those too-much-long inline drop down menus. I was thinking to use js to open up a window and let the user choose from some hyerarchical

How to get the Html representation of forms.Fields

2008-10-28 Thread shabda
I have some forms.Fields, which are not attached to any forms.Form. How can I get the Html representation of it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: How to get site's root path in Django

2008-10-28 Thread Graham Dumpleton
On Oct 28, 2:24 am, "yuanyun.ken" <[EMAIL PROTECTED]> wrote: > Hi, all great Django users and developers, I have a little problem. > To make @login_required work, > I have to configure those in settings.py: > root_url = '/root_url/' > LOGIN_URL = root_url + '/login/' > LOGOUT_URL =  root_url + '

Filtering QuerySet (exclude)

2008-10-28 Thread janedenone
Hi, I need to exclude certain elements from a QuerySet. My models look like this (simplified): class Author(models.Model): first_name = models.CharField(max_length=90, blank=True) last_name = models.CharField(max_length=90, blank=True) class Page(models.Model): author =

Re: URL handling and porting from 0.96 to 1.0

2008-10-28 Thread Philippe Raoult
For anyone who searches this group, i've just figured that i needed to use ur'^fichier_numerique/(?P\d+)/(?P'+REGEX_FICHIER > +')/$' so the regex is a unicode object. I've also noticed that parentheses weren't working anymore (in 0.96 i could match opening but not closing). Last but not least

Re: ifequal and numbers

2008-10-28 Thread Daniel Roseman
On Oct 27, 10:36 pm, "Alfredo Alessandrini" <[EMAIL PROTECTED]> wrote: > There is a method for write this, without write a loop: > > {% ifequal apple.number <20 %} > .. > {% endifequal %} > > Alfredo On Oct 27, 11:52 pm, "R. Gorman" <[EMAIL PROTECTED]> wrote: > You would prob

Re: Filtering QuerySet (exclude)

2008-10-28 Thread Daniel Roseman
On Oct 28, 9:33 am, janedenone <[EMAIL PROTECTED]> wrote: > Hi, > > I need to exclude certain elements from a QuerySet. My models look > like this (simplified): > > class Author(models.Model): >         first_name = models.CharField(max_length=90, blank=True) >         last_name = models.CharField

Re: REQ: Help with row-level perms and model (item, user) method problems.

2008-10-28 Thread [EMAIL PROTECTED]
Hi, Try django-granular-permissions [1]. I've just started working with it and it is quite nice. I have written a template tag to check user permissions on an object and I'll be contributing it back to the project in the next few days so keep an eye on the issues list for a patch. [1] http://cod

Re: How to get site's root url path in Django

2008-10-28 Thread Erik Allik
I don't think you need to even know the root URL as Django takes care of this automatically. Check the mod_python documentation for details. mod_wsgi and FastCGI deployment methods should take care of this transparently. Erik On 28.10.2008, at 8:28, yuanyun.ken wrote: > > Hi, all great Dj

edit_inline does not save?

2008-10-28 Thread Daniel Austria
Hello, i got a huge problem. I have got an Idea class and an ideacomment class. You can guess what these classes are used for. What i do is the following: - the ideacomment class has an foreignkey - this foreignkey is marked as edit_inline - when i edit an idea instance in the admin i can also a

Re: edit_inline does not save?

2008-10-28 Thread Erik Allik
Which version of Django are you using? edit_inline is deprecated (or even removed) in Django 1.0. You should be using admin inlines instead. Erik On 28.10.2008, at 12:47, Daniel Austria wrote: > > Hello, > > i got a huge problem. I have got an Idea class and an ideacomment > class. You can gu

Re: edit_inline does not save?

2008-10-28 Thread Daniel Austria
Oh... i m currently using 0.96.2 ... if not necessary, i ll not migrate to 1.0 .. :-) Dan On 28 Okt., 11:49, Erik Allik <[EMAIL PROTECTED]> wrote: > Which version of Django are you using? edit_inline is deprecated (or   > even removed) in Django 1.0. You should be using admin inlines ins

Re: How to get the Html representation of forms.Fields

2008-10-28 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-10-28, o godz. 10:07, przez shabda: > I have some forms.Fields, which are not attached to any forms.Form. > How can I get the Html representation of it? Fields are abstract and do not have HTML representations (contrary to widgets, which are concrete - their repr

Re: django.pl has been officially launched

2008-10-28 Thread Dominik Szopa
On 26 Paź, 18:01, Marek Kubica <[EMAIL PROTECTED]> wrote: > On Sun, 26 Oct 2008 06:32:11 -0700, Dominik Szopa wrote: > > Django Polish community site -http://www.django.plhas been officially > > launched. > > I just took a look - the design is definitely good. The examples of > polish sites usin

Re: Filtering QuerySet (exclude)

2008-10-28 Thread janedenone
Hi, On 28 Okt., 10:56, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Oct 28, 9:33 am, janedenone <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > I need to exclude certain elements from a QuerySet. My models look > > like this (simplified): > > > class Author(models.Model): > >         first_name

Re: Easiest way to pass django documentation from rest to HTML?

2008-10-28 Thread Steve Holden
Mr. Z wrote: > Which is the easiest way to pass the new django documentation from > rest to HTML? > > Thank you, > > I believe you will find a makefile that drives the Sphinx tool in the docs subdirectory. The command "make html" will create HTML documentation in docs/_build/html. regards Ste

Re: Foreign key with tons of items

2008-10-28 Thread Steve Holden
Fabio Natali wrote: > gearheart wrote: > >> maybe limit_choices_to is what you're looking for >> i had similar problem and solved with ajax autocomplete widget. >> > > I haven't yet get rid of those too-much-long inline drop down menus. > > I was thinking to use js to open up a window and

Re: How to get site's root url path in Django

2008-10-28 Thread Steve Holden
The answer to your question is the same as the first time you posted it, about fourteen hours previously. Please do not just repeat the same question - wait patiently for the answer, and if no answer comes in a couple of days then add more information to your request or otherwise change it to incr

Django full text search best solution

2008-10-28 Thread alain D.
Hi, I'm looking at all the available solutions to implement a full text index for django models and I found various projects at different stages of maturity but none of them seems to have a strong community support ... so here is the list along with my comments (and last commit time) ... it any o

Re: edit_inline does not save?

2008-10-28 Thread Daniel Roseman
On Oct 28, 10:47 am, Daniel Austria <[EMAIL PROTECTED]> wrote: > Hello, > > i got a huge problem. I have got an Idea class and an ideacomment > class. You can guess what these classes are used for. What i do is the > following: > > - the ideacomment class has an foreignkey > - this foreignkey is m

case insensitive search

2008-10-28 Thread DULMANDAKH Sukhbaatar
Hello all. Just now I've deployed my first django web app. it's kind of address book. everything went smoothly. http://docs.djangoproject.com/en/dev/ref/contrib/admin/ says that search_fields is case insensitive. but when I search some person using django admin, it shows exact matches with case.

Re: Easiest way to pass django documentation from rest to HTML?

2008-10-28 Thread James Bennett
On Mon, Oct 27, 2008 at 9:27 PM, Mr. Z <[EMAIL PROTECTED]> wrote: > Which is the easiest way to pass the new django documentation from > rest to HTML? This is covered in the documentation: http://docs.djangoproject.com/en/dev/internals/documentation/ -- "Bureaucrat Conrad, you are technicall

Re: Django along with PHP - avoiding Apache crashes

2008-10-28 Thread Giles Thomas
Graham, Thank you again for the help - as you might have guessed, my separate question that you answered on the mod_wsgi list was because I'd decided to try out the WSGI solution to the problem first. What's very strange is that although I did get the same crash when I first tried running up

Re: Getting a NameError: global name 'Lesson' is not defined

2008-10-28 Thread Daniel Strasser
> You have a circular reference between students.models and > lessons.models. The first want to import the second, which want to > import the first, etc... This just can't work. Thank you very much. I played around but I don't come to a solution. I think I'll try again. I just don't understand wh

Re: case insensitive search

2008-10-28 Thread srini
Mr.Dulmandakh Use search_fields = ['name'] in the corresponding class inside admin.py Their is no such a case sensitive exists in Django search field , It will show it's matches either case sensitive or case insensitive. > Hello all. > > Just now I've deployed my

Splitting models.py won't install models

2008-10-28 Thread Alistair Marshall
I have been trying to split my models.py file into several smaller more manageable files. I have created a folder named models, an in there, created a __init__.py file which contains: from other import * from streams import * from units import * I have then split my models into the three files m

Re: about WebServices

2008-10-28 Thread fire-eater
Tim, Do you know about a reference where I can read a full functional example??? thanks PS- Sorry about the images, I did not realize that my mail-client was sending the footer images,, sorry again --~--~-~--~~~---~--~~ You received this message because you are su

Re: Splitting models.py won't install models

2008-10-28 Thread patrickk
you could try changing the import in __init__.py to someting like this: from app_name.models.model_file import Model1, Model2, ... e.g. from library.models.material import Material, MaterialImage ... might work. patrick. On 28 Okt., 10:36, Alistair Marshall <[EMAIL PROTECTED]> wrote: > I have

Re: Getting a NameError: global name 'Lesson' is not defined

2008-10-28 Thread bruno desthuilliers
On 28 oct, 14:05, Daniel Strasser <[EMAIL PROTECTED]> wrote: > > You have a circular reference between students.models and > > lessons.models. The first want to import the second, which want to > > import the first, etc... This just can't work. > > Thank you very much. I played around but I don't

Re: edit_inline does not save?

2008-10-28 Thread Daniel Austria
Hi Daniel, thanks for your response. You were absolutely right with your idea. i removed the core=True ... and it works. Thanks again, Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Admin page: How to add a column for user that added an item

2008-10-28 Thread Robert Dailey
Hi, I currently have the following model: class Note( models.Model ): content = models.TextField() I've setup the admin page to allow users to add "notes", which basically lets them fill in the content variable. However, on the admin page I want to add a column to show the user that add

500 displayed instead of 404

2008-10-28 Thread janedenone
Hi, I use the following simple view def index(request, page_id, current_subpage=1): try: current_page = get_object_or_404(Page, pk=page_id) except: # if anything else goes wrong, display the 404 anway raise Http404 In debug mode, m

Re: case insensitive search

2008-10-28 Thread DULMANDAKH Sukhbaatar
> Use search_fields = ['name'] in the corresponding > class inside admin.py I did. Actually my text is Cyrillic. Just now I tested searching sample latin or english text, and search workin fine. Is it problem with non-english text? if so how i can fix it, and make work? -- Re

Re: 500 displayed instead of 404

2008-10-28 Thread Ronaldo Zacarias Afonso
Hi Jane, Are you sure your index view is being executed? It just seems that django can't find a URLconf rule defined for your view. []s Ronaldo. On Tue, Oct 28, 2008 at 11:36 AM, janedenone <[EMAIL PROTECTED]> wrote: > > Hi, > > I use the following simple view > > def index(request, page_id, cu

Re: How to get site's root path in Django

2008-10-28 Thread yuanyun.ken
Graham, thanks for your kindly help. I know we don't need root url when configure url mapping. but it seems that LOGIN_URL is somewhat special. When I set LOGIN_URL = '/login/' accessing http://localhost/root_url/login/ is ok, but when I access some pages which need login first, I will got 404 e

Re: case insensitive search

2008-10-28 Thread Karen Tracey
On Tue, Oct 28, 2008 at 10:54 AM, DULMANDAKH Sukhbaatar < [EMAIL PROTECTED]> wrote: > > > Use search_fields = ['name'] in the corresponding > > class inside admin.py > > I did. Actually my text is Cyrillic. Just now I tested searching > sample latin or english text, and search wo

Re: 500 displayed instead of 404

2008-10-28 Thread Steve Holden
janedenone wrote: > Hi, > > I use the following simple view > > def index(request, page_id, current_subpage=1): > try: > current_page = get_object_or_404(Page, pk=page_id) > except: > # if anything else goes wrong, display the 404 anway > raise

Re: 500 displayed instead of 404

2008-10-28 Thread Thomas Guettler
Hi, I guess that you get 500 because there is an unhandled exception. Can you see a traceback in your error log? What happens if you write "return django.http.HttpResponse('OK')" instead of raise Http404? Thomas janedenone schrieb: > Hi, > > I use the following simple view > > def index(reque

Re: Admin page: How to add a column for user that added an item

2008-10-28 Thread Steve Holden
Robert Dailey wrote: > Hi, > > I currently have the following model: > > class Note( models.Model ): > content = models.TextField() > > I've setup the admin page to allow users to add "notes", which > basically lets them fill in the content variable. However, on the > admin page I want to ad

Re: Django full text search best solution

2008-10-28 Thread Thomas Guettler
alain D. schrieb: > Hi, > > I'm looking at all the available solutions to implement a full text > index for django models and I found various projects at different > stages of maturity but none of them seems to have a strong community > support ... so here is the list along with my comments (and l

Re: Splitting models.py won't install models

2008-10-28 Thread Alistair Marshall
On Oct 28, 1:43 pm, patrickk <[EMAIL PROTECTED]> wrote: > you could try changing the import in __init__.py to someting like > this: > from app_name.models.model_file import Model1, Model2, ... > e.g. > from library.models.material import Material, MaterialImage > > ... might work. > Thanks for you

Re: Admin page: How to add a column for user that added an item

2008-10-28 Thread Robert Dailey
On Oct 28, 10:29 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Robert Dailey wrote: > > Hi, > > > I currently have the following model: > > > class Note( models.Model ): > >    content = models.TextField() > > > I've setup the admin page to allow users to add "notes", which > > basically lets them

Re: django.pl has been officially launched

2008-10-28 Thread Stan Dyck
Am I the only one who, upon seeing the subject line of this email, asked "Why would someone want to rewrite django in perl?" ;-) StanD. Dominik Szopa wrote: > > On 26 Paź, 18:01, Marek Kubica <[EMAIL PROTECTED]> wrote: > >> On Sun, 26 Oct 2008 06:32:11 -0700, Dominik Szopa wrote: >> >>

Re: Django full text search best solution

2008-10-28 Thread alain D.
Being inside database transactions is a good reason to use database's full text index ... but the sake of simplicity, a full text index created by python code inside the models declaration (easily maintainable) would be nice ... > Since all external full text indexing (sphinx, lucene) won't be pa

Re: Admin page: How to add a column for user that added an item

2008-10-28 Thread Steve Holden
Robert Dailey wrote: > On Oct 28, 10:29 am, Steve Holden <[EMAIL PROTECTED]> wrote: > >> Robert Dailey wrote: >> >>> Hi, >>> >>> I currently have the following model: >>> >>> class Note( models.Model ): >>>content = models.TextField() >>> >>> I've setup the admin p

Re: Splitting models.py won't install models

2008-10-28 Thread Rock
I tried to do this several months ago during the run up to the 1.0 release and, at that time, the capability was broken. Furthermore I recall having a discussion with some core developer that it was not on the short list to fix for 1.0. I didn't submit a ticket for this, but it may have been becau

Re: How to get site's root path in Django

2008-10-28 Thread Karen Tracey
On Tue, Oct 28, 2008 at 11:10 AM, yuanyun.ken <[EMAIL PROTECTED]> wrote: > > Graham, thanks for your kindly help. > > I know we don't need root url when configure url mapping. but it seems > that LOGIN_URL is somewhat special. > > When I set LOGIN_URL = '/login/' > accessing http://localhost/root_

How to get value of query string in template

2008-10-28 Thread yuanyun.ken
Hi,I am a newbie to Django, and will use it in my latest project right away. now I encounter a little problem. How can I get value of query string in template? http://localhost/mysite/login/?next=/mysite/product/ My aim is to set next value in my login.html, if there is "next" in query string, u

Re: Ordering M2M field?

2008-10-28 Thread euglena
most of the time, intermediate model is more useful than M2M relationship... On Oct 24, 10:16 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > OK, I have a model with a many to many relationship.. pretty > straightforward pre-1.0 code: > > class SpecialEvent(models.Model): >     sponsors = mo

Re: Creating a system with multiple types of users

2008-10-28 Thread itsnotvalid
Any reply yet? I also looked at the profile functionality from auth. Seems that I can only define a single profile for each user. What if I need to have different profiles for different users? On Oct 25, 1:25 am, itsnotvalid <[EMAIL PROTECTED]> wrote: > Is there any posts related to the permissio

FormWizard and ChoiceFields

2008-10-28 Thread David koblas
I've recently discovered FormWizard -- trying to replace my own "Wizard" in some code. I've got the following flow -- roughly : 1) authentication info (username/password) 2) use auth info to get a list of things -- present list in choice field... 3) given that choice, present anothe

Re: Donation Application

2008-10-28 Thread unklbeemer
On Oct 27, 8:24 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I don't know of any applications for this specifically, however you > can probably steal various parts of Satchmo, specifically all the > payment stuff. > > On Oct 27, 9:03 pm, unklbeemer <[EMAIL PROTECTED]> wrote: > > > I did

Re: Foreign key with tons of items

2008-10-28 Thread Frank Malina @ vizualbod.com
Use "raw_id_field" useful when you have a Foreign Key on another model with lots of records. This changes the default interface from the a select box to a custom widget --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Donation Application

2008-10-28 Thread Frank Malina @ vizualbod.com
This maybe isn't what you are looking for, but http://vizualbod.com/articles/paypaldonationlink --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users

Re: How to get value of query string in template

2008-10-28 Thread bruno desthuilliers
On 28 oct, 17:47, "yuanyun.ken" <[EMAIL PROTECTED]> wrote: > Hi,I am a newbie to Django, and will use it in my latest project right > away. > now I encounter a little problem. > > How can I get value of query string in > template?http://localhost/mysite/login/?next=/mysite/product/ > My aim is t

Re: Donation Application

2008-10-28 Thread Brian Neal
On Oct 27, 8:03 pm, unklbeemer <[EMAIL PROTECTED]> wrote: > I did some searching and found nothing. I was wondering if anyone knew > of any django applications out there for receiving donations and/or > tracking those donations (capital campaign progress, pledges donated, > etc.) > > Thanks I'll

Re: Django along with PHP - avoiding Apache crashes

2008-10-28 Thread Wes Winham
I'm currently in production with Apache2, mod_php, mod_python, Django 1.0, MySQL 5.x, and PHP5 using everything (except django) out of the Ubuntu 8.04 repository with no troubles, if that helps at all. On Oct 28, 8:58 am, Giles Thomas <[EMAIL PROTECTED]> wrote: > Graham, > > Thank you again for t

Re: Noon Help

2008-10-28 Thread Johnny Utah
Thanks a lot Peter and Jeff. Your posts have definitely pointed me in the right direction. I'll see what I come up with. If its anything functional, I'll be sure to give you guys the link. :) Also, if anybody wants to contribute code - I need all the help I can get! (and I might have some code

Re: 500 displayed instead of 404

2008-10-28 Thread janedenone
Hi, it must be some kind of unhandled exception, but I fail to see where it might occur. I now boiled down the app to a single URL pattern and a single view: # urls.py: urlpatterns = patterns('myproject.myapp.views', (r'^test/$', 'test'), ) # views.py: def test(request): raise Http40

Re: 500 displayed instead of 404

2008-10-28 Thread Karen Tracey
On Tue, Oct 28, 2008 at 2:58 PM, janedenone <[EMAIL PROTECTED]>wrote: > > Hi, > > it must be some kind of unhandled exception, but I fail to see where > it might occur. I now boiled down the app to a single URL pattern and > a single view: > [snipped] If you configure ADMINS and EMAIL_HOST, etc.

Admin / Model - "Page" model has many "Component" models

2008-10-28 Thread Liquidrums
This may be beyond the reach of Django, but I figured it was worth a shot. I have a site tool not unlike many blogs or CMSs for adding/editing pages. Recently, to enable common components to pages (such as contact forms, site-maps, carts, pre-filled content pages, etc.), the needs for the "Page"

Re: Admin / Model - "Page" model has many "Component" models

2008-10-28 Thread Liquidrums
After digging some more (trying every combination of keywords in Google & these forums), I found this: >> http://www.djangoproject.com/documentation/models/generic_relations/ This seems to be what I need. In the example in the URL, a single tag could be assigned to many objects, in the same way

Re: Admin page: How to add a column for user that added an item

2008-10-28 Thread Robert Dailey
On Oct 28, 11:17 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Robert Dailey wrote: > > On Oct 28, 10:29 am, Steve Holden <[EMAIL PROTECTED]> wrote: > > >> Robert Dailey wrote: > > >>> Hi, > > >>> I currently have the following model: > > >>> class Note( models.Model ): > >>>    content = models.T

Re: 500 displayed instead of 404

2008-10-28 Thread janedenone
Hi Karen, I did that, but the message was never sent to me. Anyway, when I create a new project with a single app, containing nothing but a single view which raises a Http404, along with a urlpattern which refers to that view – the 500 template is still displayed when I request the URL. This mu

Re: Test failures with SQLite :memory: database - contenttypes, auth and sites

2008-10-28 Thread Brian Gershon
Hi Chris, I just ran into this same issue. I eventually figured out that adding TEST_DATABASE_NAME to settings.py (to prevent Django from using the default memory database for sqlite) works around the issue. As far as debugging the memory database problem, I was getting the "IntegrityError: dja

Re: web 2.0 apps with django

2008-10-28 Thread Kenneth Gonsalves
On Tuesday 28 October 2008 01:06:26 am Ravi Kondamuru wrote: > Hi,Is there any simple app/ tutorial to understand web 2.0 application > development with django?thanks, http://docs.djangoproject.com/en/dev/intro/tutorial01/#intro-tutorial01 -- regards KG http://lawgon.livejournal.com --~--~

Admin page customization for a single model

2008-10-28 Thread Fabio Natali
Hi everybody! I need to add a link to the admin page of one of my models. [0] provides a step-by-step explanation on how to get this. The point is that, contrarily to the docs statement, that procedure will modify the "change list admin page" of all of my models, while I need to change it for ju

Re: Django along with PHP - avoiding Apache crashes

2008-10-28 Thread Graham Dumpleton
On Oct 28, 11:58 pm, Giles Thomas <[EMAIL PROTECTED]> wrote: > Graham, > > Thank you again for the help - as you might have guessed, my separate > question that you answered on themod_wsgilist was because I'd decided > to try out the WSGI solution to the problem first. > > What's very strange is

Re: Admin page customization for a single model

2008-10-28 Thread Daniel Roseman
On Oct 28, 9:34 pm, Fabio Natali <[EMAIL PROTECTED]> wrote: > Hi everybody! > > I need to add a link to the admin page of one of my models. [0] > provides a step-by-step explanation on how to get this. > > The point is that, contrarily to the docs statement, that procedure > will modify the "chang

Re: Admin page customization for a single model

2008-10-28 Thread Fabio Natali
Daniel Roseman wrote: > > [0]http://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-vs... [...] > Read the two paragraphs above the one you linked to. Which directory > you put your overridden template determines what gets overridden - all > models, all models in one app, or one model.

Re: case insensitive search

2008-10-28 Thread DULMANDAKH Sukhbaatar
> "(A bug: SQLite only understands upper/lower case for 7-bit Latin > characters. Hence the LIKE operator is case sensitive for 8-bit iso8859 > characters or UTF-8 characters. For example, the expression 'a' LIKE 'A' is > TRUE but 'æ' LIKE 'Æ' is FALSE.)." Got it. > So it sounds like you will nee

looping to create an array of category breadcrumbs

2008-10-28 Thread coderb
hi all, am having trouble finding the syntax to build an array that contains the full hierarchy of the current category. so the slug of the current category is passed to the method from the URL request data. for myslug not null catcrumb_list = Category.objects.filter(slug=myslug) catcrumb_lis

Re: looping to create an array of category breadcrumbs

2008-10-28 Thread coderb
sorry, had not finished this post before accidently submitting it... for myslug not null catcrumb_list = Category.objects.filter(slug=myslug) myslug = catcrumb_list.parent basically, I want to loop through the category model a parent is not found, and each pass, store the model tupel in

What does FieldFile._required_file() do?

2008-10-28 Thread varikin
I was looking at someone else's code and saw the following code: try: object.photo._require_file() except ValueError: #handle exception Where object is a model instance and photo is an ImageField attribute. Can someone tell me what _require_file() does? Here is the definition of it i

template system file extensions

2008-10-28 Thread IMTheNachoMan
I have a thought for improvement. Currently the template files use a .html extension for template files. While this system works I think it could be improved. Having a file as .html implies it is an HTML file. The template files are not complete HTML therefore not valid HTML files, in my opinion.

Re: What does FieldFile._required_file() do?

2008-10-28 Thread Marty Alchin
On Tue, Oct 28, 2008 at 10:31 PM, varikin <[EMAIL PROTECTED]> wrote: > try: > object.photo._require_file() > except ValueError: > #handle exception Wow, I never expected anybody to do something like that. :( > But I just don't know what this does or is suppose to. The way I read > it, i

Re: template system file extensions

2008-10-28 Thread Malcolm Tredinnick
On Tue, 2008-10-28 at 15:52 -0700, IMTheNachoMan wrote: > I have a thought for improvement. Currently the template files use > a .html extension for template files. That's not correct. Template files can have any extension you like. Django deliberately does not use the file extension to mean any

Re: Django Apps

2008-10-28 Thread Mike Hart
Eldon, maybe we could get together and set up some basic structures for what we want to accomplish. Let me know. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: What does FieldFile._required_file() do?

2008-10-28 Thread varikin
On Oct 28, 10:05 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On Tue, Oct 28, 2008 at 10:31 PM, varikin <[EMAIL PROTECTED]> wrote: > > try: > >     object.photo._require_file() > > except ValueError: > >      #handle exception > > Wow, I never expected anybody to do something like that. :( >

Re: 500 displayed instead of 404

2008-10-28 Thread Karen Tracey
On Tue, Oct 28, 2008 at 4:08 PM, janedenone <[EMAIL PROTECTED]>wrote: > > Hi Karen, > > I did that, but the message was never sent to me. > That's the first problem I'd be working on fixing, then. Long term you are likely to want that mechanism working, you've got a problem to solve right now fo

Problem with pyExcelerator and response

2008-10-28 Thread laspal
Hi, I am trying to create Excel file using pyExcelerator but my problem is I am not able to attach file to response. code : workbook = Workbook() worksheet = workbook.add_sheet('My Test Sheet') worksheet.write(0,0, 'Company', font_style('left', 1, 'red')) worksheet.write(1,1, 'He