Re: Flatpages only works when settings.DEBUG = True

2009-05-05 Thread Ronghui Yu
It works now. That's because a typo error happens in my 404.html page. And it introduces 500.Thanks all. On Tue, May 5, 2009 at 9:17 AM, Ronghui Yu wrote: > Yes, 404.html and 500.html are there. But they extend from base.html, which > depends on some context variables. I will change them to a si

Re: Adding RSS Feed to planet Django

2009-05-05 Thread Alex Gaynor
On Tue, May 5, 2009 at 8:38 AM, Kai Diefenbach wrote: > > Hi guys, > > (sorry, if this is the wrong place, I've sent already two emails to > the provided address in the last couple of weeks without feedback) > > is somebody out there, who is able to adding an RSS-Feed to > http://www.djangoproject

Re: ManyToMany with a "through" attribute in the admin profile

2009-05-05 Thread George Song
On 5/4/2009 6:36 PM, nbv4 wrote: > > > On May 4, 12:03 am, George Song wrote: >> On 5/3/2009 8:17 PM, nbv4 wrote: >> >> >> >>> On May 3, 3:51 pm, Ramiro Morales wrote: On Sun, May 3, 2009 at 4:26 PM, nbv4 wrote: > Everything is fine and dandy, except for when I want to use the admin

Re: Problem with cookie on development server

2009-05-05 Thread Andrew Se. Fefelov
The problem is: I post GET, dev server answer me too long. So long that I have to interrupt response. And the last response header in any case is Set-Cookie: . On production server with apache next header after Set Cookie is Content-Encoding: gzip. On May 5, 5:13 am, Malcolm Tredinnick wrote:

Re: Adding RSS Feed to planet Django

2009-05-05 Thread Kai Diefenbach
> The right person to email for that is Jacob Kaplan-Moss, whose email is at > the bottom of that page. I know, but as I wrote above I had no success sending emails to his email. Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Enable request timeout?

2009-05-05 Thread Shadow
Hi, thanks for the info I think you're right, fixing the problem is easier than fixing the timeout :P (though it's hard when the loop makes opening a terminal take minutes!) I might have a look into those solutions if it bugs me again. Thanks, again On May 5, 7:24 am, Graham Dumpleton wrote:

"Lookups that span relationships" + objects.exclude()

