django without database

2006-02-23 Thread Deepak Sarda
Hi all, I've read the tutorials and have come away with the impression that using Django pretty much implies that one is creating a DB-backed website. I hope that's not the case! I have a couple of projects in mind that don't need databases but could well use some of the framework elements in Dj

Re: SetEnv issue

2006-02-23 Thread Kenneth Gonsalves
On Thursday 23 Feb 2006 12:50 pm, Amit Upadhyay wrote: > Are you using VirtualHosts? I had problem with them on some > machine, and I moved to someother without virtual hosts and it > worked. i use virtual hosts - i host on a xen server where i have debian installed and put each of my django sit

Re: Django Attribute Error on Page Load

2006-02-23 Thread Kenneth Gonsalves
On Thursday 23 Feb 2006 10:15 am, [EMAIL PROTECTED] wrote: > I'm new to django and it looks really cool.  I've installed > mod_python and am trying to get the tutorial to work.  It seems > to work for the most part but whenever I am trying to load a page > I get the following error message, after

Re: SetEnv issue

2006-02-23 Thread Ben Vinger
--- Kenneth Kalmer <[EMAIL PROTECTED]> wrote: > PythonHandler mptest Isn't mptest only for testing that mod_python is installed? I think you should remove it, because your PythonHandler should be django.core.handlers.modpython The only Python related stuff I have in my httpd.conf (Apache2 on W

Re: SetEnv issue

2006-02-23 Thread Kenneth Kalmer
On 2/23/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > On Thursday 23 Feb 2006 7:00 am, Kenneth Kalmer wrote: > > Playing around I got to this point now where I have the following > > code in a .htaccess file > > > > <.htaccess> > > SetEnv DJANGO_SETTINGS_MODULE myproject.settings > > SetEnv

Re: SetEnv issue

2006-02-23 Thread Philippe Mironov
Kenneth Kalmer a écrit : >The reason mptest configured through a .htaccess is because I can't >constantly restart a production server running other websites. > have you ever heard of reload directive ? see apache2ctl reload and /etc/init.d/apache2 reload (same for 1.3) This will ask apache to rer

Multi-page forms

2006-02-23 Thread Chetan Vaity
Hi,I want to build a two-page form for creating an object. As I see it there are two options:1. Store values in hidden fields2. Use the session to store the variables from the first formAny Django best practices? - Chetan --~--~-~--~~~---~--~~ You received this mess

Re: Multi-page forms

2006-02-23 Thread Jason F. McBrayer
"Chetan Vaity" <[EMAIL PROTECTED]> writes: > I want to build a two-page form for creating an object. As I see it there are > two options: > 1. Store values in hidden fields > 2. Use the session to store the variables from the first form > > Any Django best practices? I'd say use the session to

Get list by Foreign Key when using generic views

2006-02-23 Thread [EMAIL PROTECTED]
New to Django; getting my feat a bit wet and need some assistance. I would like to display a list of "statements" for a particular "account". The "account_id" is a foreign key on "statements" table. Is it possible, using generic views, to specify in the urlpatterns the that will generate SQL que

Re: SetEnv issue

2006-02-23 Thread Kenneth Kalmer
On 2/23/06, Philippe Mironov <[EMAIL PROTECTED]> wrote: > > Kenneth Kalmer a écrit : > > >The reason mptest configured through a .htaccess is because I can't > >constantly restart a production server running other websites. > > > have you ever heard of reload directive ? > see apache2ctl reload an

Re: weekend datetime objects

2006-02-23 Thread Luke Skibinski Holt
Excellent - thanks for those - it's easy to get convoluted code when you're thinking on an entirely different tack. Luke Skibinski Holt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: weekend datetime objects

2006-02-23 Thread Luke Skibinski Holt
Despite being more appropriate for comp.lang.python, this is just an example I came across for anyone that follows this thread: # Adding to or Subtracting from a Date # Use the rather nice datetime.timedelta objects now = datetime.date(2003, 8, 6) difference1 = datetime.timedelta(days=1) differe

Re: Mod Python Error: ImproperlyConfigured: Middleware module "django.middleware.sessions" does not define a "SessionMiddleware" class

2006-02-23 Thread jzellman
Solved my own problem PythonPath "sys.path + ['/var/www/testy']" SetHandler mod_python PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE testy.settings PythonDebug On should be PythonPath "sys.path + ['/var/www/']" SetHandler mod_python Pyt

ManyToMany and Admin Interface

2006-02-23 Thread [EMAIL PROTECTED]
The following model was taken from : http://www.djangoproject.com/documentation/models/many_to_many/ ** from django.core import meta class Publication(meta.Model): title = meta.CharField(maxlength=30) def __repr__(self): return self.title clas

Re: django without database

2006-02-23 Thread Adrian Holovaty
On 2/23/06, Deepak Sarda <[EMAIL PROTECTED]> wrote: > I've read the tutorials and have come away with the impression that > using Django pretty much implies that one is creating a DB-backed > website. I hope that's not the case! > > I have a couple of projects in mind that don't need databases but

Re: django without database

2006-02-23 Thread Deepak Sarda
On 2/23/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > The pieces of Django -- database access, template system, URL > dispatching -- are completely decoupled, so you can indeed write a > Django site that doesn't use a database. To do this, just write your > views and don't make any database cal

Re: django problem at dreamhost

2006-02-23 Thread [EMAIL PROTECTED]
I had this problem recently. I had built a small project to learn Django in january, using the latest trunk source. It worked fine, so when I started a second project about 2 weeks ago, I used the same structure with project/apps/myapp1 ... But I got the same error: 'no module named apps'. I ch

