Re: Inconsistent urlresolver errors

2008-09-15 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-09-16, o godz. 06:43, przez catsclaw: >> Can you paste the urls.py from your project as well as the one from >> the app you are having problems with? > > I removed all the includes in case that was causing the error; all > my urls are defined in the main urls.py.

Re: os.fork inside django view bad idea?

2008-09-15 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-09-16, o godz. 02:49, przez shravster: > Fork a new process from the view at the point where i need to perform > urlopen. > Create a pipe so that the child process can grab the write end to > wirte the results of urlopen and exit. > Meanwhile, the parent process per

Re: Admin and inlines take 2

2008-09-15 Thread Donn
On Tuesday, 16 September 2008 06:35:04 Karen Tracey wrote: > With the new models you still have "should be the same" client duplicated > in two places, which was the thing I was trying to advise you to get rid > of. Karen, Once again I am indebted to you. I had tried your first advice but in my us

Creating users?

2008-09-15 Thread Rodney Topor
The User Authentication docs say "The most basic way to create users is to use the create_user() helper function...". But I can't see in the docs a description of a less basic / more sophisticated way to create users. For example, create_user() allows you to provide a username, email and passwor

Re: Getting specific data from a many to many field.

2008-09-15 Thread Daniel Roseman
On Sep 16, 2:30 am, "Lance F. Squire" <[EMAIL PROTECTED]> wrote: > On Sep 15, 5:21 pm, Daniel Roseman <[EMAIL PROTECTED]> > wrote: > > > Probably the easiest solution, if you know you're > > always going to be requesting a certain lookup, is to define a custom > > method on the model: > > > class

Re: Best distribution practices for pluggable apps?

2008-09-15 Thread Erik Allik
There's a topic in this group about general guidelines to packaging and distribution of pluggable apps. About templates, I'm sure you should include them under the app directory. Project template directory is normally searched before app template directories so any implementors of your app

Re: how to setup LDAP authorisation in django/apache.

2008-09-15 Thread PeteDK
btw, dont know if its important. But im using CentOS :-) On 15 Sep., 21:45, PeteDK <[EMAIL PROTECTED]> wrote: > Thanks. > > Well the problem with the network personnel is that the person who set > up the active directory server left recently and his documentation is > very incomplete, so i'm tryi

Re: Abstract Superclass and Foreign Keys

2008-09-15 Thread Erik Allik
Maybe you should check out generic foreign keys. Not sure if it's appropriate solution though. Erik On 16.09.2008, at 4:10, Peter Bailey wrote: > > Hi all. I have a set of classes (web page items like radios, > checkboxes, etc.) They are built on a superclass - Item. I need a > join table to

Re: Inconsistent urlresolver errors

2008-09-15 Thread catsclaw
On Sep 15, 11:05 pm, Ross <[EMAIL PROTECTED]> wrote: > Can you paste the urls.py from your project as well as the one from > the app you are having problems with? I removed all the includes in case that was causing the error; all my urls are defined in the main urls.py. Here's all the urls I'

Re: Django with Windows Integrated Security / SSPI

2008-09-15 Thread Adoleo
I tried this, and I can confirm that IE doesn't ask for a username and password if you are on the domain. The RemoteUserAuthMiddleware and RemoteUserAuthBackend worked perfectly. Does anyone know if this will be merged into the Django trunk? As the first post on the blog I'm starting up, I adde

Re: Admin and inlines take 2

2008-09-15 Thread Karen Tracey
On Mon, Sep 15, 2008 at 8:20 AM, Donn <[EMAIL PROTECTED]> wrote: > > Hi, > Thought I'd start a new thread to clear out the cruft. > > http://dpaste.com/78151/ shows my latest shot at the thing. > > In that dpaste, the Client->WebsiteInline works as I'd hoped. But the > Website->PluginsEnabled does

Re: Making sure published date is respected in views

2008-09-15 Thread D. Woodman
Thank you both a lot! I knew it was simple, not sure why I couldn't figure it out. Thanks! On Sat, Sep 13, 2008 at 12:55 PM, Keith Eberle <[EMAIL PROTECTED]>wrote: > Building on Marcelo's response, and an example from James Bennett's book > (Ch 5), you could also add a custom manager. It'd go s

Re: How to syncdb programatically (django standalone script) ?

2008-09-15 Thread James Bennett
On Mon, Sep 15, 2008 at 8:50 PM, Steve Holden <[EMAIL PROTECTED]> wrote: > This is k=nd of a wild-assed guess. Please tell me if it works. > > from django.core.management import call_command > call_command('syncdb') That is the way to do it; the whole manage.py/django-admin.py system was refactor