2009-05-05 Thread bweiss
Thanks Alex, that's really helpful and I'm certainly closer now! However, after a fair bit of experimenting with that exclude() method, I still can't quite get it to do what I need. I'm trying to get a list of all employees who do not have a qualification of a certain type (which I'llcall 'A1').

Re: application profiling

2009-05-05 Thread Clément Nodet
Hi there, Had that itch a few days ago, found a few nice snippets for in-browser profiling, using cProfile : http://www.djangosnippets.org/snippets/727/ or using hotshots : http://www.djangosnippets.org/snippets/605/ Also : http://www.rkblog.rk.edu.pl/w/p/django-profiling-hotshot-and-kcachegrind

Autorload urls Django

2009-05-05 Thread kingbaron
Hello, i have the next problem with django. It automatically when pass 3 minutes and 20 seconds autoreload the url where it is in that moment.I do not know how to disabled it. I have create a lot of prjects with django and it is the first time i have this problem.The Debug mode in settings is disa

Fwd: Autorload urls Django

2009-05-05 Thread Jorge Baron
sorry for this last message.I solucionate it.I have no noticed about that failed until now jeje.Thanks -- Forwarded message -- From: kingbaron Date: 2009/5/5 Subject: Autorload urls Django To: Django users Hello, i have the next problem with django. It automatically when pass

Re: cannot save in the admin site

2009-05-05 Thread Lame Spirale
I'm glad nobody is too upset about this :/ I can't even use the framework, and i spent 2 weeks on it Why isn't there any error message ? Why doesn't it even DO something ? It's just un putain de submit button ! (i feel more confortable swearing in my own language ^^) Should I file a bug report ?

Re: cannot save in the admin site

2009-05-05 Thread Russell Keith-Magee
On Tue, May 5, 2009 at 6:07 PM, Lame Spirale wrote: > > I'm glad nobody is too upset about this :/ I don't mean to belittle your problem, but we haven't got too upset because you haven't given us anything to get upset about. Once you strip back the cursing, the full extent of the detail in your

TemplateDoesNotExist registration/login.html

2009-05-05 Thread Jerzy Orlowski
Hi I am trying to run loging example from django book: http://www.djangobook.com/en/2.0/chapter14/ My urls.py is: from django.conf.urls.defaults import * from django.contrib.auth.views import login from django.contrib.auth.views import logout # Uncomment the next two lines to enable the admin:

Re: cannot save in the admin site

2009-05-05 Thread Michael Newman
On May 5, 2009, at 6:07 AM, Lame Spirale wrote: > > I'm glad nobody is too upset about this :/ > I can't even use the framework, and i spent 2 weeks on it > Why isn't there any error message ? > Why doesn't it even DO something ? It's just un putain de submit > button ! (i feel more confortable

Re: testing suite fails on auth

2009-05-05 Thread DZPM
Happened something similar to me, with test_no_remote_user and test_unknown_user. It's been fixed in trunk: http://code.djangoproject.com/changeset/10674 The ticket was: http://code.djangoproject.com/ticket/10521 -- David Arcos Sebastián On Mar 31, 4:35 pm, Filip Gruszczyński wrote: > I hav

Re: Create a web service for an existing stand alone python script

2009-05-05 Thread pallavi
Dear all, thans for your input. I read doumentation from different resources and still confused to solve my problem. any help would be appreciated. My main python program is science.py it have several modules.in it (each definition reads some parameters and results some data, that will be read by

Re: TemplateDoesNotExist registration/login.html

2009-05-05 Thread Jarek Zgoda
Wiadomość napisana w dniu 2009-05-05, o godz. 11:57, przez Jerzy Orlowski: > I am trying to run loging example from django book: > http://www.djangobook.com/en/2.0/chapter14/ > > My urls.py is: > from django.conf.urls.defaults import * > from django.contrib.auth.views import login > from django

Re: data too long in a CharField column

2009-05-05 Thread parkprimus
According to django's documentation, "The max_length is enforced at the database level and in Django's validation.". Can you verify that the max_length is configured in you database structure? On May 4, 11:46 am, MS wrote: > Hi, > > I have a problem with django+postgresql: > I have a model with

Getting to the 'latest' item in a template list

2009-05-05 Thread Alfonso
Hi, I'm using the following to pull all cost prices that match a particular product by the company that supplied the product: View: cost_prices = ProductCostPrice.objects.filter (product_id__product_id=product_id) Template: ... {% regroup cost_prices|dictsort:"supplier" by supplier as cost_lis

Re: cannot save in the admin site

2009-05-05 Thread Lame Spirale
When i turn firebug on, and press "enregistrer" absolutely nothing happens When i access the page the (development) server tells [05/May/2009 13:28:38] "GET /admin/sites/site/add/ HTTP/1.1" 200 3093 [05/May/2009 13:28:38] "GET /admin/jsi18n/ HTTP/1.1" 200 1918 but when i press "enregistrer" absol

Blogs and presentation on Euro djangocon

2009-05-05 Thread Joshua Partogi
All, Is there anyone here that blogs on euro djangocon, or have any pictures regarding the event etc. I'm curious on how it goes. Thanks. -- If you can't believe in God the chances are your God is too small. Read my blog: http://joshuajava.wordpress.com/ Follow us on twitter: http://twitter.co

Help with schema

2009-05-05 Thread Chris McComas
I have a site/database that tracks baseball players and their agents. Players can have multiple agents at one time, they also can fire agents and hire new ones at anytime, and I'd like to track all of their agents, current, or previous. I was thinking of this schema for my models, but wasn't sure

How to add a customized validation/authorization to django.contrib.admin

2009-05-05 Thread topcoder...@gmail.com
Hello everyone, In my application, I heavily used django.contrib.admin to manage my data, especially add/edit them. Now I need a quite customized validation feature added into it. Certain user may have no authority to edit some fields of some instances of a Model, and whether or not she/he can ed

'getaddrinfo failed', new to Django

2009-05-05 Thread Chris DPS
I'm starting out with Django. When I attempt to execute runserver, this error happens: Error: (10104, 'getaddrinfo failed') What is the reason for this and how can I fix it? I am not too computer-savvy, so complete explanations would be appreciated. thanks a bunch --~--~-~--~~--

invoke model's method from template

2009-05-05 Thread Gabriel .
I have a model with a method, like: class Model .. # class body def is_maintainer(user): #method body Is there any way to invoke this method from a template ? {% if model.is_maintainer request.user %} # this doesn't work or should I write my own tag ? Kind Regards --~--~-~-

Re: invoke model's method from template

2009-05-05 Thread Alex Gaynor
On Tue, May 5, 2009 at 3:18 PM, Gabriel . wrote: > > I have a model with a method, like: > > class Model .. > # class body > > def is_maintainer(user): > #method body > > Is there any way to invoke this method from a template ? > > {% if model.is_maintainer request.user %} # this doesn't

Re: data too long in a CharField column

2009-05-05 Thread MS
Hi, On 5 Maj, 14:02, parkprimus wrote: > According to django's documentation, "The max_length is enforced at > the database level and in Django's validation.".  Can you verify that > the max_length is configured in you database structure? Yes, I have it. AFAIK max_length is required in CharFiel

Re: invoke model's method from template

2009-05-05 Thread Gabriel .
On Tue, May 5, 2009 at 10:20 AM, Alex Gaynor wrote: > Yes, it's necessary to write your own tag, as you can't call methods that > take parameters from the template language. > > Alex > Thank you for the quick reply. I'll start working on it. -- Kind Regards --~--~-~--~~

Re: Separation of apps

2009-05-05 Thread eric.frederich
So the solution you recommend, "Have the foreign key point to the auth.User model and then use person.get_profile() if you need to access the profile object"... is that a "best practice" for dealing with users and profiles? Never link directly to the profile and always to the user? On May 4, 4:3

TIME_ZONE problem

2009-05-05 Thread Michel Thadeu Sabchuk
Hi guys, I'm having a weird problem with TIME_ZONE settings. Some view list objects based on the time, future time objects are not shown. The problem is that sometimes all objects that need to be shown appear normally, sometimes the latest objects are not shown. Digging on the problem I found t

Re: "Lookups that span relationships" + objects.exclude()

2009-05-05 Thread George Song
On 5/5/2009 12:47 AM, bweiss wrote: > Thanks Alex, that's really helpful and I'm certainly closer now! > However, after a fair bit of experimenting with that exclude() method, > I still can't quite get it to do what I need. > > I'm trying to get a list of all employees who do not have a > qualif

Re: Create a web service for an existing stand alone python script

2009-05-05 Thread George Song
On 5/5/2009 4:39 AM, pallavi wrote: > Dear all, > thans for your input. > I read doumentation from different resources and still confused to > solve my problem. any help would be appreciated. > > My main python program is science.py > it have several modules.in it (each definition reads some para

Re: invoke model's method from template

2009-05-05 Thread Gabriel .
I just wrote an snippet, in case someone is interested. http://www.djangosnippets.org/snippets/1486/ -- Kind Regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

ORA01400: cannot insert NULL into ("ACME"."AUTH_PERMISSION"."ID")

2009-05-05 Thread Kristian R. Van Tassell
I'm not sure what the problem here is. syncdb gets pretty far. My tables are mostly created for Django but it stops here. Does anyone have any insight? D:\acme>python manage.py syncdb Traceback (most recent call last): File "manage.py", line 11, in execute_manager(settings) File "C:\Pyt

Re: tinymce not displaying on admin template

2009-05-05 Thread Jesse
Hello Zain, Thanks for noticing that. I keep moving the files around hoping something will connect. However, even correcting this error I still don't see the tinymce in the admin template. Everything works, I'm just not able to edit with an easy editing tool. This is the script in my template

Re: "Lookups that span relationships" + objects.exclude()

2009-05-05 Thread George Song
On 5/5/2009 12:47 AM, bweiss wrote: > So to enter a Qualification obtained, users choose a name from the > data in the Employee table, and a Qualification Type from the data in > that table, and then enter the remaining details (eg. date > obtained, expiry date). Also the Qualification table

Can not get Django admin page

2009-05-05 Thread David
Hello, I am following those steps in django tutorial 2, however I can not get "django administration: Username and Password" page. I still get the "Welcome" page. I did these steps twice but I got the same result. 1. Add "django.contrib.admin" to your INSTALLED_APPS setting. 2. Run python

Re: xlrd and UploadedFile error

2009-05-05 Thread James Smagala
I'm sure any longtime users of xlrd already know this, but I figured I'd put it out there, since I had trouble tracking it down. xlrd's open_workbook function takes a file_contents argument. If you set that to file_contents=uploaded_file.read(), you can pass .xls sheets directly to it from a Dja

Re: Can not get Django admin page

2009-05-05 Thread David
...and I re-started the dev server as the 4th step david On May 5, 8:57 am, David wrote: > Hello, > > I am following  those steps in django tutorial 2,  however I can not > get "django administration: Username and Password" page. I still get > the "Welcome" page. > > I did these steps twice b

Re: Can not get Django admin page

2009-05-05 Thread Matthias Petermann
Did you add /admin to the URL? Kind regards, Matthias Am Dienstag, den 05.05.2009, 09:03 -0700 schrieb David: > ...and I re-started the dev server as the 4th step > > > david > > > On May 5, 8:57 am, David wrote: > > Hello, > > > > I am following those steps in django tutorial 2, however

How to overwrite app admin view

2009-05-05 Thread Laszlo Antal
Hi, I need to overwrite one of my app admin view. I allready changed the template but I need more control for the display of the data. For the templates I just had to create a directory under /templates/admin/appname Where do I need to put my admin view file? How could I overwrite only the cha

Single sign-in

2009-05-05 Thread Chris McCormick
Hi All, I am sensing a need for a library which allows for a user to sign into Django apps using any of their existing credentials with another site, and I wanted to start a library project for providing this to Django programmers. I thought I would ask here first and see if there is something ex

default input format for dates that will work for ModelForm?

2009-05-05 Thread klaasvanschel...@gmail.com
Hi, I would like to present the user with dates in their particular locale (Dutch). Both when presenting the date and when parsing it. As I understand, for individual form's fields this should be possible like so: my_date = forms.DateField(input_formats=('%d-%m-%Y',)) Overriding this behaviour

Re: Can not get Django admin page

2009-05-05 Thread David
yes, i added "/admin" to the url. thanks, david On May 5, 9:05 am, Matthias Petermann wrote: > Did you add /admin to the URL? > > Kind regards, > Matthias > > Am Dienstag, den 05.05.2009, 09:03 -0700 schrieb David: > > > > > ...and I re-started the dev server as the 4th step > > > david > > >

Unhandled exception

2009-05-05 Thread Raashid Malik
Hello, I have a file upload functionality which works perfectly fine locally using django dev server. but same functionality doesn't work on server and i get "An unhandled exception".. No stack trace available even though debug = True. I m using cherokee webserver. I get this error message on lo

Re: default input format for dates that will work for ModelForm?

2009-05-05 Thread klaasvanschel...@gmail.com
This is in Django 1.0.2 On May 5, 6:23 pm, "klaasvanschel...@gmail.com" wrote: > Hi, > > I would like to present the user with dates in their particular locale > (Dutch). Both when presenting the date and when parsing it. > > As I understand, for individual form's fields this should be possible

Re: Can not get Django admin page

2009-05-05 Thread Adam Stein
Maybe you need to add "/admin/" (note the 2nd slash). Could be your URL patterns are expecting an ending slash? On Tue, 2009-05-05 at 09:34 -0700, David wrote: > yes, i added "/admin" to the url. > > thanks, > > david > > > On May 5, 9:05 am, Matthias Petermann wrote: > > Did you add /admin

Re: Can not get Django admin page

2009-05-05 Thread Domain Admin
In the urls.py did you also uncomment the last line where it says: # Uncomment the next line to enable the admin: (r'^admin/(.*)', admin.site.root), ? -Nate On Tue, May 5, 2009 at 12:34 PM, David wrote: > > yes, i added "/admin" to the url. > > thanks, > > david > > > On May 5, 9:05 am, Mat

Re: Can not get Django admin page

2009-05-05 Thread David
Hi Nate, You are right... I did not uncomment (r^...). now it works. thanks so much! and thanks too to Adam and Matthias! David On May 5, 9:43 am, Domain Admin wrote: > In the urls.py did you also uncomment the last line where it says: > # Uncomment the next line to enable the admin: >  

To run manage.py syncdb without being prompted to create a superuser

2009-05-05 Thread bconnors
I'm looking at How to run manage.py syncdb without being prompted to create a superuser at http://code.djangoproject.com/wiki/CookBookScriptsNoSuperUserSyncdb >>> from django.core import management >>> from django.dispatch import dispatcher >>> from django.contrib.auth.management import create_s

Overriding save method in model

2009-05-05 Thread Thierry
I have the following model: class Pet(models.Model): name = models.CharField(max_length=64) picture = models.ImageField(upload_to='/usr/django/images/') def save(self, force_insert=False, force_update=False): // override the picture values super(Pet, self).save(force_

Re: Help with schema

2009-05-05 Thread Malcolm Tredinnick
On Tue, 2009-05-05 at 06:02 -0700, Chris McComas wrote: > I have a site/database that tracks baseball players and their agents. > Players can have multiple agents at one time, they also can fire > agents and hire new ones at anytime, and I'd like to track all of > their agents, current, or previou

Re: Separation of apps

2009-05-05 Thread Malcolm Tredinnick
On Tue, 2009-05-05 at 06:48 -0700, eric.frederich wrote: > So the solution you recommend, "Have the foreign key point to the > auth.User model and then use person.get_profile() if you need to > access the profile object"... is that a "best practice" for dealing > with users and profiles? Never li

Re: To run manage.py syncdb without being prompted to create a superuser

2009-05-05 Thread Malcolm Tredinnick
On Tue, 2009-05-05 at 10:21 -0700, bconnors wrote: > I'm looking at How to run manage.py syncdb without being prompted to > create a superuser > > at > http://code.djangoproject.com/wiki/CookBookScriptsNoSuperUserSyncdb > > >>> from django.core import management > >>> from django.dispatch import

Re: Custom SQL with a variable issue.

2009-05-05 Thread MikeL
On May 4, 11:31 am, pbzRPA wrote: > Hi, > > Could you provide the code of your model and why you would want to use > a custom sql instead of the django model object. > > Regards > Pbzrpa class Stats(models.Model) user = models.ForeignKey(User) variant = models.ForeignKey(PlazaGam

Re: default input format for dates that will work for ModelForm?

2009-05-05 Thread Malcolm Tredinnick
On Tue, 2009-05-05 at 09:23 -0700, klaasvanschel...@gmail.com wrote: > Hi, > > I would like to present the user with dates in their particular locale > (Dutch). Both when presenting the date and when parsing it. > > As I understand, for individual form's fields this should be possible > like so:

Re: TIME_ZONE problem

2009-05-05 Thread George Song
On 5/5/2009 6:48 AM, Michel Thadeu Sabchuk wrote: > Hi guys, > > I'm having a weird problem with TIME_ZONE settings. Some view list > objects based on the time, future time objects are not shown. > > The problem is that sometimes all objects that need to be shown appear > normally, sometimes the

Re: application profiling

2009-05-05 Thread Vance Dubberly
Thanks Clement. Much appreciated. 2009/5/5 Clément Nodet : > > Hi there, > > Had that itch a few days ago, found a few nice snippets for in-browser > profiling, > using cProfile : > http://www.djangosnippets.org/snippets/727/ > or using hotshots : > http://www.djangosnippets.org/snippets/605/ > >

restrict choice of recursive many to many relation

2009-05-05 Thread Bastien
Hi, This is quite new to me, I have done a recursive (self) many to many relation between blog entries so they can be linked together if the user thinks they are semantically related. It works but I would like to restrict the choices I can see in the admin list box: right now I can see every blog

Re: TIME_ZONE problem

2009-05-05 Thread Michael
Put "TZ " directive in Apache, Check if you not run other scripts (php,ruby) (or other domain) under apache. Use mod fast-cgi, wsgi. On Wed, May 6, 2009 at 6:38 AM, George Song wrote: > > On 5/5/2009 6:48 AM, Michel Thadeu Sabchuk wrote: >> Hi guys, >> >> I'm having a weird problem with TIME_ZO

Re: Overriding save method in model

2009-05-05 Thread Daniel Roseman
On May 5, 8:00 pm, Thierry wrote: > I have the following model: > > class Pet(models.Model): >     name = models.CharField(max_length=64) >     picture = models.ImageField(upload_to='/usr/django/images/') > >     def save(self, force_insert=False, force_update=False): >         // override the pi

Re: Overriding save method in model

2009-05-05 Thread Thierry
How can I set picture to the image extension? I don't think "instance.picture = ext" works: def pet_picture_upload(instance, filename): name, ext = os.path.splitext(filename) instance.picture = ext return '/usr/django/images/%s%s' % (instance.pk, ext) On May 5, 3:48 pm, Daniel R

Re: restrict choice of recursive many to many relation

2009-05-05 Thread George Song
On 5/5/2009 12:29 PM, Bastien wrote: > This is quite new to me, I have done a recursive (self) many to many > relation between blog entries so they can be linked together if the > user thinks they are semantically related. It works but I would like > to restrict the choices I can see in the admin

Re: restrict choice of recursive many to many relation

2009-05-05 Thread George Song
On 5/5/2009 12:29 PM, Bastien wrote: > This is quite new to me, I have done a recursive (self) many to many > relation between blog entries so they can be linked together if the > user thinks they are semantically related. It works but I would like > to restrict the choices I can see in the admin

popping a bigger picture from thumbnail on hover..

2009-05-05 Thread Angel Cruz
Does django have an app available that will have a big picture pop open if I hover over its thumbnail? Something like the behavior shown in this site's gallery: http://www.dailymugshot.com/main/browse I tried doing something in javascript, but Internet Explorer blocks the popup. Advance thanks w

contrib.comments as admin inline: hide fields?

2009-05-05 Thread ringemup
I've set up contrib.comments as an inline form on a related model in the Django admin. I'd like to hide a few fields (e.g. "Site") from the user and automatically populate them on save. I can't see a way to go about populating them, though, so I'm getting integrity errors such as "Column 'site_i

Really really basic,,, use of @ sign in code

2009-05-05 Thread dartdog
When you're starting out it is often the simplest stuff I'm reading some code and I see tow blocks with @permalink at the start, it looks to me that this s just a comment (that requires no termination i.e. one word??) but I just wanted confirmation, believe it or not it is about impossible to

Re: Really really basic,,, use of @ sign in code

2009-05-05 Thread Colin Bean
On Tue, May 5, 2009 at 3:56 PM, dartdog wrote: > > When you're starting out it is often the simplest stuff > I'm reading some code and I see tow blocks with @permalink at the > start, it looks to me that this s just a comment (that requires no > termination i.e. one word??)  but I just wanted

Re: Really really basic,,, use of @ sign in code

2009-05-05 Thread Wayne Koorts
> When you're starting out it is often the simplest stuff > I'm reading some code and I see tow blocks with @permalink at the > start, it looks to me that this s just a comment (that requires no > termination i.e. one word??)  but I just wanted confirmation, believe > it or not it is about imp

Re: contrib.comments as admin inline: hide fields?

2009-05-05 Thread Michael
On Tue, May 5, 2009 at 6:43 PM, ringemup wrote: > > I've set up contrib.comments as an inline form on a related model in > the Django admin. I'd like to hide a few fields (e.g. "Site") from > the user and automatically populate them on save. I can't see a way > to go about populating them, thou

Re: cannot save in the admin site

2009-05-05 Thread Russell Keith-Magee
On Tue, May 5, 2009 at 7:58 PM, Lame Spirale wrote: > > When i turn firebug on, and press "enregistrer" absolutely nothing > happens > > When i access the page the (development) server tells > [05/May/2009 13:28:38] "GET /admin/sites/site/add/ HTTP/1.1" 200 3093 > [05/May/2009 13:28:38] "GET /adm

Re: Really really basic,,, use of @ sign in code

2009-05-05 Thread dartdog
Thanks guys!! On May 5, 6:05 pm, Wayne Koorts wrote: > > When you're starting out it is often the simplest stuff > > I'm reading some code and I see tow blocks with @permalink at the > > start, it looks to me that this s just a comment (that requires no > > termination i.e. one word??)  but

Re: How to add a customized validation/authorization to django.contrib.admin

2009-05-05 Thread Zain Memon
You're going to want to override a couple of ModelAdmin methods. Take a look at this blog post. http://www.b-list.org/weblog/2008/dec/24/admin/ On Tue, May 5, 2009 at 5:19 AM, topcoder...@gmail.com wrote: > > Hello everyone, > > In my application, I heavily used django.contrib.admin to manage my

ModelAdmin.get_urls()

2009-05-05 Thread modelmike
Hi, I am successfully running 1.1 beta 1 SVN-10679. (I checked by issuing 'django.get_version()' within the Python interpreter after importing django; 'import django'.) I do not understand the documentation for ModelAdmin.get_urls(self) and maybe this post can help elucidate the section titled,

please help with FileField(upload_to='foo')

2009-05-05 Thread djangomax
According to the Django Book for version 1.0, the following should work: fileField = forms.FileField(upload_to='foo') However, I get an error saying there was an unexpected argument. Any idea why? I'm new to Django and may be doing something outright stupid. thx, djangomax --~--~-~--~-

Re: Can not get Django admin page

2009-05-05 Thread George Song
On 5/5/2009 8:57 AM, David wrote: > Hello, > > I am following those steps in django tutorial 2, however I can not > get "django administration: Username and Password" page. I still get > the "Welcome" page. > > I did these steps twice but I got the same result. > > 1. Add "django.contrib.ad

Re: please help with FileField(upload_to='foo')

2009-05-05 Thread Gabriel
djangomax escribió: > According to the Django Book for version 1.0, the following should > work: > > fileField = forms.FileField(upload_to='foo') > > However, I get an error saying there was an unexpected argument. Any > idea why? > I'm new to Django and may be doing something outright stupid. >

User field in a model?

2009-05-05 Thread Fabio Natali
Dear All, I have a Django based web application to gather recipes. I have a "recipe" model with fields "ingredients", "date added", etc. I wish I could keep track of the user who added each recipe. Am I supposed to add a "user" (or say "cook") field to my recipe model? Or can I rather get that

Re: User field in a model?

2009-05-05 Thread Gabriel
Fabio Natali escribió: > Dear All, > > I have a Django based web application to gather recipes. I have a > "recipe" model with fields "ingredients", "date added", etc. > > I wish I could keep track of the user who added each recipe. Am I > supposed to add a "user" (or say "cook") field to my rec

Re: User field in a model?

2009-05-05 Thread Fabio Natali
Gabriel wrote: [...] > Fabio Natali escribió: > > I wish I could keep track of the user who added each recipe. Am I > > supposed to add a "user" (or say "cook") field to my recipe model? Or > > can I rather get that information from the auth application for free? > > You should add a ForeingKey

Re: please help with FileField(upload_to='foo')

2009-05-05 Thread Malcolm Tredinnick
On Tue, 2009-05-05 at 21:42 -0300, Gabriel wrote: > djangomax escribió: > > According to the Django Book for version 1.0, the following should > > work: > > > > fileField = forms.FileField(upload_to='foo') > > > > However, I get an error saying there was an unexpected argument. Any > > idea why?

custom form problem...

2009-05-05 Thread NicoEchániz
Hello, I have a model which has a ForeignKey to itself. I'm doing this to represent a hierarchy which I then need to display in the corresponding select field of my form. I've come up with a simple custom Form which represents my select choices like this: - level0.a level0.a > level1.a l

Introducing FirePy, a FirePHP server library for Django

2009-05-05 Thread Sung-Jin Hong
Hello everyone! I've made a simple FirePHP server library for Django. For those who are not familiar with FirePHP, It's a Firebug extension that enables server logs to be shown at the Firebug console. You can find more information here ( http://www.firephp.org/ ). It's mainly for PHP language, bu

select_related works with sqlite but not mysql?

2009-05-05 Thread Keith Pettit
I'm trying to display a list on a page that is a combination of two different models. In development I use sqlite and the list works great, but when I go to MySQL I don't get any results. It's odd because I use pagination and I can see from my paging items there are some results but I can't call

django generic view object_detail problem

2009-05-05 Thread Waruna de Silva
Hi, I am bit new to django. I am using django generic view to display building details from Building module.(Building is model I implemented in my app) this is my url patterns (r'^building/$', list_detail.object_list, building_info), (r'^building/(?P\d+)/$', list_detail.object_detail, building_in

Re: Introducing FirePy, a FirePHP server library for Django

2009-05-05 Thread Zain Memon
What's the difference between your project and FirePython? http://firepython.binaryage.com/ On Tue, May 5, 2009 at 10:18 PM, Sung-Jin Hong wrote: > Hello everyone! > > I've made a simple FirePHP server library for Django. > > For those who are not familiar with FirePHP, It's a Firebug extension t

Re: django generic view object_detail problem

2009-05-05 Thread Clément Nodet
Hi, as mentioned in the tutorial, on generic views ( http://docs.djangoproject.com/en/dev/intro/tutorial04/#use-generic-views-less-code-is-better), your second template will have the variable 'object' in its context (not 'object_detail') So that should work: {% block content %} Building {{ o

Re: Introducing FirePy, a FirePHP server library for Django

2009-05-05 Thread Alex Gaynor
On Wed, May 6, 2009 at 8:21 AM, Zain Memon wrote: > What's the difference between your project and FirePython? > http://firepython.binaryage.com/ > > > On Tue, May 5, 2009 at 10:18 PM, Sung-Jin Hong wrote: > >> Hello everyone! >> >> I've made a simple FirePHP server library for Django. >> >> For

Re: django CommaSeparatedStringField component

2009-05-05 Thread Thomas Guettler
Hi Joshua, I have coded this some time ago. I uploaded it to djangosnippets for you (and other people): http://www.djangosnippets.org/snippets/1491/ Thomas Joshua Partogi schrieb: > Dear all, > Does anybody know a good CommaSeparatedStringField for django? The one that > I expect is sort o