Re: Import error exception "No module named urls" when running from eclipse

2008-10-26 Thread Steve Holden
DragonSlayre wrote: [at the top, but it's now moved to the bottom] > On Oct 22, 2:03 pm, Jeff Anderson <[EMAIL PROTECTED]> wrote: > >> DragonSlayre wrote: >> >>> Hi, I'm new to django/python, and I'm testing out eclipse for >>> development. >>> >>> I'm using pydev, and managed to ru

Re: Urlconf page not found question

2008-10-26 Thread Steve Holden
onfs is from the 404 output of the test server. If so, subsidiary url.py files are show by inserting a space between the main line and the lines from the included files. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC

Re: Receiving emails via app

2008-10-26 Thread Steve Holden
felix wrote: > In general I agree with Jeff's suggestion. > > but OTOH you might be able to get pop to work > and using the pop interface maybe you can get the headers in a clean > pythonic fashion. > > it sounds like you will also have to deal with attachments, so maybe > the pop library can ha

Re: database API from external tools?

2008-10-26 Thread Steve Holden
Russell Keith-Magee wrote: > On Mon, Oct 27, 2008 at 6:05 AM, Andrew Chapman <[EMAIL PROTECTED]> wrote: > >> Russell Keith-Magee wrote: >> >>> On Sat, Oct 25, 2008 at 3:55 AM, Andrew Chapman <[EMAIL PROTECTED]> wrote: >>> >>> My question is how to package up and deploy the Djan

Re: When should I do my imports, in views.py?

2008-10-27 Thread Steve Holden
7timesTom wrote: > I have a large number of view functions which require various python, > django and other import statements. > > My question is: is it ok to put ALL my import statements at the top of > views.py and then not have to worry about which view fuction uses > what. Or must I put my imp

Re: Triggering a custom signal

2008-10-27 Thread Steve Holden
redmonkey wrote: > Thanks Matías, you've come up with a good solution, but unfortunately > this won't really work for my situation. > > For my client, online bidding ends immediately before they open > bidding on the shop floor. The catalogue for that sale must go offline > at that point. I can't

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

2008-10-27 Thread Steve Holden
yuanyun.ken 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 + '/logout/' > > But this is obviously not a go

Re: Triggering a custom signal

2008-10-27 Thread Steve Holden
redmonkey wrote: > h. Yeah, That's pretty simple. > > I could even get a reference to the Job number using -v with at, > storing that in the DB and then removing and recreating another at-job > if the user changes the time. > > Brilliant, thank you. > >

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

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: 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: 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 ): &g

Re: Is this a quirk with the admin template override mechanism or is it me?

2008-10-29 Thread Steve Holden
AndyB wrote: > I can see why it would fail - but I still wonder whether the current > behaviour is ideal. I would say that it's more likely someone would > want to override a template project wide and I can't see a neat way to > do this. > The easiest way would surely be to add another templat

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

2008-10-29 Thread Steve Holden
Robert Dailey wrote: > On Oct 28, 2:47 pm, Robert Dailey <[EMAIL PROTECTED]> wrote: > >> On Oct 28, 11:17 am, Steve Holden <[EMAIL PROTECTED]> wrote: >> [...] >> >> I'm have some more questions for you if you don't mind. When I add a >&

Re: Form with 2 models

2008-10-29 Thread Steve Holden
> Are you sure that both forms' save() methods will be called on a submit? regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ --~--~-~--~~~---~--~~ You received this message becaus

Re: 'RegistrationForm' object has no attribute 'clean_data'

2008-10-29 Thread Steve Holden
Tsinga wrote: > I am working with a new book (Learning Website Development with > Django) from Ayman Hourieh. > I am going through the application presented in that book. > If you want people who *don't* have the book to help you, you should provide a little more information. I realise that may

Re: Problem with pyExcelerator and response

2008-10-30 Thread Steve Holden
7;) >> response['Content-Disposition'] = 'attachment; >> filename=output.xls' >> workbook.save('output.xls') >> >>return response. >> >> I am able to generate output.xl file but without any data. >> Can anyone help me out

Re: Problem with pyExcelerator and response