Re: render failed on utf-8 column ??

2008-09-15 Thread akonsu
hello, try to save your file in utf8 encoding and load data again. may be it will help. konstantin On Sep 15, 10:57 pm, JoeJ <[EMAIL PROTECTED]> wrote: > 1- Data loaded in DB > from:http://leathergallery.com/module/data/sql/products/Products.sql-- > includes the phrase "Thinsulate®" > > 2- Djan

Re: render failed on utf-8 column ??

2008-09-15 Thread Karen Tracey
On Mon, Sep 15, 2008 at 10:57 PM, JoeJ <[EMAIL PROTECTED]> wrote: > > 1- Data loaded in DB from: > http://leathergallery.com/module/data/sql/products/Products.sql -- > includes the phrase "Thinsulate(R)" > > 2- Django generic list_detail.object_list fails to render with: > Caught an exception whil

Re: restart apache every time I make a modification?

2008-09-15 Thread akonsu
hello, would django dev server be a useful alternative for you? it picks up most changes without a restart. konstantin On Sep 15, 11:27 pm, Cequiel <[EMAIL PROTECTED]> wrote: > Hi all. > > I installed Django with Apache in my Windows. It was a little > complicated but finally it is working fine

Re: Running into errors using S3 backend for Django

2008-09-15 Thread vinay
David, I did play around with it little briefly today as you suggested. No luck. Still get the same error. I was digging around and it appears that a similar problem was reported on Django photologue group. I will get more time later this week to test out more features of S3 backend and also phot

Re: Inconsistent urlresolver errors

2008-09-15 Thread Ross
Can you paste the urls.py from your project as well as the one from the app you are having problems with? On Sep 15, 11:00 pm, catsclaw <[EMAIL PROTECTED]> wrote: > On Sep 15, 10:51 pm, Ross <[EMAIL PROTECTED]> wrote: > > > You can always fall back to {% url myapp.users.login %} unless you > > ne

Re: Inconsistent urlresolver errors

2008-09-15 Thread catsclaw
On Sep 15, 10:51 pm, Ross <[EMAIL PROTECTED]> wrote: > You can always fall back to {% url myapp.users.login %} unless you > need to reuse a view but have several different URL patterns for it. I've tried that. It fails as well, with essentially the same error (i.e. "Reverse for myapp.users.lo

Re: Get times of day with most entries

2008-09-15 Thread Ross
http://graphite.wikidot.com/ Graphite is a very cool open source graphing utility that was actually written purely in Python and Django. It has its own persistence back end, so you would actually have very little work to do for what it sounds like you are trying to do. There's no sense in reinve

Re: Recommendations for local web dev on Mac OS X 10.5 vs. developing against WebFaction Linux box

2008-09-15 Thread akonsu
hello, one more reason to develop locally is because doing it on a remote machine is very slow. the way i do it, is i set up an svn repository on webfaction and checked out files in to my django application subtree. i also check it out to my dev machine, where i change files and when i am ready

Re: Inconsistent urlresolver errors

2008-09-15 Thread Ross
You can always fall back to {% url myapp.users.login %} unless you need to reuse a view but have several different URL patterns for it. On Sep 15, 6:39 pm, catsclaw <[EMAIL PROTECTED]> wrote: > On Sep 15, 5:53 pm, Ross <[EMAIL PROTECTED]> wrote: > > > Are you using Django 1.0? URL naming patterns

Re: restart apache every time I make a modification?

2008-09-15 Thread Ross
There was a thread on this a couple days ago that I starred. Here ya go: http://groups.google.com/group/django-users/browse_thread/thread/f44eefb21b7e675c# On Sep 15, 10:27 pm, Cequiel <[EMAIL PROTECTED]> wrote: > Hi all. > > I installed Django with Apache in my Windows. It was a little > compli

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-15 Thread Ross
Check out the description of the {% url %} tag in the Django documentation: http://docs.djangoproject.com/en/dev/ref/templates/builtins/#url It does not expect the project name to be in the URL. Try dropping "gpp" and just use "weblinks.views.view_links". On Sep 15, 9:19 pm, Brian Neal <[EMAIL

restart apache every time I make a modification?

2008-09-15 Thread Cequiel
Hi all. I installed Django with Apache in my Windows. It was a little complicated but finally it is working fine. But I have another litle problem. When I change part of my code I need to restart the apache server to see the changes in the browser and I lost at least 10 seconds in this operation

Re: manage.py reset auth fails