Re: django problem at dreamhost

2006-02-23 Thread [EMAIL PROTECTED]
should have said, I don't use Dreamhost, so this has nothing to do with their setup. I'm on rimuhosting.com, which is great. Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: django without database

2006-02-23 Thread Adrian Holovaty
On 2/23/06, Deepak Sarda <[EMAIL PROTECTED]> wrote: > Super! One more question though. I would still like to keep all data > logic in models/myapp.py 'cos it is cleaner that way. Looking at the > tutorials, I suppose it would be fine.. I create regular classes (no > inheriting from meta.Model) and

How To Calling a Flat page

2006-02-23 Thread [EMAIL PROTECTED]
I am a bit unclear as to how to call a Flat page. I 've done the necessary work, created the default template, got flatpages showing up in the admin and followed the instructions. Eg. my Introduction page is named /int/. In my template I just try to reference it as href="/int/" but this does not

Re: How To Calling a Flat page

2006-02-23 Thread Tom Tobin
On 2/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I am a bit unclear as to how to call a Flat page. > > I 've done the necessary work, created the default template, got > flatpages showing up in the admin and followed the instructions. Eg. my > Introduction page is named /int/. Did you

Re: weekend datetime objects

2006-02-23 Thread akaihola
I have a related problem: I like to calculate time differences with a custom SQL query to optimize speed. The db cursor seems to return a DateTimeDelta object (is that a psycopg class?) which I need to convert to a datetime.timedelta to interoperate with other time objects in Django. On the othe

Re: Django Attribute Error on Page Load

2006-02-23 Thread [EMAIL PROTECTED]
Yeah, I am restarting on every change; but I am still having this problem. -Jeremy Kenneth Gonsalves wrote: > On Thursday 23 Feb 2006 10:15 am, [EMAIL PROTECTED] wrote: > > I'm new to django and it looks really cool.  I've installed > > mod_python and am trying to get the tutorial to work.  It s

Re: How To Calling a Flat page

2006-02-23 Thread [EMAIL PROTECTED]
"django.contrib.flatpages.middleware.FlatpageFallbackMiddleware" in settings. Did this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googl

Re: Get list by Foreign Key when using generic views

2006-02-23 Thread Luke Plant
On Thursday 23 February 2006 13:53, [EMAIL PROTECTED] wrote: > I would like to display a list of "statements" for a particular > "account". The "account_id" is a foreign key on "statements" table. > Is it possible, using generic views, to specify in the urlpatterns > the that will generate SQL q

problems with POST

2006-02-23 Thread Vladimir
Hi guys, I am new to Django, but I really like what I saw so far. Cool stuff. I am running 0.91 and having trouble with POST request. If I change the method from POST to GET the things works, so I was wondering what's going on. Template: View: def signIn(request): try:

Re: problems with POST

2006-02-23 Thread Amit Upadhyay
On 2/24/06, Vladimir <[EMAIL PROTECTED]> wrote: action=""> method="POST">Hi,This is a very common newbie mistake, make that action="">.-- Amit UpadhyayBlog: http://www.rootshell.be/~upadhyay+91-9867-359-701 --~--~-~--~~~---~--~~ You received this message because you

Re: problems with POST

2006-02-23 Thread Vladimir
Oh, oops. Thanks for being patient with me. :-) Happy Django user --~--~-~--~~~---~--~~ 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 unsubsc

Re: How To Calling a Flat page

2006-02-23 Thread Tom Tobin
Hmm, do you have the latest trunk? I know flatpages were broken at one point recently. On 2/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > "django.contrib.flatpages.middleware.FlatpageFallbackMiddleware" > > in settings. > > Did this. --~--~-~--~~~---~--~

Re: How To Calling a Flat page

2006-02-23 Thread [EMAIL PROTECTED]
Actually solved this. /flatpage/ was not being handled by mod_python. I have to do /mysite/flatpage/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Formatting money values

2006-02-23 Thread Adriano Bonat
Hello, there isn't a filter in templates to format money values using the current locale? Thanks, -Adriano Bonat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Re: How to implement this fucntionality ? (current page higlighting)

2006-02-23 Thread coulix
Got it working, i was using some flatpage but since only flatpage.content or flatpage.title is possible if i wanted to define , since the flatpage template extend my base.html it would haev been anoying create som {{ block body }} and rewrite everything in the flatpage. so i deleted the flatpages

[patch] dealing with unicode charaters (e.g. cjk characters) in tagging stuff

2006-02-23 Thread EricHsu
hello hugo, we're using your tagging code developing our site (in Chinese), while dealing with the tags containing Chinese characters, I found that these charaters were removed by the following line of code in the tagging.py: [code] tagslugs=dict([(slugify(latin1_to_ascii(el.strip())), el.strip(

Re: dealing with unicode charaters (e.g. cjk characters) in tagging stuff

2006-02-23 Thread EricHsu
with this change, ascii characters in the slug field remain as what they are: "Hello World 你好" becomes: hello-world-xe4xbdxa0xe5xa5xbd --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Accessing a session within template context processors

2006-02-23 Thread Ross Poulton
Hi all, In my Django app I've got a few entries in TEMPLATE_CONTEXT_PROCESSORS that let me set a few context variables that are common to every page. I do this as some of my pages are generic views, some are custom views, and some are just plain flatpages. It's the easiest way for me to set varia