2008-10-30 Thread Steve Holden
position'] = 'attachment; >> filename=output.xls' >> workbook.save('output.xls') >> >>return response. >> >> I am able to generate output.xl file but without any data. >> Can anyone help me out >> Thanks. Correction: the &quo

Re: __unicode__() method not working in models.py

2008-10-30 Thread Steve Holden
thing I've saved in a file for example. > > Any ideas on where I'm going wrong? > Are you declaring the encoding of your source file? Try putting # -*- coding: UTF-8 -*- at the top of your file. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC

Re: Help regarding Login form in client side (front end) in Django.

2008-10-30 Thread Steve Holden
sadeesh Arumugam wrote: > Hi Friends, > > I want to create a login form in client side, anybody please send me > the Sample login page for the client side coding.. > Are you reading the answers to your questions before sending them out again? regards Steve --~--~-~--~~

Re: Problem with pyExcelerator and response

2008-10-31 Thread Steve Holden
response['Content-Disposition'] = 'attachment; >>>> filename=output.xls' >>>> workbook.save('output.xls') >>>> >>>>return response. >>>> >>>> I am able to generate output.x

Re: sharing a module level variable

2008-11-02 Thread Steve Holden
belred wrote: > i have an wget event in a cron job. the view does some processing > which involves calling external websites and databases (takes about 25 > seconds) and updates some module level dictionary lookup variables > (about 7 MB of data) which the rest of the program reads. but > unfort

Re: django signals

2008-11-02 Thread Steve Holden
belred wrote: > i'm having touble finding documention about django signals that > explain how they behave under apache child processes. if i have a > signal go off and have a listener for that signal. will only the > listener in same child process receive it or will that same listener > in all apa

Re: random queryset, how to

2008-11-02 Thread Steve Holden
AvK wrote: > hi, > i want to get random records form the database, the queryset looks > like this : > " > questions = Question.objects.filter(quiz__pk=quiz_id).order_by('?') > [:10] > > " > the problem is that if i want to use questions variable again, it > everytimes changes the returned record

Re: random queryset, how to

2008-11-02 Thread Steve Holden
AvK wrote: > hi, > i want to get random records form the database, the queryset looks > like this : > " > PS: You asked this question at 11:44, then again at 11:45 and yet again at 12:25. Please have a little patience! regards Steve --~--~-~--~~~---~--~~ You

Re: Django's decoupling apps but template should couple them together, right?

2008-11-02 Thread Steve Holden
cts, which are a way of providing information to all pages. A slightly fuller description of your intended page structure might let people provide more accurate answers to your needs. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.hold

Re: Django's decoupling apps but template should couple them together, right?

2008-11-03 Thread Steve Holden
bruno desthuilliers wrote: > > On 3 nov, 03:56, Steve Holden <[EMAIL PROTECTED]> wrote: > (snip) > >> You might also want to look into ContextManager objects, which are a way >> of providing information to all pages. >> > > I assume you meant &#

Re: Python package names

2008-11-03 Thread Steve Holden
than modifying the source, and it's a standard Python mechanism. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Using Django

2008-11-03 Thread Steve Holden
[EMAIL PROTECTED] wrote: > I understand the mapping of urls.py but I guess I'm not clear on a few > things to begin with, like what is the equivalent to an index.html > page in django? I know that the system works off of a template system > like using "base.html" as the design skeleton for a site

Re: An interesting URL dispatcher problem

