newform and errors

2007-04-06 Thread TaMeR
I am falling in love with Django but it is quite challenging to lern django and python at the same time. I am not quite getting this. 1) I know I can do new_form.errors and I can see the errors in a shell but how do they go back to the template? 2) When I do PeopleOrgUser.objects.get(user_id =

Re: runserver detection

2007-04-06 Thread Malcolm Tredinnick
On Fri, 2007-04-06 at 22:35 -0700, [EMAIL PROTECTED] wrote: > Hi, > > Is there a way to know if django is running under the development > runserver? > > This is so that I can conditionally include the static serve urls. > Running under the development server usually means you have a different

runserver detection

2007-04-06 Thread [EMAIL PROTECTED]
Hi, Is there a way to know if django is running under the development runserver? This is so that I can conditionally include the static serve urls. Thanks in advance. -chacs66 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

Bad SQL when ordering a model by related models

2007-04-06 Thread chrominance
I'm having problems with ordering based on related fields that may be a clone of the issue brought up in ticket 1576 (http:// code.djangoproject.com/ticket/1576), though because that problem was so old and the ticket was closed I wasn't sure where I should bring this up. Also, it could just be my

Re: Interesting problem importing

2007-04-06 Thread Jeremy Dunck
On 4/6/07, Michael Newman <[EMAIL PROTECTED]> wrote: ... > Do you think I am on the right track? Is this what is causing the > nesh.thumbnail to fail silently? Jorge's suggestion is correct for troubleshooting the DJANGO_SETTINGS_MODULE error, but it is almost certainly unrelated to the problems

Re: Import, referencing modules across packages

2007-04-06 Thread Jeremy Dunck
On 4/6/07, Jorge Gajon <[EMAIL PROTECTED]> wrote: ... > > The "from project.app1.forms import Form1" line should work just fine, > what is the error you are seeing?. Make sure that the directory above "projectpath" includes an __init__.py and that it (not projectpath, but it's parent!) is on the

Re: Import, referencing modules across packages

2007-04-06 Thread Jorge Gajon
On 4/6/07, Trey <[EMAIL PROTECTED]> wrote: > > Alright, I would like to reuse one of the forms, say Form1 inside of > the views for app2. So inside of the function I try this: > > def viewfunction(request): > from app1.forms import Form1 > > which fails pretty badly, I have also tried this: > > d

Re: Interesting problem importing

2007-04-06 Thread Jorge Gajon
On 4/6/07, Michael Newman <[EMAIL PROTECTED]> wrote: > > I am extremely new to programming, much less Django, but am working my > tail off trying to deploy a student alternative Webzine site. > > For the images I have been trying to use the nesh utils, > http://trac.studioquattro.biz/djangoutils/w

Re: cx_Oracle

2007-04-06 Thread Zundra Daniel
Thanks Ramiro and sorry about the confusion. I got mixed up somewhere along the way while trying to find a fix and thought I read that the sprint code had been merged. Anyway I've checked out the boulder sprint branch and so far so good. I've gotten past that initial error at least so thats a go

Re: Most efficient way to handle two level deep relationships

2007-04-06 Thread Mike H
Hi Ben, Thank you, I had overlooked that! It works exactly as I wanted it to! Mike On 4/6/2007, "Benjamin Slavin" <[EMAIL PROTECTED]> wrote: > >Hi Mike, > >You'll probably want to check-out select_related. [0] > >With that feature, you could use: >posts = Post.objects.select_related().filter(

Re: cx_Oracle

2007-04-06 Thread Ramiro Morales
On 4/6/07, zundra <[EMAIL PROTECTED]> wrote: > > Is anyone having success using Oracle with Django? I see that oracle > support from the bolder sprint was rolled into trunk Wrong, the boulder-oracle-sprint branch hasn't been merged into trunk yet. So if you experienced the problem using trunk,

Recieving XML Documents over HTTP

2007-04-06 Thread johnny
This may be stupid question for an expert. But stupidity is in not asking. How do I access the XML Documents sent over to my server in Django View? Is it like regular request.POST? How large POST data can be sent before connection timing out? Thank you. --~--~-~--~~~-

Re: cx_Oracle

2007-04-06 Thread Jeremy Dunck
On 4/6/07, Zundra Daniel <[EMAIL PROTECTED]> wrote: > Thanks for the reply jeff. I suppose I'll have to hold off as well until > Oracle and Django are ready to play nice together. Shame though I was You might consider helping shore up the support. Work on it is ongoing: http://code.djangoprojec

Re: Most efficient way to handle two level deep relationships

2007-04-06 Thread Benjamin Slavin
Hi Mike, You'll probably want to check-out select_related. [0] With that feature, you could use: posts = Post.objects.select_related().filter(thread__slug=thread_slug) If the copy of Django you're using is recent enough (I don't know if it's in 0.96), you can use the 'depth' argument... posts =

Re: cx_Oracle

2007-04-06 Thread Zundra Daniel
Thanks for the reply jeff. I suppose I'll have to hold off as well until Oracle and Django are ready to play nice together. Shame though I was looking forward to working with this awesome framework at my day job. On 4/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I ran across the same e

Re: Block tags inside included templates not getting populated

2007-04-06 Thread Michael Newman
The extends feature is really nice in Django. It's not the php includes where everything has to be in a block in order and extended that way. Essentially that means you want all of your base block html elements in the base and then the higher you go the more detailed you can get. Using your examp

Performing an action on first-save for models with a OneToOneField

2007-04-06 Thread Benjamin Slavin
Howdy, folks, I'm currently trying to perform an action the first time an object is saved for a model that includes a OneToOneField. Normally I'd use the old "check self.id before save" approach, but models with OneToOneFields don't provide that option (they don't have a self.id variable, and se

Import, referencing modules across packages

2007-04-06 Thread Trey
This is probably more of a Python question than a Django question but I am having a little trouble referencing sibling packages. My structure is like so: projectpath/ - app1/ views.py forms.py class Form1 - app2/ views.py forms.py Alright, I would like

Djangoish Gettext Translator App

2007-04-06 Thread [EMAIL PROTECTED]
Using polib I've made (still in development) a django application for managing gettext translations. Currently you can add a gettext po file by the Admin Panel and then it will be listed on the translations list/ translation view etc. polib adds some handy data like percent of translated strings e

Re: cx_Oracle

2007-04-06 Thread jeffhg58
I ran across the same error and I went searching through some of the fixes and I find it one of the fixes for this problem. Off the top of my head I do not know which fix it was. But, after I got past this error I ran into some other errors. At this point, I had to switch to postgresql until Ora

Most efficient way to handle two level deep relationships

2007-04-06 Thread Mike H
Hi all, I'm implementing a simple forum which looks like this, but I'm concerned about how many queries are going to get run, and if there is a more efficient way o structuring my view : from django.contrib.auth.models import User class Profile(models.Model): ... some attributes here, avat

Re: Newforms best practice

2007-04-06 Thread John M
I use a very similar design, except instead of instanceform = myform(instance=instance) I use instanceform = form_for_Instance(instance) I'm not sure what the difference is, they should both return a valid Form that creates the necessary information, but I had issues like yourself for that too

Block tags inside included templates not getting populated

2007-04-06 Thread [EMAIL PROTECTED]
I'm having trouble including a template inside another template. My block tags inside the included file don't seem to get populated when I do this. In my simple example below, I'm trying to split out the header information from my base template. Before I split it out, the block "title" tags are e

Re: Selecting from too big table - SOLVED

2007-04-06 Thread Gilhad
On Thursday 05 April 2007 21:24, James Bennett wrote: > On 4/5/07, Gilhad <[EMAIL PROTECTED]> wrote: > > What do you think about the "spawning another Admin with (select) button" > > ? Is it the right way of doing things? > > That's what 'raw_id_admin' does -- it turns that part of the form into >

Re: Pickling error in Django using Apache2

2007-04-06 Thread Jeremy Dunck
On 4/6/07, paceman <[EMAIL PROTECTED]> wrote: > > I guess what I am beginning to realize is that everytime I call my > mydatetime = getHubIndexUpdateDate(0), I get a new > tz.FixedOffsetTimezone object at , noting the . Well, if using ctime is workable for you, it's certainly a way to avo

Re: Pickling error in Django using Apache2

2007-04-06 Thread paceman
I guess what I am beginning to realize is that everytime I call my mydatetime = getHubIndexUpdateDate(0), I get a new tz.FixedOffsetTimezone object at , noting the . Maybe this is what is messing pickle up since it is complaining that its not the same object. I tried changing the getHubI

Re: Pickling error in Django using Apache2

2007-04-06 Thread Jeremy Dunck
On 4/6/07, paceman <[EMAIL PROTECTED]> wrote: > > Next I tried it with cPickle: ... > >>> mydatetime > datetime.datetime(2007, 3, 3, 10, 51, 36, > tzinfo=) > >>> import cPickle > >>> cPickle.dumps(mydatetime) > "cdatetime\ndatetime\np1\n(S'\\x07\\xd7\\x03\\x03\\n3$\\x00\\x00\ ... I think that as

cx_Oracle

2007-04-06 Thread zundra
Is anyone having success using Oracle with Django? I see that oracle support from the bolder sprint was rolled into trunk however when I issue the command: $python manage.py syncdb I get the error message: return Database.Cursor.execute(self, query, params) cx_Oracle.DatabaseError: ORA-00911:

Re: Pickling error in Django using Apache2

2007-04-06 Thread paceman
Next I tried it with cPickle: >>> from hubDatView import * >>> mydatetime = getHubIndexUpdateDate(0) >>> mydatetime datetime.datetime(2007, 3, 3, 10, 51, 36, tzinfo=) >>> import cPickle >>> cPickle.dumps(mydatetime) "cdatetime\ndatetime\np1\n(S'\\x07\\xd7\\x03\\x03\\n3$\\x00\\x00\ \x00'\ncpsycopg2

Re: Pickling error in Django using Apache2

2007-04-06 Thread paceman
To try an see if the sqlalchemy datetime was causing the problem, I changed this session variable to a string. When I did this, the problem appeared to be gone, indicating that this is the cuprit. Next I called the routine by hand that gives the datetime, and played with it a bit: >>> from hub

Re: IN THE NAME OF GOD

2007-04-06 Thread M Harris
On Thursday 05 April 2007 04:43, meyyitfani wrote: > IN THE NAME OF GOD, The coming of the lawless one will be in accordance with the work of Satan displayed in all kinds of counterfeit miracles, signs and wonders, and in every sort of evil that deceives those who are perishing.They per

Re: Smartest way to display help messages per view

2007-04-06 Thread David Larlet
Ok, thanks for your answer. Eventually, I choose oliver's solution because it handles I18n thanks to gettext and model didn't (easily). 2007/4/6, Henrik Lied <[EMAIL PROTECTED]>: > > I'm not quite sure what I'd to, either. Giving the help info its own > model might be good in some way, but it mig

Re: ANN: Upcoming backwards-incompatible changes to Django development version

2007-04-06 Thread James Bennett
On 4/6/07, Henrik Lied <[EMAIL PROTECTED]> wrote: > Is this removed without a substitute? * auto_now_add is best done by overriding 'save' to fill in the date * auto_now can easily be handled by a callable default value that fills in datetime.datetime.now or datetime.date.today. * LazyDate is be

Re: ANN: Upcoming backwards-incompatible changes to Django development version

2007-04-06 Thread Henrik Lied
Yeah, you're right about that. Your example works best with editable=False, I'd say. --~--~-~--~~~---~--~~ 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@googlegrou

Re: ANN: Upcoming backwards-incompatible changes to Django development version

2007-04-06 Thread anders conbere
At least the auto_now and auto_now_add options are much better handled by overwriting a models save method class MyModel(models.Model): self.created = models.DatetimeField() self.modified = models.DatetimeField() def save(self): if not self.id: self.created = date

Re: Smartest way to display help messages per view

2007-04-06 Thread Henrik Lied
I'm not quite sure what I'd to, either. Giving the help info its own model might be good in some way, but it might be a bit overkill. Totally depends on your application. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: ANN: Upcoming backwards-incompatible changes to Django development version

2007-04-06 Thread Henrik Lied
> Examples of some of these changes are: > > * Removing the "auto_now" and "auto_now_add" options in Django models. > Is this removed without a substitute? > * Removing the LazyDate shortcut. > Again, is this removed without a substitute? --~--~-~--~~~---~--~~ Y

Re: unique_together Validator for a model with an (editable=False) field

2007-04-06 Thread Mark Soper
Thanks, Malcolm! It's encouraging to hear that others are also working on this. A follow-up question: I'm inclined to try approach #1, by adding custom subclasses of Add- and ChangeManipulator to the model (in this case called Thesis). If I can figure out way to get the dispatch mechanism to

Problem with internationalization

2007-04-06 Thread [EMAIL PROTECTED]
Hello everyone, I am trying to translate an application I made from french to english. I followed the steps described in the documentation: 1. I added a simple {% trans "Bonjour" %} tag to my index template (and before you ask, I did {% load i18n %}) 2. I created a locale folder in the applicat

Top Gadjets of this Month...

2007-04-06 Thread Jaya
Hi Check www.gadgetanalysis.com for Top Gadgets of this Month, IPOD Reviews, Digital Camera Reviews, Downloads & Lots More... Regards Gadget Team --~--~-~--~~~

Want a Free Site...

2007-04-06 Thread Jaya
Hi Do u want a free website design. Then Check http://monstertemplate.co.in for Web Templates, Flash Templates, Website Templates and Flash Banner. you can download free web templates and lots more. Regards

Fwd: Nice Metallic Cars ! !

2007-04-06 Thread Kooooool forwords
Nice Metallic Cars [image: ADVERTISE , CARS , ADS , COST PER CLICK , SAFETY CARS] [image: ADVERTISE , CARS , ADS , COST PER CLICK , SAFETY CARS] [image:

Interesting problem importing

2007-04-06 Thread Michael Newman
I am extremely new to programming, much less Django, but am working my tail off trying to deploy a student alternative Webzine site. For the images I have been trying to use the nesh utils, http://trac.studioquattro.biz/djangoutils/wiki/Thumbnail, because they look perfect and a friend recommende

CheckBoxMultipleSelect

2007-04-06 Thread JimR
First, thanks to all who have been helping me cut my teeth on Django/ Python. I have been trying to get the above widget to display "nicely" in my HTML. Here's what I have... FORMS.PY class RegistrationForm(forms.Form) ... role = forms.ChoiceField(choices=[(c.id, c.description) for c in RoleTyp

RowLevelPermissions: show_all_rows = False doesn't seem to work

2007-04-06 Thread Mike Hostetler
I just installed the latest Row Level Permissions branch. And while it does let me specify permissions on objects, if I set "show_all_rows = False" the user still sees the objects he does not have permissions for. He can't edit them (because then he gets permission denied My inner classes look

Re: tutorial 4 not working

2007-04-06 Thread Frank
I did not see that step in the tutorial to rename the templates. Thanks I am now getting this: No polls are available. I have one record on file. Frank - Original Message - From: John Danks To: [EMAIL PROTECTED] Sent: Friday, April 06, 2007 10:09 AM Subject: Re: tutoria

tutorial 4 not working

2007-04-06 Thread Frank
Hello, http://www.djangoproject.com/documentation/tutorial04/ I am getting template errors: is there a step missing? Thanks Frank here is my code: from django.conf.urls.defaults import * from mysite.polls.models import Poll info_dict = { 'queryset': Poll.objects.all(), } urlpatterns = pat

ANN: Upcoming backwards-incompatible changes to Django development version

2007-04-06 Thread Adrian Holovaty
Hi all, For a long time, we've recommended that people use the Django development version instead of the latest Django release, as we try hard to keep the development version stable. We're loosening that policy, temporarily, for the immediate future, in order to make a number of backwards-incompa

Using MPEG-7

2007-04-06 Thread V
Hi, Can any one tell me about Library for designing MPEG-7 based application in Python. Appologies for cross posting. Cheers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Django AMF with a user authentication system

2007-04-06 Thread Tomohiro Otsuka
Hi all I released new version of Django AMF. Now it comes with a user authentication system. You can integrate Django's authentication framework into Django AMF application. http://djangoamf.sourceforge.jp/index.php?DjangoAMF_en http://djangoamf.sourceforge.jp/index.php?UserManual_en http://sour

Re: upload_to with username

2007-04-06 Thread Benedict Verheyen
Stephen Mizell schreef: >> That line is executed exactly once, at the time the file is imported. So >> it is not dynamic in any way. >> >> (I seem to be saying that at least every other day here. It's normal >> Python behaviour, people. Please stop hoping it were otherwise!) > > Thanks for the he

Re: Any books available

2007-04-06 Thread Jeremy Dunck
On 4/6/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: ... > The online version (www.djangobook.com) will continue to be updated, > and I presume if sales are good enough, a second edition may be > printed at some point in the future with whatever updates have been > contributed to the online v

Off topic (Logging into django with cookies and webcrawler)

2007-04-06 Thread Tom Smith
Hello, I can't find an example anywhere that I can make sense of, but I'd like to a. Log in to Django (getting all my cookies set) b. Get an admin's screens data as HTML Am I doing something wrong or have I got it all upside down...? thanks #

Re: how do I install MySqldb on mac?

2007-04-06 Thread Jeremy Dunck
On 4/5/07, Frank Rocco <[EMAIL PROTECTED]> wrote: ... > EnvironmentError: mysql_config not found Right, so, search your computer to see if there's a file named mysql_config. If so, see if there's a way to tell MySQLdb's setup.py where to find it. If there isn't a mysql_config, you'll need to re

Re: Smartest way to display help messages per view

2007-04-06 Thread David Larlet
In fact, I don't know if I had to create a help model and associate help message to one or more url/view or if I store messages directly in url/view code. 2007/4/6, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > Just assign it as a variable _in_ the view and then pass it to the > template that way? >

Re: Any books available

2007-04-06 Thread Russell Keith-Magee
On 4/6/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > > Tim Chase wrote: > > To be published: > > http://www.amazon.com/Pro-Django-Development-Done-Right/dp/1590597257/ > > does anyone know how up-to-date this one is / will be? As I understand it, the book will be published to coincide w

Re: Smartest way to display help messages per view

2007-04-06 Thread [EMAIL PROTECTED]
Just assign it as a variable _in_ the view and then pass it to the template that way? On Apr 6, 10:23 am, "David Larlet" <[EMAIL PROTECTED]> wrote: > Hi, > > I need to display an help message for each view of my app. Sometimes > the message can be shared between more than one view, sometimes not.

Smartest way to display help messages per view

2007-04-06 Thread David Larlet
Hi, I need to display an help message for each view of my app. Sometimes the message can be shared between more than one view, sometimes not. I'm sure someone have already solve this problem... For the moment, I try to pass the message in urls.py but it's a bit ugly. Did you know if there is a s

Re: Any books available

2007-04-06 Thread Bram - Smartelectronix
Tim Chase wrote: > To be published: > http://www.amazon.com/Pro-Django-Development-Done-Right/dp/1590597257/ does anyone know how up-to-date this one is / will be? with a still fast-changing-project like django, even if the authors are the über djangoists, this book could already be out of date

Re: PATH_INFO missing first part

2007-04-06 Thread Bram - Smartelectronix
Dirk Eschler wrote: > > i had a very similiar problem once. It turned that i had a "DocumentRoot" > defined in my vhost config and that caused weird PATH_INFO problems. Django > doesn't care about the DocumentRoot (IMHO), so i just removed it, but it took > me quite a while to figure that out.