2008-09-15 Thread Russell Keith-Magee
On Tue, Sep 16, 2008 at 11:03 AM, akonsu <[EMAIL PROTECTED]> wrote: > > hello, > > on pgsql 'reset auth' fails with an error saying that it cannot drop > one of the tables (i do not remember which though) because other > objects depend on it. on sqlite it works fine. i did not try it on > mysql.

manage.py reset auth fails

2008-09-15 Thread akonsu
hello, on pgsql 'reset auth' fails with an error saying that it cannot drop one of the tables (i do not remember which though) because other objects depend on it. on sqlite it works fine. i did not try it on mysql. here is my apps: INSTALLED_APPS = ( 'django.contrib.admin', 'django.cont

Re: Is this group censored, or is the archive just buggy?

2008-09-15 Thread Kenneth Gonsalves
On Tuesday 16 Sep 2008 1:40:39 am catsclaw wrote: >  If it was removed by a moderator, where are the posting guidelines? the list is not moderated - maybe you replied to sender or something -- regards KG http://lawgon.livejournal.com --~--~-~--~~~---~--~~ You

render failed on utf-8 column ??

2008-09-15 Thread JoeJ
1- Data loaded in DB from: http://leathergallery.com/module/data/sql/products/Products.sql -- includes the phrase "Thinsulate®" 2- Django generic list_detail.object_list fails to render with: Caught an exception while rendering: Could not decode to UTF-8 column 'product_desc' with text 'Black ga

Re: django+xmlrpc on mod_python+apache

2008-09-15 Thread roychan
Yes.. It's from a remote host. But the funny thing is remote.com -> a.com works remote.com -> b.com hangs but a.com and b.com is actually the same server. with same IP address -r Erik Allik wrote: > > > Who's sending the XML-RPC requests, a web browser? If yes, check out > some docs/arti

Re: Recommendations for local web dev on Mac OS X 10.5 vs. developing against WebFaction Linux box

2008-09-15 Thread Mark Phillips
On Sep 15, 2008, at 4:58 PM, DougI wrote: > Should I develop locally on my Mac, i.e. install Django/PostgreSQL > locally and then upload to WebFaction, or create/open files directly > on my WebFaction server via SSH or FTP? > > Also, recommendations for an IDE would be appreciated - TextMate, >

Re: Recommendations for local web dev on Mac OS X 10.5 vs. developing against WebFaction Linux box

2008-09-15 Thread David Zhou
On Sep 15, 2008, at 7:58 PM, DougI wrote: > Should I develop locally on my Mac, i.e. install Django/PostgreSQL > locally and then upload to WebFaction, or create/open files directly > on my WebFaction server via SSH or FTP? I would develop locally -- using Django's built in server for testing

Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-15 Thread Brian Neal
This is my urls.py for an app (notice the two that start with ^category/, they both vector to my function view_links): from django.conf.urls.defaults import * urlpatterns = patterns('gpp.weblinks.views', (r'^$', 'link_index'), (r'^add/$', 'add_link'), (r'^category/(?P\d+)/$', 'view_link

Recommendations for local web dev on Mac OS X 10.5 vs. developing against WebFaction Linux box

2008-09-15 Thread DougI
I am a complete newbie with regard to web development, Linux, Python, and Django. My experience is with VBScript, VB, and PowerShell in a Windows environment. I am very interested in learning open-source web development and Django/Python/PostgreSQL seemed like an excellent route, but I'm unsure ho

Re: How to syncdb programatically (django standalone script) ?

2008-09-15 Thread Steve Holden
Mathieu Leplatre wrote: > Hi all, > > I found many post about specific errors regarding django as a > standalone tool. > > With a little bit of researching, I ended up with this script below. > Unfortunately, it fails on database initialization. > > ... > ... > File "/home/mathieu/Code/uhm/svn/uh

Re: Getting specific data from a many to many field.

2008-09-15 Thread Lance F. Squire
On Sep 15, 5:21 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > Probably the easiest solution, if you know you're > always going to be requesting a certain lookup, is to define a custom > method on the model: > > class System(models.Model): > ... field declarations ... > > def get_heade

Best distribution practices for pluggable apps?

2008-09-15 Thread shacker
I'm building a pluggable app and getting ready to push it out. I'm trying to figure out the best way to distribute templates and media (css, js, images) with it. My initial approach was to provide a "samples/templates" and "samples/ media" within the dist but outside of the app, and let implemen

Abstract Superclass and Foreign Keys

2008-09-15 Thread Peter Bailey
Hi all. I have a set of classes (web page items like radios, checkboxes, etc.) They are built on a superclass - Item. I need a join table to link them to specific pages in which I also store a position (PageItem) . Here is a snippet: #

Re: Is this group censored, or is the archive just buggy?

2008-09-15 Thread Russell Keith-Magee
On Tue, Sep 16, 2008 at 4:10 AM, catsclaw <[EMAIL PROTECTED]> wrote: > > Hi -- > > I've been having major problems with the url configurations, and I > posted a summary of the problems on this list last night. I received > a reply, and responded to that. Now, however, the list has no record >

os.fork inside django view bad idea?

2008-09-15 Thread shravster
Hi people, I am running Django .96 and I have the situation, in which I need to open a remote url using urlopen to get some information from the web. Here is what I thought of: Fork a new process from the view at the point where i need to perform urlopen. Create a pipe so that the child process

Re: Is this group censored, or is the archive just buggy?

2008-09-15 Thread Erik Allik
I'm not sure if this is related, but some of my letters sent to this group aren't showing up. At the same time, a few people have replied to my letters without me actually having received these letters. Weird. Erik On 15.09.2008, at 23:10, catsclaw wrote: > > Hi -- > > I've been having m

Re: 1.0 branch

2008-09-15 Thread Russell Keith-Magee
On Tue, Sep 16, 2008 at 1:53 AM, Steve Holden <[EMAIL PROTECTED]> wrote: > > J. Pablo Fernández wrote: >> Hello, >> >> Which one is the 1.0 branch on the SVN repo? >> >> Thanks. >> >> > Erm, that would be the one tagged "1.0" I guess. But I haven't actually > checked, because the best way to get 1

Re: TypeError: direct_to_template() got multiple values for keyword argument 'template'

2008-09-15 Thread Cortland Klein
Oh whoops, my bad. I forgot about positional arguments; thanks for the reminder. On Sep 15, 2008, at 4:04 PM, Malcolm Tredinnick wrote: > This URL pattern says to capture everything after "success" and that > is > then passed as the first positional argument to the view. That > argument > i

Re: Introducing django-cms

2008-09-15 Thread Erik Allik
Hi Maik, This is exactly the problem-area I'm trying to tackle now. My goal is to have a system that can as smoothly and transparently as possible integrate any django application that is unaware of the existence of the CMS itself. Right now my CMS has got a notion of a content tree -- a h

Re: Get times of day with most entries

2008-09-15 Thread Russell Keith-Magee
On Mon, Sep 15, 2008 at 8:33 PM, Henrik Lied <[EMAIL PROTECTED]> wrote: > > Hi there! > > I'm working on a very interesting pet project where I monitor the > traffic outside a house. ... > This adds up to quite a lot of traffic in a day, and I want to be able > to filter out which time of day the

Re: Inconsistent urlresolver errors

2008-09-15 Thread catsclaw
On Sep 15, 5:53 pm, Ross <[EMAIL PROTECTED]> wrote: > Are you using Django 1.0? URL naming patterns (http:// > docs.djangoproject.com/en/dev/topics/http/urls/#id2) were not > introduced until 1.0. From the looks of the exception, Django is > trying to build the path to your view by appending the a

Akismet and Django Comments

2008-09-15 Thread James Matthews
http://sciyoshi.com/blog/2008/aug/27/using-akismet-djangos-new-comments-framework/ -- http://www.goldwatches.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Re: Is this group censored, or is the archive just buggy?

2008-09-15 Thread Karen Tracey
On Mon, Sep 15, 2008 at 6:14 PM, Baurzhan Ismagulov <[EMAIL PROTECTED]> wrote: > > On Mon, Sep 15, 2008 at 03:10:23PM -0700, catsclaw wrote: > >Yes, I found it through the direct link, but it doesn't show up in > > searches. That's why I was wondering what happened to it. If nothing > > happ

Re: TypeError: direct_to_template() got multiple values for keyword argument 'template'

2008-09-15 Thread Malcolm Tredinnick
On Mon, 2008-09-15 at 16:02 -0700, Cortland Klein wrote: > Hi. I'm getting a TypeError on my direct_to_template url: > > direct_to_template() got multiple values for keyword argument 'template' > > urls.py: > > from django.conf.urls.defaults import * > > > > urlpatterns = patterns('', > > (

TypeError: direct_to_template() got multiple values for keyword argument 'template'

2008-09-15 Thread Cortland Klein
Hi. I'm getting a TypeError on my direct_to_template url: direct_to_template() got multiple values for keyword argument 'template' urls.py: > from django.conf.urls.defaults import * > > urlpatterns = patterns('', > (r'^$', 'redacted.redacted.views.sessionform'), > (r'^success(.*)$', >

Re: Pickling Querysets (Query?)

2008-09-15 Thread Andy Lei
thanks a lot guys! On Mon, Sep 15, 2008 at 6:10 PM, Jirka Vejrazka <[EMAIL PROTECTED]>wrote: > > Hi, this is how I do it, but don't rely on effectiveness of this > solution - I'd be the first one to say that I'm a mediocre programmer > :) > > def serialize(data): > '''Input: instance of PluginP

Re: Inconsistent urlresolver errors

2008-09-15 Thread Ross
Are you using Django 1.0? URL naming patterns (http:// docs.djangoproject.com/en/dev/topics/http/urls/#id2) were not introduced until 1.0. From the looks of the exception, Django is trying to build the path to your view by appending the argument in the {% url %} tag to your app name. python manag

Re: Is this group censored, or is the archive just buggy?

2008-09-15 Thread Baurzhan Ismagulov
On Mon, Sep 15, 2008 at 03:10:23PM -0700, catsclaw wrote: >Yes, I found it through the direct link, but it doesn't show up in > searches. That's why I was wondering what happened to it. If nothing > happened to it, then why doesn't it show up in the group if you search > for my username or "

Re: Pickling Querysets (Query?)

2008-09-15 Thread Jirka Vejrazka
Hi, this is how I do it, but don't rely on effectiveness of this solution - I'd be the first one to say that I'm a mediocre programmer :) def serialize(data): '''Input: instance of PluginParameters Output: base64-encoded string that can be stored in a database ''' if not isinstance

Re: Is this group censored, or is the archive just buggy?

2008-09-15 Thread catsclaw
On Sep 15, 5:03 pm, Baurzhan Ismagulov <[EMAIL PROTECTED]> wrote: > > http://groups.google.com/group/django-users/browse_thread/thread/0033... Yes, I found it through the direct link, but it doesn't show up in searches. That's why I was wondering what happened to it. If nothing happened to i

Pickling Querysets (Query?)

2008-09-15 Thread Andy Lei
This used to be in the Django documentation, but I can't seem to find it now. I'm trying to pickle the information necessary to recreate a query. Can querysets (or queries) be pickled in 1.0? Any advice / tips on how to do it? The python pickling documentation says that the result of the pickle i

Re: Is this group censored, or is the archive just buggy?

2008-09-15 Thread Baurzhan Ismagulov
On Mon, Sep 15, 2008 at 03:00:58PM -0700, catsclaw wrote: >No. That summarizes a few of the issues I'm seeing, although I'm > seeing more now. I'm referring to the one I posted on 9/15 with the > subject "Can anyone tell me how the hell to get url tags to work?" http://groups.google.com/gro

Re: Pickling Querysets (Query?)

2008-09-15 Thread Malcolm Tredinnick
On Mon, 2008-09-15 at 17:57 -0400, Andy Lei wrote: > This used to be in the Django documentation, but I can't seem to find > it now. There were some friendly-fire casualties when the docs-refactor was merged. They'll be recovered/rewritten over time. > Can querysets (or queries) be pickled in

Re: Is this group censored, or is the archive just buggy?

2008-09-15 Thread catsclaw
On Sep 15, 4:47 pm, Baurzhan Ismagulov <[EMAIL PROTECTED]> wrote: > On Mon, Sep 15, 2008 at 01:10:39PM -0700, catsclaw wrote: > >    I've been having major problems with the url configurations, and I > > posted a summary of the problems on this list last night.  I received > > a reply, and respond

How to syncdb programatically (django standalone script) ?

2008-09-15 Thread Mathieu Leplatre
Hi all, I found many post about specific errors regarding django as a standalone tool. With a little bit of researching, I ended up with this script below. Unfortunately, it fails on database initialization. ... ... File "/home/mathieu/Code/uhm/svn/uhm/django/db/backends/sqlite3/ base.py", lin

get_absolute_url with flatpages doesn't give a complete path

2008-09-15 Thread allenlux
I'm a newcomer to django but so far most things seem to work nicely. One detail which has left me baffled is how to get working urls for flatpages used in my site. For example, take a flatpage for which the url field is set to "/about/" The site as a whole has URLs of the form "http://allenlux.d

Re: Is this group censored, or is the archive just buggy?

2008-09-15 Thread Baurzhan Ismagulov
On Mon, Sep 15, 2008 at 01:10:39PM -0700, catsclaw wrote: >I've been having major problems with the url configurations, and I > posted a summary of the problems on this list last night. I received > a reply, and responded to that. Now, however, the list has no record > of the conversation.

Re: Apache virtual host setup trouble

2008-09-15 Thread Tonu Mikk
Looks like I got it figured out ... The problem was in urls.py file in /var/www/polls/pollngo in this line: urlpatterns = patterns('polls.views', I changed it to urlpatterns = patterns('polls.pollngo.views', and it started to work! Yey! Tonu Tonu Mikk wrote: > Hello, > > I am trying to po

Inconsistent urlresolver errors

2008-09-15 Thread catsclaw
Hi all -- There's something really screwed up with the urlresolver system, and I haven't the faintest idea what to do to begin debugging it. I have a template with the following tag in it: {% url myapp-login %} ... and the following code in my urls.py configuration ... url(r'^myapp/log

Re: Getting specific data from a many to many field.

2008-09-15 Thread Daniel Roseman
On Sep 15, 9:25 pm, "Lance F. Squire" <[EMAIL PROTECTED]> wrote: > On Sep 15, 4:13 pm, Daniel Roseman <[EMAIL PROTECTED]> > wrote: > > > So, putting that all together: > > > {% for pic in info.system_pictures.all %} > >     {% ifequal pic.image_category.name 'Header_Pic' %} > >         > >     {%

Re: Import error: Model based on another model

2008-09-15 Thread Daniel Roseman
On Sep 15, 9:34 pm, Gerard Petersen <[EMAIL PROTECTED]> wrote: > Daniel, > > I'm building an invoice system. The data relations are as follows: > > Customer -1toN-> Orders -1toN-> Products > > The products can have different tax levels which, during creation of an > order, get chosen by the user

Re: per-request cache

2008-09-15 Thread [EMAIL PROTECTED]
On Sep 15, 9:11 am, pihentagy <[EMAIL PROTECTED]> wrote: > Also for consistency and for performance reasons, is it possible to > somehow return the same QuerySet for both items, _which are in the > same request_? > > thanks > Gergo I would suggest looking at the template fragment caching first an

Re: FileField FilePathField hybrid...?

2008-09-15 Thread Marty Alchin
On Mon, Sep 15, 2008 at 2:30 PM, Markus <[EMAIL PROTECTED]> wrote: > Gul said that "... a hybrid between FileField and FilePathField. I > really can't imagine how we'd be able to get that to work reasonably > well, especially in a way that makes sense when trying to use it. I'm > open to ideas, bu

Re: TemplateSyntaxError: Caught an exception while rendering: coercing to Unicode: need string or buffer, long found

2008-09-15 Thread Daniel Roseman
On Sep 15, 7:33 pm, SnappyDjangoUser <[EMAIL PROTECTED]> wrote: > Hi Folks, > > I am receiving an obscure TemplateSyntaxError (Caught an exception > while rendering: coercing to Unicode: need string or buffer, long > found ) when rending a ModelForm that has a foreign key back to a > specific tabl

Re: Import error: Model based on another model

2008-09-15 Thread Gerard Petersen
Daniel, I'm building an invoice system. The data relations are as follows: Customer -1toN-> Orders -1toN-> Products The products can have different tax levels which, during creation of an order, get chosen by the user from a drop downlist. As shown in my first email, a tax level value (e.g. 0

Re: Problems with signals accessing kwargs

2008-09-15 Thread Benjamin Buch
Thanks! I've got it working now: def mail_on_create_intro(sender, instance, created, **kwargs): if created: email_body = 'A new Intro at' + instance.url email_subject = 'New Intro' else: email_body = 'An intro has changed at' + instance.url email_s

Re: lighttpd +fastcgi

2008-09-15 Thread lisa.dusseault
I had the same problem as Gonzalo, using lighttpd, looked at the BackwardsIncompatibleChanges link, and tried FORCE_SCRIPT_NAME="/" in my settings.py. Unfortunately, that seems to create a different problem: after going to my site's admin and logging in, I see the browser trying to load "http://

FileField FilePathField hybrid...?

2008-09-15 Thread Markus
Hi, in this post http://groups.google.com/group/django-users/browse_thread/thread/88ca483dc3c9f55d/6c3e5e3e8d93aa8e?lnk=gst&q=filepathfield+filefield#6c3e5e3e8d93aa8e Gul said that "... a hybrid between FileField and FilePathField. I really can't imagine how we'd be able to get that to work reas

Re: Getting specific data from a many to many field.

2008-09-15 Thread Lance F. Squire
On Sep 15, 4:13 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > So, putting that all together: > > {% for pic in info.system_pictures.all %} > {% ifequal pic.image_category.name 'Header_Pic' %} > > {% endifequal %} > {% endfor %} > Sweet! That works. Thanks! I'll try to rememb

Re: Getting specific data from a many to many field.

2008-09-15 Thread Daniel Roseman
On Sep 15, 8:50 pm, "Lance F. Squire" <[EMAIL PROTECTED]> wrote: > Using Fedora 8, Django  version 0.96.3 > > I'm currently trying to pull two specific images from a list of images > associated with a model. > > Currently the Models are like this: > > class ImageCat(models.Model): >     name = mod

Is this group censored, or is the archive just buggy?

2008-09-15 Thread catsclaw
Hi -- I've been having major problems with the url configurations, and I posted a summary of the problems on this list last night. I received a reply, and responded to that. Now, however, the list has no record of the conversation. Was it intentionally deleted by a moderator, or should I ju

Getting specific data from a many to many field.

2008-09-15 Thread Lance F. Squire
Using Fedora 8, Django version 0.96.3 I'm currently trying to pull two specific images from a list of images associated with a model. Currently the Models are like this: class ImageCat(models.Model): name = models.CharField(maxlength=80) class Image(models.Model): name = models.Ch

Re: How to render a static html page and keep processing after?

2008-09-15 Thread Ross
> A web server itself is not a good place to do > long-running work that isn't being served directly to a browser. I agree with Ned on this one. If there is some intensive work that needs to be done, it would best be done by a process separate from the web server. The web server should write what

Re: how to setup LDAP authorisation in django/apache.

2008-09-15 Thread PeteDK
Thanks. Well the problem with the network personnel is that the person who set up the active directory server left recently and his documentation is very incomplete, so i'm trying to understand how it is setup but have yet to succeed. However I would be glad if someone here was able to devide t

Re: Filtering ManyToManyField

2008-09-15 Thread Steve Howard
On Thu, Sep 11, 2008 at 2:06 AM, MikeHowarth <[EMAIL PROTECTED]>wrote: > > I was wondering if anyone could help me. > > I currently have a Product model which has a many to many association > linked back to itself for related items. > > When returning the related items, I want to filter out any wh

Apache virtual host setup trouble

2008-09-15 Thread Tonu Mikk
Hello, I am trying to port a django project that is working with development server to be served from Apache Virtual Host, but having some trouble configuring the correct directories. Any help is appreciated. This is with Django version 1, Apache 2.2 + mod_python. The virtual host is at pol

TemplateSyntaxError: Caught an exception while rendering: coercing to Unicode: need string or buffer, long found

2008-09-15 Thread SnappyDjangoUser
Hi Folks, I am receiving an obscure TemplateSyntaxError (Caught an exception while rendering: coercing to Unicode: need string or buffer, long found ) when rending a ModelForm that has a foreign key back to a specific table. My template correctly renders forms for all models except for this one

Re: Admin inlines and foreign keys

2008-09-15 Thread Donn
On Monday, 15 September 2008 19:00:39 Steve Holden wrote: > So, as Karen already said, there really doesn't seem to be any need for > a "pluginsEnabled" module. The foreign key implements a one-to-many > relationship between Website and Plugin: many Plugins can have the same > Website, each Websit

Re: The User mess

2008-09-15 Thread bruno desthuilliers
On 11 sep, 19:58, Dan Ellis <[EMAIL PROTECTED]> wrote: (snip congratulations - +1 BTW) > One thing that I still find messy, though, is the whole user/profile > thing. Having separate models for users and profiles has a number of > drawbacks: > (snip) > > What I'd like to see is an easy, supported

Re: User subclass vs. User-Profile

2008-09-15 Thread Erik Allik
I guess if you subclassed the User model, you'd have to change all places that use it to use YourUserModel instead, otherwise there's no point (someone correct me if I'm wrong). So I'd stick with the user- profile approach. Erik On 15.09.2008, at 17:33, Brot wrote: > > Hello, > > what is y

Re: django+xmlrpc on mod_python+apache

2008-09-15 Thread Erik Allik
Who's sending the XML-RPC requests, a web browser? If yes, check out some docs/articles about XmlHttpRequest security and cross-domain request limitations etc. Erik On 15.09.2008, at 17:31, roychan wrote: > > > Hi Guru, > > I have an xmlrpc service running on django (like this: > http://co

Re: 1.0 branch

2008-09-15 Thread Steve Holden
J. Pablo Fernández wrote: > Hello, > > Which one is the 1.0 branch on the SVN repo? > > Thanks. > > Erm, that would be the one tagged "1.0" I guess. But I haven't actually checked, because the best way to get 1.0 is to download it from http://www.djangoproject.com/download/ Actually, to avo

Inline edit with the built-in admin (ManyToMany)

2008-09-15 Thread Martin
Hi, I've just started using both python and django, so bear with me if I'm making a newbie mistake. I've done a small example model and want to be able to administer it through the built-in admin interface in django. First I've expanded the user model in django, as described in [1] to add some e

Re: django-projekt - vcs - media folder

2008-09-15 Thread patrickk
/media/admin/ are the django media-files ... since these files are not directly project-related, we don´t keep them under version control. we have one repository for each website. within this repository, we just keep project-/website-related stuff. On Sep 15, 7:22 pm, Erik Allik <[EMAIL PROTECTE

Re: django-projekt - vcs - media folder

2008-09-15 Thread Erik Allik
Just curious, maybe I'm missing something: why do you not keep your / media/admin/ files under version control? Erik On 15.09.2008, at 19:26, patrickk wrote: > > our environment looks like this: > all media-files uploaded with the admin-interface are in /media/ > uploads/. this directory is no

Re: how to setup LDAP authorisation in django/apache.

2008-09-15 Thread Joseph
Try to have a look at: http://code.google.com/p/s-o-l/source/browse/trunk/settings_prod_change.py I have a login page but authenticate against AD server and if authenticated I store in a database; you may have to customize according to your needs. If you are on windows, I recommend to use AD ex

1.0 branch

2008-09-15 Thread J . Pablo Fernández
Hello, Which one is the 1.0 branch on the SVN repo? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe fr

Re: DBA-level DB options?

2008-09-15 Thread Ian
On Sep 15, 8:27 am, integratingIt <[EMAIL PROTECTED]> wrote: > I've seen that I can do most of this in the Python model, but there > are a couple critical gaps that I'd really like to find a way to > fill.  For example, everything after the column list (the physical > characteristics of the table)

Re: using forloop variable to get the provide special tags for the 4th element.

2008-09-15 Thread Steve Holden
Lee Hinde wrote: > > > On Sun, Sep 14, 2008 at 10:00 PM, sotirac <[EMAIL PROTECTED] > > wrote: > > > In the django template where I am using a for loop, I have to use a > special tag (div class="yui-u first" instead of div class="yui") for > every forth it

Re: Admin inlines and foreign keys

2008-09-15 Thread Steve Holden
Donn wrote: > Okay, I am totally confused. > I had a working system before, but trying to relate my models is hurting my > head. If anyone has a minute here's my scheme: > > == means has many > -- means has one > > Client == Website -- pluginsEnabled == Plugin > > 1. I create many Plugin entri

Updating a table when running django outside manage.py

2008-09-15 Thread emc
I am using django version 1.0 and mysql when I try to update a table I get the following error: Exception exceptions.SystemError: 'error return without exception set' Any idea on what is going on? This issue appeared moving from the .97 to version 1 Thanks in advance The directory structure is

Re: Accessing field names and data from a queryset in a generic template

2008-09-15 Thread SnappyDjangoUser
Thanks for the feedback. Yes, the field names are different for each model and that is why I asked the question. I had solved the problem with your suggestion #2: "Create base template and extend that with model specific templates." But I did not find this to be a very efficient way to solve the

Re: maxlength or max_length?

2008-09-15 Thread James Matthews
You need to append the proper path using (1. The export command 2. The .bash_profile file. ) I used number two, If you want to see the path just type into the shell export | grep PYTHONPATH On Sun, Sep 14, 2008 at 9:41 AM, djandrow <[EMAIL PROTECTED]> wrote: > > Thanks, its a shared server so I w

Re: how to setup LDAP authorisation in django/apache.

2008-09-15 Thread PeteDK
Hi if i can get it to work i will be sure to post it right here :-) On 15 Sep., 13:32, madyogi <[EMAIL PROTECTED]> wrote: > Please, > when you have figured out how to do that, share it with us. > Though very new to django, I am also really curious about know how to > set up LDAP on the existing

Re: django-projekt - vcs - media folder

2008-09-15 Thread patrickk
our environment looks like this: all media-files uploaded with the admin-interface are in /media/ uploads/. this directory is not under version control. here´s the basic structure: /media/admin/ (not under vcs) /media/site/ (these files are in our repository, but never uploaded with the admin-int

  1   2   >