2008-11-04 Thread Steve Holden
/?$', 'filter'), > The question mark is wrapped around an extra '/' to complete the URL, > but it doesn't work. Nor does > > urlpatterns += patterns('proj.app.views', > (r'^(?P\w+)/$', 'filter'), > (r'^(?P\w+

Re: including javascript in templates

2008-11-06 Thread Steve Holden
You don't need to serve them from Apache for development - then it's OK to use Django. It's only in production you want to use some other server for media and static content. I have this at the end of my settings.py just to keep my test sites looking reasonable: # Serve static content so test si

Re: how to get the id in an admin template

2008-11-06 Thread Steve Holden
It's in the only row in your sites table. regards Steve webcomm wrote: > I don't understand the documentation. I am able to get the "view on > site" link to show, but the URL is wrong. The correct URL for the > instance is... > > http://www.mysite.com/billing/321 > > ...so I tried this... > >

Re: App initialized twice? plus, debugging tips.

2008-11-06 Thread Steve Holden
project2501 wrote: > Hi, > I'm new to django and have a couple questions. > > I have a __init__.py in my app and try to declare a simple module wide > variable. I noticed __init__.py is called twice when I run "python > manage.py runserver". Is this normal? > > I believe it can happen, yes. >

Re: A question about models

2008-11-06 Thread Steve Holden
叮叮当当 wrote: > I have a problem with model, describe as follow: > > suppose i have two models: > class A: >pass > class B: >pass > > for some reason, i must quote B in class A, and also, i must quote A > in class B, how do i solve this question? > > Use the name of the class as a string.

Re: apache and django

2008-11-10 Thread Steve Holden
If you read your httpd.conf file you will find at some point there is a line that includes the configuration data from the sites-enabled directory. This idea is to be able to switch sites on and off by adding and removing symbolic links from sites-enabled. Make sure you *always* edit the files in

Re: question(s) about django-registration, default user profiles and django-profiles

2008-11-11 Thread Steve Holden
Alex S. wrote: > hi there, > > i want to use django-profiles to save some additional data for each > user. so i created the needed profile model and set it in my settings > file. after some looking over the standard user model i found fields > for first- and lastname. i need that data in my profil

Re: Setting Up Django on Vista and Creating a Database

2008-11-11 Thread Steve Holden
the first half of your answer a little too quickly. Try D:\Python26\python setup.py install or just make sure that D:\Python26\ is added to your path (assuming that's where you installed Python). regards Steve -- Steve Holden+1 571 484 6266 +1 8

Re: Setting Up Django on Vista and Creating a Database

2008-11-11 Thread Steve Holden
wish to create a Database with username and > password all with the same name ie "myforum" > This is really dependent on the database platform you are planning to use, and not specifically a Django-related question anyway, though it's related enough that I am sure that others

Re: Recursive function

2008-11-12 Thread Steve Holden
n 12 nov, 14:43, bruno desthuilliers <[EMAIL PROTECTED]> > wrote: > >> On 12 nov, 14:25, gontran <[EMAIL PROTECTED]> wrote:> On 12 nov, 13:22, >> Steve Holden <[EMAIL PROTECTED]> wrote: >> >> >>>> gontran wrote: &

Re: creating django middleware

2008-11-12 Thread Steve Holden
ershadul wrote: > Dear all, > please consider the following code-block: > > class SQLAlchemySessionMiddleware(object): > """ > This class instantiates a sqlalchemy session and destroys > """ > def process_request(self, request): > request.db_session = session() > re

Re: user-registration

2008-11-12 Thread Steve Holden
. Well you are either going to have to install registration somewhere you can edit the files or get permission to edit them in the site-packages directory. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ --~--~---

Re: Recursive function

2008-11-12 Thread Steve Holden
custom tag to build a menu And is there a rule that says you can't do that using templates? regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ --~--~-~--~~~---~--~~ You received t

Re: [Errno 13] Permission denied while using apache2

2008-11-12 Thread Steve Holden
laspal wrote: > hi, > I am trying to create folder. > here is the code: > if not os.path.isdir(str(_user.username)): > os.mkdir(str(_user.username) ) > filepathwithname = os.path.join(str(_user.username), file_name) > if not os.path.isfile(filepathwithname): > workbook

Re: Performing an operation

2008-11-12 Thread Steve Holden
the Django models just as >> you would do in a view. Perhaps the best way of doing this is to >> create a custom manage.py command - >> seehttp://docs.djangoproject.com/en/dev/howto/custom-management-commands... >> for how this is done. >> >> You can then set cron t

Re: slow django builtin webserver

2008-11-12 Thread Steve Holden
sounds a bit like a DNS problem to me, though that's only one of many possible diagnoses. Is "localhost" set in the /etc/hosts file? regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ --~--~-~--~~

Re: creating django middleware

2008-11-13 Thread Steve Holden
ershadul wrote: > Dear , > I dont know whether my process_request() is being called or not? > Can you inform me please, how can i verify that my middleware's > process_request() is called ? > > On Nov 12, 4:42 am, Steve Holden <[EMAIL PROTECTED]> wrote: &g

Re: Simple date issue ...

2008-11-13 Thread Steve Holden
> > I'm probably missing something really simple here ... How are you declaring the dates in the model, and what database platform are you running on? regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ --~-

Re: Read/Create Excel xls files using django

2008-11-13 Thread Steve Holden
Kurczak wrote: > On 13 Lis, 20:45, dj <[EMAIL PROTECTED]> wrote: > >> Hello All, >> >> I am trying to detemine if there is a way to read the data from an >> Excel xls file into django. I also need to create an xls file. Does >> anyone know how that would be done ? >> > If you have windows

Re: Templates - testing multiple things on IF line

2008-11-13 Thread Steve Holden
John M wrote: > Does the IF tag allow for OR's or AND's? > > Yes. You can use one or the other, but not both, IIRC. [Checks documentation]. Yes: "If you need to combine and and or to do advanced logic, just use nested if tags." regards Steve --~--~-~--~~~---~--~-

Re: Foreign Key with a default key

2008-11-13 Thread Steve Holden
Luke Seelenbinder wrote: > I'm am trying to make a ForeignKey with a default value. > But when I save i get a "invalid literal for int() with base 10: 'Stat > object'" error > Here is my code: > > from django.db import models > > class Stat(models.Model): > total = models.Integ

Re: Read/Create Excel xls files using django

2008-11-13 Thread Steve Holden
m h wrote: > On Thu, Nov 13, 2008 at 4:54 PM, Tim Chase > <[EMAIL PROTECTED]> wrote: > >>> I am trying to detemine if there is a way to read the data from an >>> Excel xls file into django. I also need to create an xls file. Does >>> anyone know how that would be done ? >>> >> In additio

Re: Simple date issue ...

2008-11-14 Thread Steve Holden
dbee wrote: > DateField and Postgresql > > Thanks > > On Nov 13, 6:53 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> dbee wrote: >>> I'm having a simple issue here trying to pull dates out of a database. >>> I can only pull out double digit

Re: how to print a data structure in django template

2008-11-14 Thread Steve Holden
{ key } > > # this will give me father / son > > { % endfor %} > > My problem how do I access parts like family['f'']['first'] should > give me "Mahesh" and family['s']['last'] should gibe me 'Swami; > {{ family.f.f

Re: Views triggering twice

2008-11-14 Thread Steve Holden
made. > > The moral is (again) "don't put style elements in your HTML", I > guess. :-) > Nice piece of debugging! regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ --~--~-~--~~

Re: general problems with installing downloaded django apps

2008-11-16 Thread Steve Holden
ou can pick them up by having 'django.template.loaders.app_directories.load_template_source' in your settings.TEMPLATE_LOADERS, in the latter case you can put the templates pretty much wherever you want. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LL

Re: general problems with installing downloaded django apps

2008-11-16 Thread Steve Holden
webcomm wrote: [Please don't top-post ... I've moved your answer down] > On Nov 16, 1:01 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> webcomm wrote: >>> Maybe I'm starting to get the idea... can apps be installed anywhere, >>> as long as they are

Re: general problems with installing downloaded django apps

2008-11-16 Thread Steve Holden
webcomm wrote: [yet again at the top of the message, so I have yet again moved the response down to where it reads logically ...] > On Nov 16, 2:35 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> webcomm wrote: >> >> [Please don't top-post ... I've moved your a

Re: populating database model with form model

2008-11-16 Thread Steve Holden
ose to be an "orbitz > equivalent" for my software engineering class. we chose to use django > and app engine for the free hosting and a chance to use something we > had only read about (django). > [...] -- Steve Holden+1 571 484 6266 +1 800 4

Re: Order of Middleware

2008-11-17 Thread Steve Holden
Peter wrote: > When I run django admin and do startproject I get a settings file that > has: > > MIDDLEWARE_CLASSES = ( > 'django.middleware.common.CommonMiddleware', > 'django.contrib.sessions.middleware.SessionMiddleware', > 'django.contrib.auth.middleware.AuthenticationMiddleware',

Re: Items tree in Django

2008-11-19 Thread Steve Holden
think > they're good measures, but at various ends of the scale (and, let's be > serious here: 500 is small), alternative strategies work very well. > In RDBMS terms 500 is *tiny*, and handling the complexity in Python is a very viable strategy at that level unless th

Re: Using generic view to insert a simple model in the DB

2008-11-19 Thread Steve Holden
maury wrote: > Updates: > > I found some documentation and I added a code to urls.py like this : > > (r'^poll/add$', create_update.create_object, {'model' : Poll}), > > and the problem is that I have to write a template (I know where the > file should be and how it should be named from the error m

Re: serving static file via django

2008-11-19 Thread Steve Holden
tter for a (one-pixel?) graphics. Whether what the Django server *does* provide is sufficiently secure for your needs only you can decide. But you can't say you weren't warned if everything goes pear-shaped ;-) regards Steve -- Steve Holden+1 571 484

Re: serving static file via django

2008-11-20 Thread Steve Holden
Graham Dumpleton wrote: > > > On Nov 20, 1:41 pm, Steve Holden <[EMAIL PROTECTED]> wrote: [...] >> The drawbacks are that the Django web servers aren't designed to the >> same rigorous security standards that are applied to production web >> servers lik

Re: Django install

2008-11-20 Thread Steve Holden
waltbrad wrote: > Hi folks. I'm trying to install on my pc Django without success. I > was using instantdjango, but I'm told that there is some danger > because of it's internal webserver? > Anyway, I downloaded django and put the folder into C:\Python25\Lib > \site-packages. I also put the path

Re: Django install

2008-11-20 Thread Steve Holden
waltbrad wrote: > > On Nov 20, 1:20 pm, Sahil R Cooner <[EMAIL PROTECTED]> wrote: > >> Have you tried checking out the django documentation, it's gotten a lot >> better than a year ago. >> >> You can find what you're looking for there >> at:http://docs.djangoproject.com/en/dev/topics/install/?

Re: Is it possible to bind two forms to a single method?

2008-11-20 Thread Steve Holden
ayayalar wrote: > I have the following forms: > > from django.forms.models import ModelForm > from demo.home.models import Product, ProductDetail > > class ProductForm(ModelForm): > class Meta: > model = Product > > > class ProductDetailForm(ModelForm): > class Meta: > mode

Re: indentation problem in file

2008-11-20 Thread Steve Holden
waltbrad wrote: > Hate to bother with this, I'm sure it's a small thing. I'm going > through the 1st django app tutorial in the django documentation. I'm > doing okay until the Unicode statements they want inserted into the > models.py file, for the representation of objects in the interpreter.

Re: ImportError: No module named psycopg2 on XP

2008-11-20 Thread Steve Holden
dj wrote: > Hello All, > > I am trying to use PostgreSQL database and am I an stuck in the > install of psycopg2. > I downloaded the psycopg2-2.0.8.tar and extracted the file to C: > \Python26\Lib\site-packages. > I opened a cmd box and typed python setup.py install. The build > completed without

Re: ImportError: No module named psycopg2 on XP

2008-11-20 Thread Steve Holden
Steve Holden wrote: > dj wrote: > >> Hello All, >> >> I am trying to use PostgreSQL database and am I an stuck in the >> install of psycopg2. >> > [...] > > Hope this helps, though it may not ... > regards > Steve > PS: Bin

Re: Request object from models

2008-11-21 Thread Steve Holden
ces of the model are created in response to a web request (i.e. when a view is running). At that time, obviously, yo have access to the web request and so can get hold of the user's identity. But there is no way to know that information in advance, so you can't specify it as a default

Re: New Django user: How do I return the server's IP address?

2008-11-21 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Where can I get the Host server's IP address? > > request.META['SERVER_NAME'] simply returns localhost instead of > whatever my ip address is > > Try import socket socket.gethostbyname(request.META['SERVER_NAME']) regards Steve --~--~-~--~~---

Re: Django ORM and phpMyAdmin

2008-11-24 Thread Steve Holden
Seth Kaïne wrote: > I want to have some more, please. > When I do that: > > python manage.py shell > > from httpbackend.models import Unit Unit.objects.all() > [, , , > ] > u3 = Unit.objects.filter(id=3)[0] u3.status > >

Re: parameter not getting passed to view function

2008-11-24 Thread Steve Holden
mahesh_aka_amol wrote: > Parameter not getting passed to view function > > upon accessing http://localhost:8000/hello/TEST it merely prints > "hello there" instead of "hello there TEST" > > urls.py > (r'^hello/(?P)\S+/$', 'swamiji.poll.views.hello') > > > Views.py > > def hello(request, who):

Re: Injecting stuff to an existing list?

2008-11-25 Thread Steve Holden
erson changes with time, and you are introducing unnecessary redundancy into the data model. When do you suggest the current age columns should be updated? regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC

Re: Injecting stuff to an existing list?

2008-11-25 Thread Steve Holden
David Zhou wrote: > On Tue, Nov 25, 2008 at 9:05 AM, Steve Holden <[EMAIL PROTECTED]> wrote: > >> David Zhou wrote: >> >>> On Tue, Nov 25, 2008 at 3:55 AM, sajal <[EMAIL PROTECTED]> wrote: >>> >> [...] >> >>&

Django Training

2008-12-08 Thread Steve Holden
I am looking at expanding our training offerings for the coming year, and a short course in Django looks like it might be popular. There don't seem to be many Django classes at the moment, and several of the students from our introductory Python classes expressed interest in Django. Without wanti

Re: Django Training

2008-12-11 Thread Steve Holden
> I think it would be good to ask students how they plan to use django. > > For myself, we'd like to deploy databases on a web page, and I'm > > interested to learn how much of that can be done in python and django, > > then what do you add to make the database look pre

Re: Serving static content using Apache

2008-08-18 Thread Steve Holden
ories because the original design didn't conveniently lump everything under /static/. YMMV, of course, but it's a thought. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ --~--~-~--~~~--

Re: modelforms: getting field object in clean_ method

2008-08-18 Thread Steve Holden
and field_2 > # PROBLEM: don't know how to raise validation errors on fields > raise forms.ValidationError('field_1 error msg') on field_1 > raise forms.ValidationError('field_2 error msg') on field_2 > > return self.cleaned_data

Re: ifequal doesn't evaluate expressions

2008-08-18 Thread Steve Holden
zdmytriv wrote: > 2 Steve: > > >> That's no way to endear yourself to the Django community. The >> development team has some pretty good brains. >> > > I agree, I was too aggressive, sorry about that. Just can't believe > that bug like this can be on this level. > I'd argue that it isn'

Re: Custom meta data to models

2008-08-19 Thread Steve Holden
Torsten Bronger wrote: > Hallöchen! > > In > , > custom metadata to models were discussed. Has there been any > progress in this, or has been another approach to this proposed? > FYI, when I ask Thunderbird to follow that link it brings up an email compose window. regards Steve --~--~

Re: Invalid block tag: 'autoescape'

2008-08-19 Thread Steve Holden
tom17 wrote: > I developed something using the trunk, now we have a change in the > requirement and we need to use the 0.96 version as the hosting service > provider supports only the stable version. I know I have to change a > lot of things, > So what I want to ask is what is the alternative for

Re: Custom meta data to models

2008-08-19 Thread Steve Holden
Torsten Bronger wrote: > Hallöchen! > > Malcolm Tredinnick writes: > > >> On Tue, 2008-08-19 at 13:20 +0200, Torsten Bronger wrote: >> >> >>> [...] >>> >>> I just wanted to avoid "news:"; because it actually is a mailing >>> list. But then you have to visit >>> http://groups.google.com/ad

Re: manager select_related()

2008-08-19 Thread Steve Holden
saeb wrote: > No, that is not the real code. The real code as you mentioned is split > into models.py and admin.py. And I am referring to the functions as > strings ( a typo on my part). After posting the message last night I > messed with the code more and function is displaying as 'none' . > Ref

Re: ifequal doesn't evaluate expressions

2008-08-19 Thread Steve Holden
t;>> Zinovii >> That system will not go through any such changes in the foreseeable >> future, because that would be a backwards-incompatible change, which >> the developers have committed to avoiding. There is a whole system >> geared specifically towards custom tem

Re: Renaming of mailing lists to avoid user confusion

2008-08-20 Thread Steve Holden
ot;offenders" simply start copying all django-* groups? regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

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

2008-08-20 Thread Steve Holden
t to examine the server environment for REMOTE_USER: if present, this should be the user name by which the user authenticated when they logged on to the client (which we are assuming is also the server). regards Steve -- Steve Holden+1 571 484 6266

Re: Inconsistencies/Bug in ModelForm

2008-08-28 Thread Steve Holden
= ( > (0, 'Zero'), > (1, 'One'), > ) > So wouldn't it be possible to put another choice, {"", "") at the top of your list? [...] regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC

Re: Inconsistencies/Bug in ModelForm

2008-08-29 Thread Steve Holden
Malcolm Tredinnick wrote: > > On Thu, 2008-08-28 at 21:32 -0400, Steve Holden wrote: >> lingrlongr wrote: >>> Submitted ticket #8663 for the following: >>> >>> When a ModelForm? is used to display a form for a Model, the fields >>> defined with a

Re: spanning relationships

2008-08-31 Thread Steve Holden
son) def __unicode__(self): return self.name class Admin: pass In [3]: Org.objects.filter(person__address__city__exact='Fairfax') Out[3]: [] I should point out, however, that this gives you only one person per organization, which I suspect is *not* what you want. r

Re: Filtering related field attributes is not working

2008-09-07 Thread Steve Holden
Robocop wrote: > Thank you for the suggestion, but first (with the right answer) come > first serve. > So no fine romantic dinner for you, Wojtek. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.hold

Re: Forms across multiple pages?

2008-09-07 Thread Steve Holden
deas? Basically what you describe is the essence of Ajax. Ajax requests are no different from any other as far as Django is concerned, though: the client-side Ajax code will typically replace some page element's InnerHTML with the response from the server. regards Steve -- Steve Holden+1

Re: DateTimeFields not showing up in Admin page

2008-09-07 Thread Steve Holden
the relevant admin.py code: >> >> class PostAdmin(admin.ModelAdmin): >> prepopulated_fields = {'slug': ('title',)} >> admin.site.register(Post, PostAdmin) > > > -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC

Re: Determining the type of object with model inheritance

2008-09-07 Thread Steve Holden
e to add a "discriminator" column in the base Animal class. The other would be to write a manager that implemented a method that introspected the individual instance attributes. There are probably other ways too. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3

Re: ANN: Updated Django Cheat Sheet

2008-09-07 Thread Steve Holden
gt; >>> Le 4 sept. 08 à 12:20, Fraser Nevett a écrit : >>>> http://www.mercurytide.co.uk/whitepapers/django-cheat-sheet/ >>>> We welcome any ideas for improvements, corrections, or any other >>>> feedback. >>> Any chance to get a printable cop

Re: ANN: Updated Django Cheat Sheet

2008-09-07 Thread Steve Holden
put configuration option. When > duplexing, you usually have the choice of "long edge/side" or > "short edge/side". Swapping this option should help you out. > Right. Looks like I have about 32 variants to try now ... regards Steve -- Steve Holden+1 571 484 62

Re: Apache httpd conf with mod_python

2008-09-09 Thread Steve Holden
[EMAIL PROTECTED] wrote: > i'm really at a loss. > > mod_python and django are both installed under python2.4. SELinux is > disabled. the standard permissions for the django_projects folder is > 775. everything validates. i can run python at the command line and > import the settings, etc. > Yo

Re: Apache httpd conf with mod_python

2008-09-09 Thread Steve Holden
hether that will make a difference, but you could try SetHandler python-program PythonPath "['/home/chris/web/django_project/ucwv'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE settings PythonDebug On regards Steve

  1   2   3   4   >