Re: Django Hosting

2006-10-19 Thread ian

yes, after remi posted here a while back i took the plunge with
webfaction. I have a couple of sites up and running now and i haven't
had any problems or had to talk to anyone...really excellent stuff
+1 webfaction
[]'s
-- 
Ian Lawrence
Centre for Bioinformatics
INSTITUTO NACIONAL DE PESQUISAS DA AMAZÔNIA-INPA
RUA ANDRÉ ARAÚJO N º .2936 , BAIRRO DO ALEIXO
MANAUS-AMAZONAS-BRAZIL
Research Program in Biodiversity
http://ppbio.inpa.gov.br
PHONE: 055-92-3643-3358
CEP. 69011 -970

| Please do not send me documents in a closed
| format.(*.doc,*.xls,*.ppt)
| Use the open alternatives. (*.pdf,*.html,*.txt)
http://www.gnu.org/philosophy/no-word-attachments.html


>>> return [type for type in types if type not in types_to_exclude]
If you can see the beauty, then Python got you

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: advice needed - how to manage 100+ django sites in a scaleable, manageable setup

2006-10-17 Thread Ian Holsman

Hi Tone.

I have about 10 sites running the same/similar codebases on 3  
different machines.

send me some more info offline (or skype me on iholsman) and we can  
chat about it.

regards
Ian.

On 18/10/2006, at 9:07 AM, tonemcd wrote:

>
> Hi all,
> We're about to put our first django site online on Monday, which is a
> major departure for us. We currently host 100+ Zope instances, almost
> all of which are load balanced over more than one physical server  
> using
> pound. Our databases are MySQL and increasingly, PostgreSQL, and these
> are also load balanced using pound.
>
> At the moment, the django site is running using mod_python and Apache
> 2.0, but this is not the way that our other systems run - we use pound
> and Zope clustering software (ZEO) to enable us to clone and slot in
> another Zope instance into the cluster as needed. This system has  
> grown
> organically over several years, for example, for quite some time, we
> did no load balancing at all, even for our most heavily used systems.
>
> What I'd really like to know is how we could replicate this level of
> functionality with a django setup.
>
> Any ideas? I can provide more details if people would like to know,  
> but
> really at the moment, I'm just trying to get a handle on what's
> possible.
>
> many thanks in advance,
> Tone
>
>
> >

--
Ian Holsman
[EMAIL PROTECTED]
http://garden-gossip.com/ -- what's in your garden?



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: settings

2006-10-14 Thread Ian Holsman

hi Devel-Fashion content.

I would suggest you start a 2nd apache instance on your machine, and  
let it run mod-python.
you can then have the first apache reverse proxy the request to the  
mod-python apache.

regards
Ian.

On 15/10/2006, at 8:08 AM, devel - Fashion Content wrote:

>
> Being a complete python newbie I have really struggled to get  
> Django up and
> running with scgi. No I don't want to use mod_python if I can avoid  
> it as
> apache is handling all trafic for several sites and only one will  
> be using
> python.
>
> I can get 'manage.py runserver' started no problem, so I would  
> think that
> the project is properly configured.
> I am using the django-scgi.py script on Python 2.4 and a patched  
> mod_scgi on
> Apache 2.2
>
> I added an extra print statement to verify that the server runs with a
> decent sys.path
>
> The server starts fine:
>
> #
> ./django-scgi.py --projects=/opt/django/fc --etclog=/var/log/httpd/ 
> django-fc2.log
>  --errorlog=/var/log/httpd/django-error2.log --host=localhost -- 
> port=8882 --settings=fcsite.settings
> running with sys.path
> ['/opt/django/fc', '/opt/django',
> '/usr/lib/python2.4/site-packages/setuptools-0.6c1-py2.4.egg',
> '/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg',
> '/usr/lib/python2.4/site-packages/flup-0.5-py2.4.egg',
> '/usr/lib/python24.zip', '/usr/lib/python2.4',
> '/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk',
> '/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages',
> '/usr/lib/python2.4/site-packages/Numeric',
> '/usr/lib/python2.4/site-packages/gtk-2.0']
> 2006-10-14 22:58:09 : WSGIServer starting up
>
> But when I try to access the application, I get an exception.
>
> I looked at the Django code in conf/__init__, and if I read it  
> correctly the
> actual exception could be a lot of things besides not specifying  
> settings.
>
> Any ideas?
>
> 2006-10-14 22:58:13 : GET /
> 2006-10-14 22:58:13 : Exception caught from handler
>
> Traceback (most recent call last):
>   File
> "/usr/lib/python2.4/site-packages/flup-0.5-py2.4.egg/flup/server/ 
> scgi_base.py",
> line 216, in run
> self.processInput()
>   File
> "/usr/lib/python2.4/site-packages/flup-0.5-py2.4.egg/flup/server/ 
> scgi_base.py",
> line 264, in processInput
> req.run()
>   File
> "/usr/lib/python2.4/site-packages/flup-0.5-py2.4.egg/flup/server/ 
> scgi_base.py",
> line 187, in run
> self._conn.server.error(self)
>   File
> "/usr/lib/python2.4/site-packages/flup-0.5-py2.4.egg/flup/server/ 
> scgi_base.py",
> line 470, in error
> request.stdout.write('Content-Type: text/html\r\n\r\n' +
>   File "/usr/lib/python2.4/cgitb.py", line 132, in html
> vars = scanvars(reader, frame, locals)
>   File "/usr/lib/python2.4/cgitb.py", line 83, in scanvars
> value = getattr(parent, token, __UNDEF__)
>   File
> "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/conf/ 
> __init__.py",
> line 27, in __getattr__
> self._import_settings()
>   File
> "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/conf/ 
> __init__.py",
> line 54, in _import_settings
> self._target = Settings(settings_module)
>   File
> "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/conf/ 
> __init__.py",
> line 82, in __init__
> raise EnvironmentError, "Could not import settings '%s' (Is it on
> sys.path? Does it have syntax errors?): %s" %  
> (self.SETTINGS_MODULE, e)
> EnvironmentError: Could not import settings 'fcsite.settings' (Is  
> it on
> sys.path? Does it ha
>
>
> >

--
Ian Holsman
[EMAIL PROTECTED]
http://garden-gossip.com/ -- what's in your garden?



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: python textile library?

2006-10-09 Thread ian

RG wrote:
> Been playing around with generic views and templates and have run
> across this error:
> Exception Value: Error in {% textile %} filter: The Python textile
> library isn't installed.
> So is there a python textile library I need to install? If so, where
> can I get this and how can I install it?
> 
> Thanks,
> Ryan
> 
> 
> > 
> 
Ola,
On Debian/Ubuntu:

[EMAIL PROTECTED]:$apt-get install python-textile

[]'s
Ian

-- 
Ian Lawrence
Centre for Bioinformatics
INSTITUTO NACIONAL DE PESQUISAS DA AMAZÔNIA-INPA
RUA ANDRÉ ARAÚJO N º .2936 , BAIRRO DO ALEIXO
MANAUS-AMAZONAS-BRAZIL
Research Program in Biodiversity
http://ppbio.inpa.gov.br
PHONE: 055-92-3643-3358
CEP. 69011 -970

| Please do not send me documents in a closed
| format.(*.doc,*.xls,*.ppt)
| Use the open alternatives. (*.pdf,*.html,*.txt)
http://www.gnu.org/philosophy/no-word-attachments.html

"We are all in the gutter, but some of us are looking at the stars."

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: sharing session information with plone

2006-10-06 Thread ian

spacedman wrote:
> 
> ashwoods wrote:
>> does anybody have experience of sharing session information from a
>> plone site. I want our intranet users that are authenticaded in plone
>> to be able to access django without having to relog.
> 
>  Haven't done this directly, but what you'd have to do is get the __ac
> cookie that plone uses for sessions and use that.
> 
>  So, your django site would have to be on the same domain as your plone
> site.
> 
>  Then your django code would get the __ac cookie from the request.
> 
>  Then it would have to use something in the zope/plone API to get the
> username.
> 
>  Tricky bit would be talking to zope - I'm not sure how deep in the
> zope authentication system you'd have to go. It might be something we'd
> want to do on our site, so I might ponder it more later. If you get any
> ideas yourself, share them!
> 
> Barry
> 
> 
> > 
> 
Ola,
the Plone site says that Plone 2.5 uses a:

Pluggable Authentication Service
The new authentication structure in Plone 2.5 makes it very easy to
integrate any kind of authentication with Plone.  Roles, groups,
authentication, and user data are all managed with separate plugins, and
each can potentially get its data from a different source.  This offers
integrators substantial flexibility.  Plugins for LDAP and GMail (!)
already exist, and more are easily added.

there is an example of the GMail plugin here:
http://plone.org/products/gmailauthplugin

which is very simple and and can be used as a learning tool or even a
template.
If you do write something for Django send it to the list
[]'s

-- 
Ian Lawrence
Centre for Bioinformatics
INSTITUTO NACIONAL DE PESQUISAS DA AMAZÔNIA-INPA
RUA ANDRÉ ARAÚJO N º .2936 , BAIRRO DO ALEIXO
MANAUS-AMAZONAS-BRAZIL
Research Program in Biodiversity
http://ppbio.inpa.gov.br
PHONE: 055-92-3643-3358
CEP. 69011 -970

| Please do not send me documents in a closed
| format.(*.doc,*.xls,*.ppt)
| Use the open alternatives. (*.pdf,*.html,*.txt)
http://www.gnu.org/philosophy/no-word-attachments.html

"We are all in the gutter, but some of us are looking at the stars."

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Does anybody solved the django project distribution problem?

2006-10-05 Thread ian

[EMAIL PROTECTED] wrote:
> i find this thread from Rob:
> Distribute Django program to run on a local computer
> http://groups.google.com/group/django-users/browse_thread/thread/609f539387ba8296/a3ff0fc87da20bed
> 
> i m trying to do the same thing.but the thread end with no result.
Ola,
You could package your django app into a deb [see a previous post] and
include it in a Linux Live CD. The advantage of this is that you can
customise everything, the usplash image,desktop,apps and so on. If you
want to go the Linux custom Live-CD there are some new resources available.
http://reconstructor.aperantis.com/index.php?option=com_frontpage&Itemid=1
is a completely GUI way of doing this and has support for the latest
bleeding edge ubuntu (Edgy 6.10 Live CD) and is the best I have found in
creating an .iso
This:
http://lichota.net/%7Ekrzysiek/projects/ubuntu-livecd-customization/
is also a GUI based tool.

If you feel like getting your hands dirty on the command line with
mksquashfs,chroot and so on have a look at:
https://help.ubuntu.com/community/LiveCDCustomization/6%2e06
http://www.atworkonline.it/~bibe/ubuntu/custom-livecd.htm

On Windows/Mac i dunno but I am sure you could buy something to
do the same thing.
HTH
[]'s

-- 
Ian Lawrence
Centre for Bioinformatics
INSTITUTO NACIONAL DE PESQUISAS DA AMAZÔNIA-INPA
RUA ANDRÉ ARAÚJO N º .2936 , BAIRRO DO ALEIXO
MANAUS-AMAZONAS-BRAZIL
Research Program in Biodiversity
http://ppbio.inpa.gov.br
PHONE: 055-92-3643-3358
CEP. 69011 -970

| Please do not send me documents in a closed
| format.(*.doc,*.xls,*.ppt)
| Use the open alternatives. (*.pdf,*.html,*.txt)
http://www.gnu.org/philosophy/no-word-attachments.html

"We are all in the gutter, but some of us are looking at the stars."

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: follow-the-tutorial.. little problem..

2006-10-04 Thread ian

Marco Amato wrote:
> Hi !
> 
> I am in the part 2 of the tutorial after add the class Admin in evere
> object and uncommenti in url.py the admin url
> 
> I receive this error from the server :
> 
> SuspiciousOperation at /admin/
> User tampered with session cookie.
> Request Method:   GET
> Request URL:  http://127.0.0.1:8000/admin/
> Exception Type:   SuspiciousOperation
> Exception Value:  User tampered with session cookie.
> Exception Location:
>   
> /usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/contrib/sessions/models.py
> in get_decoded, line 65
> 
> I use svn version, where could be my error ?
> 
> Thanks
> 
> MA.
> 
> > 
> 
Ola,
I got this when i changed my secret key after I had created my models...
[]'s
Ian

-- 
Ian Lawrence
Centre for Bioinformatics
INSTITUTO NACIONAL DE PESQUISAS DA AMAZÔNIA-INPA
RUA ANDRÉ ARAÚJO N º .2936 , BAIRRO DO ALEIXO
MANAUS-AMAZONAS-BRAZIL
Research Program in Biodiversity
http://ppbio.inpa.gov.br
PHONE: 055-92-3643-3358
CEP. 69011 -970

| Please do not send me documents in a closed
| format.(*.doc,*.xls,*.ppt)
| Use the open alternatives. (*.pdf,*.html,*.txt)
http://www.gnu.org/philosophy/no-word-attachments.html

"We are all in the gutter, but some of us are looking at the stars."

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



long db field names

2006-10-02 Thread ian

Hi,
Bit of a newbie question.
I am using longish field names in my db ...in the admin pages the ends
of the names are covered up by the entry,drop down boxes etc...i am sure
somewhere in the css i change this but... .
The docs say:
All admin pages (except the dashboard) are fluid-width. All fixed-width
classes from previous Django versions have been removed.
so maybe i have found a bug
Ubuntu Dapper 6.06 LTS Dapper Drake
Ubuntu/dapper-security Firefox/1.5.0.7
[]'s

-- 
Ian Lawrence
Centre for Bioinformatics
INSTITUTO NACIONAL DE PESQUISAS DA AMAZÔNIA-INPA
RUA ANDRÉ ARAÚJO N º .2936 , BAIRRO DO ALEIXO
MANAUS-AMAZONAS-BRAZIL
Research Program in Biodiversity
http://ppbio.inpa.gov.br
PHONE: 055-92-3643-3358
CEP. 69011 -970

| Please do not send me documents in a closed
| format.(*.doc,*.xls,*.ppt)
| Use the open alternatives. (*.pdf,*.html,*.txt)
http://www.gnu.org/philosophy/no-word-attachments.html

"We are all in the gutter, but some of us are looking at the stars."

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Was: [Re: Why I'm giving up on Django] Now: Creating Debian Application Installer package

2006-10-02 Thread ian

Baurzhan Ismagulov wrote:
> Hello mamcxyz,
> 
> On Fri, Sep 29, 2006 at 07:43:49AM -0700, mamcxyz wrote:
>> - Deployment. I work on Delphi and the idea of put a EXE and all is
>> working right (tm) is a feeling I lost with python on hosting.
> 
> So what about writing a small script that will do this for you?
> Something like
> 
> tar cC /localdir/myprj . |ssh host tar xC /remotedir/myprj
> 
> FWIW, I create a Debian package of my project and install it on the
> server.
> 
> With kind regards,
> Baurzhan.
> 
> > 
> 
Hi,
This is very interesting and would maybe make a great tutorial ...here
is my shot at how you would do this and create a hello-world application
for Django (please correct the errors):
1. Create a directory hello-world-1.0.0 (more on debian package naming
at Debian New Maintainers' Guide:
http://www.us.debian.org/doc/maint-guide/) and put all files in it
2.Debian packages use makefiles (Makefile) instead of Python Distutils
(Distributing Python Modules: http://docs.python.org/dist/dist.html) so
we have to write a Makefile to act as an interface between the Debian
package system and our setup.py.
So create a file called "Makefile" containing this:

all:
python2.4 setup.py build

clean:
python2.4 setup.py clean --all

install:
python2.4 setup.py install

3. In a terminal run dh_make:
[EMAIL PROTECTED]:~/hello-world-1.0.0$ dh_make -e [EMAIL PROTECTED]
This will output some info to the screen (choose single binary as the
package type) and it will then create a debian/ directory below the
hello-world-1.0.0 directory. The key files in this directory are control
and rules. In 'control' it's a "fill in the blanks" work and in 'rules'
 it's essentially a matter of removing unwanted/unnecessary code
Because our app is 100% Python we have 100% architecture
independence...so the bottom of the rules file should look like:

# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb

binary-arch: build install



4.After step 3 we have to actually build the package now:
[EMAIL PROTECTED]:~/hello-world-1.0.0$ dpkg-buildpackage -rfakeroot

The parent directory should now have a file called
hello-world_1.0.0-1_all.deb which is your Debian package to install
where you like with dpkg -i  hello-world_1.0.0-1_all.deb

[]'s



-- 
Ian Lawrence
Centre for Bioinformatics
INSTITUTO NACIONAL DE PESQUISAS DA AMAZÔNIA-INPA
RUA ANDRÉ ARAÚJO N º .2936 , BAIRRO DO ALEIXO
MANAUS-AMAZONAS-BRAZIL
Research Program in Biodiversity
http://ppbio.inpa.gov.br
PHONE: 055-92-3643-3358
CEP. 69011 -970

| Please do not send me documents in a closed
| format.(*.doc,*.xls,*.ppt)
| Use the open alternatives. (*.pdf,*.html,*.txt)
http://www.gnu.org/philosophy/no-word-attachments.html

"We are all in the gutter, but some of us are looking at the stars."

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: How about a Django apps public repository?

2006-10-01 Thread Ian Holsman


On 02/10/2006, at 11:42 AM, Sean Schertell wrote:

>
>>> I'm the guy that started this thread and had pledged to take the  
>>> lead
>>> on this. Ironically, I'm also the guy who started the recent thread
>>> "Why I'm giving up on Django". So for now, it looks like I'll be
>>> taking an indefinite hiatus from Django dev.
>>
>> just curious - did you indulge in all this fanfare when you left PHP
>> for django?
>
> Fanfare? Not sure what you mean really. The only reason I added to
> this thread again was because I have some domain names I'd like to
> donate which might be useful to the community.

I've been sidetracked on other (non-django) issues.. hence why i've  
been silent on the list
when I can get my head out of the water for a period I'll release  
what I have.

regards
Ian.
--
Ian Holsman
[EMAIL PROTECTED]
http://car-chatter.com/ where car fanatics meet



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Preventing Multiple Submits

2006-09-28 Thread Ian Maurer

Just wondering if anyone has thought through the problem of multiple
submits due to multiple clicks of a submit button?

I am already properly using POSTs and GETs and doing a redirect after
a POST, as recommeded by the Django docs.

The issue I am talking about is when a user clicks the submit button rapidly.

The "easy" answer is to use JavaScript to disable the submit button
after the first click and I guess I am leaning towards that since I do
require JavaScript for the particular app I am working on. However, I
was hoping to come up with a more general purpose solution.

One thought I had was overriding the AddManipulator and adding a
hidden field with a "token". And then using the Session map to store
and retrieve the primary key of a created object using the token.

Then it occurred to me that the CSRF middleware is already doing
something very similar and I was wondering if anyone already leveraged
it to also handle this problem? (Or can think of a reason why not to)

http://www.djangoproject.com/documentation/csrf/

And even if I do solve this problem, there are still synchronization
issues to deal with the multiple submits. (ie, if request 1 doesn't
store the pk prior to request 2 goes looking for it).

I am beginning to think that I am overthinking this, but I still want
to see if anyone else has thought this through...

thanks,
Ian

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Fast hosting for Django

2006-09-25 Thread ian

David Sissitka wrote:
> In case anyone is wondering, that is Remi from WebFaction, and that's 
> also why I am a WebFaction customer. :)
>
> On 9/25/06, *Remi* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
>
>
> Just a few comments about WebFaction.
>
> > I am a WebFaction customer, definitely not a bad company. A few
> thoughts
> > about WebFaction:
> >
> > 1) It's a one man show, at least, support is.
>
> WebFaction started with just 3 people but we're growing quite rapidly
> right now so expect to see more people soon :)
>
> > Support ticket response times
> > are anywhere from three hours to a day and a half.
>
> We aim to respond within a few minutes or hours (depending on how
> urgent the ticket is), and always within 24 hours. If a ticket took a
> day and a half to get answered it was a mistake on our part and should
> never happen.
>
> > 2) The control panel may be appealing but it is definitely
> flawed. It
> > supports Firefox and Internet Explorer, but things are pretty
> slow with
> > Opera. Their long running process monitoring (You're allowed one
> long
> > running process at $14.50 USD a month.) is pretty bad as well,
> stopping and
> > restarting your Apache instance leaves orphaned processes that you
> > cannot monitor or kill off yourself.
>
> I think you're talking about our control panel not killing the
> processes for you when you delete an application from the control
> panel, I just fixed that bug today :)
>
> A couple more things:
> I can't tell for sure but I'd say that we're probably one of the hosts
> with the most Django sites right now (we host more than 200 of them).
> By gaining some experience from all these sites we've been able to
> eliminate pretty much all problems (like the libexpat version mismatch
> that was causing Apache to crash sometimes) and fine tune our setup.
> I think that we now have one of the best setup for shared hosting: we
> give each site their own Apache2/mod_python instance proxied
> behind our
> main Apache server. This gives them maximum flexibility to start/stop
> their Apache server on their own and edit their httpd.conf file as
> they
> want.
> But we also configure our main Apache server to serve static data
> (images, stylesheets, ...) directly, for maximum speed (this frees
> each
> site's Apache2/mod_python instance from having to serve all those
> little requests).
>
> Remi.
>
>
>
>
> >
Mmm...i am thinking about parting with some hard earned too
[]'s


-- 
Ian Lawrence
Centre for Bioinformatics
INSTITUTO NACIONAL DE PESQUISAS DA AMAZÔNIA – INPA
RUA ANDRÉ ARAÚJO N º .2936 – BAIRRO DO ALEIXO
MANAUS-AMAZONAS-BRAZIL
PPBio – Research Program in Biodiversity
http://ppbio.inpa.gov.br
PHONE: 055-92-3643-3358
CEP. 69011 -970

| Please do not send me documents in a closed
| format.(*.doc,*.xls,*.ppt)
| Use the open alternatives. (*.pdf,*.html,*.txt)
http://www.gnu.org/philosophy/no-word-attachments.html

"We are all in the gutter, but some of us are looking at the stars."


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: DNS Change when moving site from PHP to Django

2006-09-20 Thread Ian Holsman

put a entry in your /etc/hosts (or the windows equivalent )

On 21/09/2006, at 8:03 AM, keukaman wrote:

>
> I have a project where I am going to redesign a PHP/MySQL site into
> Django/Postgres.
>
> The site will be moved from a shared environment to a new, shared
> environment.
>
> One area that I am not sure about is how to set up the new site before
> changing the DNS settings to point to the new hosting facility. For
> instance, I won't be able to use "media.sitename.com" for my media
> files in the new Django site until I have moved the site.
>
> Any suggestions?
>
>
> >

--
Ian Holsman
[EMAIL PROTECTED]




--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Trackback spam in Blogs

2006-09-16 Thread Ian Holsman


On 16/09/2006, at 6:04 PM, Malcolm Tredinnick wrote:

>
> On Sat, 2006-09-09 at 00:45 -0700, [EMAIL PROTECTED] wrote:
>> Hi.
>
> (3) Checking that the trackback caller actually links to your blog
> somewhere in the first N bytes of the post they claim to be linking  
> from
> (unclear what a good N is here. I'm starting with 4 KB, but it's
> tunable).

this is called 'pingback', and it is pretty effective, but not perfect.
splogs still exist that link back to you... but there aren't as many

> (4) Possibly repeating the check in (3) after 24 hours or so (so that
> they have to keep an attacking page up longer).

in my experience, this isn't needed. most splogs just use  
rel=nofollow on the link.

>
> Cheers,
> Malcolm
>
regards
Ian

--
Ian Holsman
[EMAIL PROTECTED]
<http://car-chatter.com/> where car fanatics meet



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Has anyone run Django on a cpanel box (w/root access)

2006-09-14 Thread Ian Holsman

why not build mod-proxy into the  apache13 ?
that would be the simplest option.

regards
Ian
On 15/09/2006, at 2:50 PM, [EMAIL PROTECTED] wrote:

>
> Hi guys,
>
> I need to install a django app onto a client's cpanel box. I have root
> access and can install whatever's needed. But the trouble is that
> cpanel still uses Apache 1.3 (ugh). And to make matters worse, it uses
> Apache 1.3 without the mod_proxy module.
>
> I can't install Apache2 without breaking cpanel which means that
> running django through mod_python is out. I've had really bad
> FastCGI/Apache experiences in the past with Rails so I think that's a
> bad idea. The only option I can think of is to recompile Apache with
> mod_proxy and run Lighttpd/FastCGI proxied through Apache.
>
> Any other suggestions?
>
> Sean
>
>
> >

--
Ian Holsman
[EMAIL PROTECTED]




--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Core dump- how to diagnose?

2006-09-13 Thread Ian Holsman

for future reference.
the easiest way to get a hint on what is going on is to look at the  
backtrace from the core dump and see what it says.

$ gdb $(which python) --core=
gdb> bt

this is what I have done in the past, when python segfaulted..
for me it turned out to be python was using a different version of  
expat than what apache was... and the backtrace
helped as was segfaulting in a XML area.

regards
Ian

On 14/09/2006, at 1:42 AM, Richard Phelps wrote:

> Michael ,
> Some obscure (to me anyhow) tests failed for django. A fresh build  
> (with the compiler used for my mysql installation) and install from  
> source of python and MySQLdb has overcome the problem which I  
> suspect stemmed from mixing elements compiled with different  
> compilers? Thanks for you help.
>
> On 12 Sep 2006, at 17:32, Michael Radziej wrote:
>
>>
>> Hi,
>>
>> richard wrote:
>>> Hello,
>>> I'm trying to move a functioning development django project  
>>> developed
>>> on an Os x box (django svn up to date, python 2.4.3) to an 'exposed'
>>> AIX 5.3 server and am falling at an early unanticipated hurdle with
>>> core dumps from django!
>>> On the AIX box I have ActivePython 2.4 and have tried the 0.95 and
>>> latest django distibutions. In both cases with just a 'startproject'
>>> bare bones site and using the django development server I can get  
>>> the
>>> home page of /admin, but if I click on User or Groups it core dumps.
>>> The documentation link works ok, and from a python shell I can  
>>> access
>>> the database ok.
>>> How do I go about diagnosing the problem? The only resource seems  
>>> to be
>>> the core dump which is massive!
>>
>> Python shouldn't produce a core dump even with faulty programs,
>> as long as no C extension is involved. Therefore, I'd suspect
>> either the python interpreter itself or any C extension modules.
>> Especially the database driver.
>>
>> Python comes with a test suite. Try it. Try the Django test suite
>> with different database drivers. Perhaps even post your problem
>> to a python list or look for any AIX community. At least latter
>> should be able to tell you how to analyse AIX core dumps.
>>
>> Michael
>>
>>
>>
>> >>

--
Ian Holsman
[EMAIL PROTECTED]
http://peopleintopoker.com/ -- where the poker people go



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



psycopg error

2006-09-13 Thread Ian

Hi,
I have an existing 3GB PostGIS legacy database which i
am inspecting with:
django-admin.py inspectdb > /some/directory/models.py

i have installed psycopg2 so my settings.py looks
like:
DATABASE_ENGINE = 'postgresql_psycopg2'

when i run the command i get the error:
File
"/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/db/backends/postgresql_psycopg2/introspection.py",
line 35, in get_relations
relations[int(row[0][1:-1]) - 1] =
(int(row[1][1:-1]) - 1, row[2])
TypeError: int() argument must be a string or a number

Maybe this is because the db is spatially enabled?..i
am not sure. Or maybe i should revert to psycopg1?.New
to Django to be honest.

Any advice
thx
[]'s


-- 
Ian Lawrence
Centre for Bioinformatics
INSTITUTO NACIONAL DE PESQUISAS DA AMAZÔNIA – INPA
RUA ANDRÉ ARAÚJO N º .2936 – BAIRRO DO ALEIXO
MANAUS-AMAZONAS-BRAZIL
PPBio – Research Program in Biodiversity
http://ppbio.inpa.gov.br
PHONE: 055-92-3643-3358
CEP. 69011 -970

| Please do not send me documents in a closed
| format.(*.doc,*.xls,*.ppt)
| Use the open alternatives. (*.pdf,*.html,*.txt)
http://www.gnu.org/philosophy/no-word-attachments.htm

What is the digital equivalent of lovely, he wondered.
What are the
digits that encode beauty, the number fingers that
enclose, transform,
transmit, decode and somehow in the process, fail to
trap or choke the
soul of it.
Not because of the technology but in spite of it,
beauty, that ghost,
that treasure, passes undiminished through the new
machines


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: How about a Django apps public repository?

2006-09-11 Thread Ian Holsman


On 11/09/2006, at 10:53 PM, charles sibbald wrote:

> I think Djangoforge should have the ability to host projects as  
> follows:
>
> 1. Full projects
> 2. Useful Classes
> 3. Useful Functions -
>
> similar to a mini hotscripts, sometimes someone has written a great  
> project/application but no one has the time to trall through to  
> look for particular featureful classes/functions, and it would be  
> great to have the ability to list these seperately when one feels  
> they have had a stroke of genius and have written a class/function  
> they feel is simply amazing.
>
> Also can we have a forum rather than mailing lists, they are  
> anoying and not the easiest to store knowledge on problems/resolutions

ok..
i have a slightly different idea.

there are enough places to host a open source project.
a) python-hosting
b) sourceforge
c) google

the world would not be any better having another SVN/Trac for a  
project. also people won't move their existing project
just because we offer a forge.

What I was thinking of was more a directory of projects. more just  
storing the meta-data like
mailing lists locations, release information, projects it relies on,  
and projects which use it and stuff like that.

we could then aggregate this information to provide a centralized RSS  
feed on top of it so people can keep track of
new releases and  new projects.. as well as a way for people to  
search and browse through the list of projects, so they
can find what they need.

regards
Ian.



> regards
>
> charles.
>
> - Original Message 
> From: Marc Fargas <[EMAIL PROTECTED]>
> To: django-users@googlegroups.com
> Sent: Monday, September 11, 2006 1:26:25 PM
> Subject: Re: How about a Django apps public repository?
>
>
> Oh, I was going for .ORG! Luckylly I read the list before going for  
> it ;)
>
> If you, or another volunteer can setup a system (debian etch
> preferred) I can go on configuring the mailling lists, the TRAC
> hosting, SVN repositories and so on (and some scripts to manage them).
> It would be better to use a VPS on its own for security.
>
> So, if anybody has a spare debian etch VPS around there ... ;)) Then
> we can get what Ian is working on and tie everything toghether. I'll
> be on IRC during the afternoon (telenieko)
>
> Cheers,
> Marc.
>
> On 9/11/06, Sean Schertell <[EMAIL PROTECTED]> wrote:
> >
> > Okay then, let's do it :-)
> >
> > I can get started in October putting this together. I have servers,
> > bandwidth, and general webdev skills. I've registered  
> djangoforge.net
> > for us to use, and I can commit to maintaining the site.
> >
> > Any other volunteers for helping to develop the system? Any other
> > apps contributions?
> >
> > Also, more thoughts on how you'd like to see this implemented would
> > be much appreciated. How would you like this site to work? What
> > features do we need at a minimum?
> >
> > Thanks!
> >
> > Sean
> >
> >
> >
> > On Sep 9, 2006, at 12:33 PM, Jeff Forcier wrote:
> >
> > >
> > > Sean Schertell wrote:
> > >>
> > >> Any other contributors?
> > >
> > > I've got a handful of templatetags, which while somewhat outdated
> > > (built against ~0.91) should still be useful. I also have a (very)
> > > small forums app which I plan on expanding when I find the time,
> > > although it would need some cleanup to use outside of the site  
> it's
> > > currently in.
> > >
> > > There are a couple of other things I've written up but one of them
> > > sucks and the other one is really just documentation which should
> > > go in
> > > a blog post or on the Django wiki.
> > >
> > >
> > > >
> > >
> > >
> >
> >   DataFly.Net  
> > Complete Web Services
> > http://www.datafly.net
> >
> >
> > >
> >
>
>
> -- 
> The probability of failure of a (computer) system is exponentially
> proportional to the physical distance between it and the one who could
> fix it. -- Martin F. Krafft
>
>
> >
>

--
Ian Holsman
[EMAIL PROTECTED]
http://peopleintopoker.com/ -- where the poker people go



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: How about a Django apps public repository?

2006-09-10 Thread Ian Holsman

I've nearly got something together now.
I just need to add some basic templates for it.

Give me a day or two to get it up ;-)

regards
Ian
On 11/09/2006, at 12:52 PM, Sean Schertell wrote:

>
> Okay then, let's do it :-)
>
> I can get started in October putting this together. I have servers,
> bandwidth, and general webdev skills. I've registered djangoforge.net
> for us to use, and I can commit to maintaining the site.
>
> Any other volunteers for helping to develop the system? Any other
> apps contributions?
>
> Also, more thoughts on how you'd like to see this implemented would
> be much appreciated. How would you like this site to work? What
> features do we need at a minimum?
>
> Thanks!
>
> Sean
>
>
>
> On Sep 9, 2006, at 12:33 PM, Jeff Forcier wrote:
>
>>
>> Sean Schertell wrote:
>>>
>>> Any other contributors?
>>
>> I've got a handful of templatetags, which while somewhat outdated
>> (built against ~0.91) should still be useful. I also have a (very)
>> small forums app which I plan on expanding when I find the time,
>> although it would need some cleanup to use outside of the site it's
>> currently in.
>>
>> There are a couple of other things I've written up but one of them
>> sucks and the other one is really just documentation which should
>> go in
>> a blog post or on the Django wiki.
>>
>>
>>>
>>
>>
>
>   DataFly.Net  
> Complete Web Services
> http://www.datafly.net
>
>
> >

--
Ian Holsman
[EMAIL PROTECTED]
http://zyons.com/ build a Community with Django



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: to login or not to login, that is the question

2006-09-10 Thread Ian Holsman


On 11/09/2006, at 9:16 AM, Tamara D. Snyder wrote:

>
> Hi All,
>
> There is a web application I would like to write for a class I teach
> at the university.  I would like my students to be able to log in and
> do something ("homework" if you like).
>
> I'd like to reuse the application next semester, with a different set
> of students.  And I naturally don't want my students to have any
> access at all to the admin site.

thats cool.. you can write a script to wipe your student database  
afterwards,
or just mark them as inactive in the auth system.
you can also 'hide' the admin section on another machine if you feel  
that your students
are particularly prone to 'hacking'.

regardless of which auth system you use, you will need to have some  
sort of method of 'starting anew'
when the next semester starts I'm guessing.

>
> I have considered making the database that contains all the student
> data - names, scores, etc. - one of the backends for the auth
> system.  But now I am wondering if that is really what I want to do.
> Maybe I don't really want to log them in at all.  Maybe I should
> create my own authentication system, and just recored if they are
> "OK" or not in the session, basically as just another cookie.

you could do that, but having the information only stored in a cookie  
would mean
they would lose it if they switched to another browser, or used  
another computer.

one another project I worked on, we used a separate user table to  
authenticate against.
what that meant was all the existing functionality of django's auth  
system needed to be
re-implemented. .. a big waste of time, and resources.

speaking from personal experience... use the standard auth app, and  
possibly use some add on's
like http://svn.zyons.python-hosting.com/trunk/zilbo/common/ 
accounts/  to help manage the students
lost passwords etc.

regards
Ian

> That
> means that they would technically anonymous users, but with with a
> status that allows them to access certain "homework" pages.  Then I
> would not have to worry that 330 people may potentially be allowed
> into the admin site at all.
>
> Many of you have lots more experience at this sort of thing than I
> do.  What do you think?  Should I use the django provided auth system
> with my student database as a backend, or should I create my own  
> thing?
>
> Thanks for your opinions!
>
> Tamara
>
>
>
> >

--
Ian Holsman
[EMAIL PROTECTED]
join http://gypsyjobs.com the marketplace for django developers



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Shared Hosting suggestion

2006-09-07 Thread Ian Holsman


On 08/09/2006, at 8:13 AM, [EMAIL PROTECTED] wrote:

>
>
>> Pretty much any shared hosting service that supports Python and
>> FastCGI will work (some offer mod_python, but not a lot of them, so
>> FastCGI is usually the way to go on shared).
>
> sorry, i am new to django... so don't i need root access and the
> possibility to "really" install django? can i just put it into some of
> my own directories like with most php applications?

it works a bit differently, but on webfaction most of the  
installation is done
via their web-gui... no root required.
(It also uses mod-python)

regards
Ian
>
>

--
Ian Holsman
[EMAIL PROTECTED]
http://car-chatter.com/ where car fanatics meet



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: How about a Django apps public repository?

2006-09-06 Thread Ian Holsman

I started thinking of writing one, and have got the basic data model
and how I think it would operate worked out.

it's just a matter of getting enthused enough to actually sit down  
and write it.

regards
Ian

On 07/09/2006, at 2:50 PM, Sean Schertell wrote:

>
> I wonder how many of us are writing nearly identical apps at any
> given time. For example, I just hired a guy to write a really basic
> newsletter app for my project. Now I'm working on a fairly typical
> "upcoming events" schedule. And soon I'll be working on a simple
> photo gallery that makes thumbnails as you upload, etc. I'd bet
> dollars to donuts that many of you have written these apps already.
>
> Wouldn't Django be that much sexier if it came with an ever-expanding
> repository of apps that we could all share with each other? The fact
> that apps are modular plug-and-play in Django is *really* cool (Rails
> can't do that). So why not leverage the "pluggability" of Django's
> app architecture by making a bunch of these apps public?
>
> Am I alone on this? If I created such a repository would anyone use  
> it?
>
> Sean
>
> >

--
Ian Holsman
[EMAIL PROTECTED]
http://VC-chat.com It's what the VC's talk about



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Returning images with Django

2006-09-04 Thread Ian Holsman

 im = Image.open('%s/blah.jpg' % settings.MEDIA_ROOT )
 resp = HttpResponse( mimetype="image/jpeg" )
 im.save( resp, 'JPEG' )
 return resp

?

On 04/09/2006, at 9:09 PM, Filipe wrote:

>
> Hi all,
>
> I need to make some images available on my django website that are
> stored on an internal file server. The idea would be that Django would
> be listening to requests for those images, the respective view would
> read the bytes for the requested image (which would be available
> locally via samba) and return the bytes to the web browser.
>
> Can the HttpResponse returned by a View object contain an image? are
> there any examples?
> Is this possible and the best way to do it?
>
> thanks in advance
>

--
Ian Holsman
[EMAIL PROTECTED]
http://garden-gossip.com/ -- what's in your garden?



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: PyCaptcha for the Zyons Project

2006-09-04 Thread Ian Holsman

it looks like it is on the cheese shop.
http://cheeseshop.python.org/pypi/PyCAPTCHA/0.4
with the download here
http://cheeseshop.python.org/packages/2.4/P/PyCAPTCHA/PyCAPTCHA-0.4- 
py2.4.egg#md5=cd6a31191c0dd3afee219886c936fcac

regards
Ian.

On 04/09/2006, at 8:18 PM, Aidas Bendoraitis wrote:

>
> Hello, Djangoers!
>
> I am not sure I am writing to the right audience, but maybe somebody
> will be able to help me. I am trying to install the Forum/Community
> application "Zyons" mentioned at code.djangoproject.com and it seems
> that the python module PyCaptcha required for Zyons is no longer
> supported (I can't access the repository of PyCaptcha). Could somebody
> having the sources of PyCaptcha either place the archived module on
> some publicly accessible website and give me a link to the file, or
> send the archive personally to me?
>
> Best Regards,
> Aidas Bendoraitis [aka Archatas]
>
> >

--
Ian Holsman
[EMAIL PROTECTED]
join http://gypsyjobs.com the marketplace for django developers



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Django patch!

2006-09-01 Thread Ian Holsman

just as an aside.. is it possible to change the 'your a spammer' message
to provide some instructions on what to do if you are actually a human.

something like
...
your trac post was blocked by our spam engine. We apolagize for this  
inconvenience,
and while our spam engine was wrong this time, it does stop hundreds  
of  spams a day.

could you please.
a. post your patch to the developers list
b. email jacob to get your IP# white listed

Thanks for your understanding
the Django team

?

regards
Ian



On 02/09/2006, at 3:12 PM, Kenneth Gonsalves wrote:

>
>
> On 02-Sep-06, at 10:25 AM, Jacob Kaplan-Moss wrote:
>
>> Akismet is now rejecting about a hundred spam posts *a day*.  It
>> looks like it gets about one or two false positives *a week*.  I'd
>> certainly say that's doing more good than bad, myself.
>
> thats good - very good
>>
>> If you (or anyone) wanted to take the time to write a "decent spam
>> protection" plugin for Trac, I'm sure both the Django community and
>> the Trac one would thank you!
>>
>> Until then, yes, if you get flagged incorrectly drop an email to
>> django-dev and we'll whitelist you.
>
> after all even core developers have been flagged at times, and
> everyone knows why, so this is a non issue
>
> -- 
>
> regards
> kg
> http://lawgon.livejournal.com
> http://nrcfosshelpline.in/web/
>
>
>
> >

--
Ian Holsman
[EMAIL PROTECTED]
http://economy-chat.com It's what the economists talk about



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Admin looking for media/css/null?

2006-08-27 Thread Ian Holsman

Hi Cole.
your doing nothing wrong.
it's the way the CSS is designed.

I opened a ticket a while back to change this to fetch null.css  
(which would be a blank file in svn) to avoid the error
but it was deemed overkill, and not fixed.

my workaround was to just do this in my local copies.

regards
Ian
On 28/08/2006, at 6:21 AM, Cole Tuininga wrote:

>
> Hi folks - I'm setting up Django with mod_python and I've come across
> a little problem.  When using the admin area, I get an error in my
> apache logs.  Here's an example:
>
> [Sun Aug 27 16:15:59 2006] [error] [client 127.0.0.1] File does not
> exist: /usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/ 
> django/contrib/admin/media/css/null,
> referer: http://localhost:8000/media/css/base.css
>
> Relevant portions of my apache conf looks like this:
>
>   SetHandler python-program
>   PythonHandler django.core.handlers.modpython
>   SetEnv DJANGO_SETTINGS_MODULE lll.settings
>   PythonDebug On
>
>   Alias /media /usr/lib/python2.4/site-packages/Django-0.95- 
> py2.4.egg/django/contrib/admin/media
>   
>   SetHandler None
>   
>
> What am I doing wrong?
>
> -- 
> Cole Tuininga
> http://www.tuininga.org/
>
> >

--
Ian Holsman
[EMAIL PROTECTED]
http://economy-chat.com It's what the economists talk about



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: User Registration weirdness. Ian, help!

2006-08-26 Thread Ian Holsman

Thanks Don.

That, and some other issues identified by Alain Dazzi have been  
resolved in Release  329.

It is recommended that people using these login routines in their own  
code should upgrade ASAP.

On 26/08/2006, at 4:37 PM, Don Arbow wrote:

>
> On Aug 25, 2006, at 12:31 PM, Waylan Limberg wrote:
>>
>> On 8/25/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>>
>> [snip]
>>>
>>> I've gone through and stripped out every extra space I can find,
>>> thinking that was the problem, but still that dang trailing slash
>>> comes
>>> down to the next line. Ideas?
>>>
>> For what its worth, Gmail does indeed display that on 2 lines (only
>> the ending / on line 2), but is correctly includes both lines as a
>> single link with the ending slash. In other words, it looks funny,  
>> but
>> it still points to the correct url.
>>
>> The problem comes with email clients that do not automaticly (or
>> correctly) convert urls to links. The user may not select and copy  
>> the
>> second line as part of the url...
>
>
>
> The old school solution was to surround the url with angle brackets
> <>. Intelligent mail readers would recognize this and display the url
> correctly.
>
> http://www.w3.org/Addressing/URL/5.1_Wrappers.html
>
> Why do people put angle brackets around :
>
> http://ideas.4brad.com/node/443
>
> Don
>
>
> >

--
Ian Holsman
[EMAIL PROTECTED]




--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: i18n: Translating default model values

2006-08-25 Thread Ian Clelland

On 8/20/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Another question regarding internationalization: How can I
> internationalize the default model SQL files?

Sorry, I've been away for a few days, and just catching up on the
mailing list :)

You can't do this with sqlinitialdata, without patching the source to
manage.py, but you *could* use a management.py script, rather than sql
initial data, to pre-populate your tables. I believe that at that
point, you have access to settings, and can check the default
language, and use the appropriate data.

You'll have to do it all in python, rather than sql, but you'll at
least have the full power of django's orm :)

Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: User Registration weirdness. Ian, help!

2006-08-25 Thread Ian Holsman


On 26/08/2006, at 8:13 AM, Pedro Lima wrote:

>
> BTW, depending on your application you may want to make the hash with
> the email and something specific from your site to be able to validate
> the link latter. If you only set the email in the hash someone can do
> cryptString('[EMAIL PROTECTED]') and register.

It does that already.
it uses your secret-key as part of the crypt string.

--
Ian Holsman
[EMAIL PROTECTED]
http://VC-chat.com It's what the VC's talk about



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: import opml file

2006-08-24 Thread Ian Holsman

you might want to check out FeedJack http://www.feedjack.org/
it's done a lot of stuff in that area.

regards
Ian

On 24/08/2006, at 5:42 PM, a wrote:

>
> hi guys how do i import opml file in django
> using syndication
>
> i m tryin to build an rss reader
> thanks
>

--
Ian Holsman
[EMAIL PROTECTED]
http://personalinjuryfocus.com/




--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Webdav access - OT

2006-08-23 Thread Ian Holsman


On 24/08/2006, at 8:31 AM, Jacob Kaplan-Moss wrote:

>
> This is probably not what you want to hear, but I'd *strongly*
> recommend that you not store files in the database.  Filesystems are
> made for, well, storing files, and it's almost always bad design when
> you stuff them into a relational database.

There is actually a argument to storing files in the database.
it makes for easier replication, and you can have other benefits like  
having more meta-data.

especially when you need to do things like remove all crud.. "find"  
can take forever.

>
> Add to that the fact the DAV is a pretty complicated protocol, and I
> think you see why only a few projects actually implement it.

you might want to look for a apache module which does something like  
this (mod_dav_fs for example does
what you want but in a file system.. )

http://www.atmarkit.co.jp/flinux/special/webdav03/webdav01a.html
describes something similar to what you want  by the looks of the  
pictures (but in japanese)

>
> That said, Googling "python webdav server" gives me http://
> sandbox.xerox.com/webdav/, which at first glance might be what you
> want.  Google's nice, isn't it?
>
> Jacob
>

--
Ian Holsman
[EMAIL PROTECTED]
http://personalinjuryfocus.com/




--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: my private django repository goes public

2006-08-23 Thread Ian Holsman

It looks good, and it's BSD licensed as well..
I'm just wondering why you need to include the source of dojo in it?
wouldn't it be easier to just link to them and maintain them separately?

On 24/08/2006, at 6:43 AM, [EMAIL PROTECTED] wrote:

>
> Hi all,
>
> I put some packages for django onto sf.net
> http://svn.sourceforge.net/viewvc/django-userlibs/trunk/
>
> It contains some media packaged ajax toolkits mochikit, prototype,  
> dojo and the wysiwyg-editors tinymce and fckeditor.
>
> If anybody has an idea for other libs to be created, please call.
>
> Regards,
> Dirk
> -- 
>
>
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
>
> >

--
Ian Holsman
[EMAIL PROTECTED]
http://economy-chat.com It's what the economists talk about



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Image validation works only once

2006-08-23 Thread Ian Clelland

On 8/22/06, cyberco <[EMAIL PROTECTED]> wrote:
>
> In my model:
>
> =
> image = models.ImageField(upload_to='pics',
> validator_list=[validators.isValidImage], blank=True)
> =

Without looking more closely at the code involved, I'm not sure why
you'd be getting an error, but you should be okay if you leave the
validation out.

ImageFields automatically have isValidImage added to their validator
list when the upload form is processed, so you don't need to specify
it explicitly in your model.

Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: HTTPS access

2006-08-23 Thread Ian Holsman

does urllib2 ( http://pydoc.org/2.4.1/urllib2.html ) do what you need?

On 23/08/2006, at 7:54 PM, zenx wrote:

>
> "Ruby has different libraries that provide higher-level access to
> network protocols such as FTP, HTTP or HTTPS. This article shows the
> usage of net::http, net::https, open-uri and the rio library."
> (http://www.juretta.com/log/2006/08/13/ruby_net_http_and_open-uri/)
>
> I would like django to connect to gmail via HTTPS and get the contact
> list of a user. I used to do it with PHP+Curl. Is there a library in
> django like curl?
>
> Thanks!
>
>
> >

--
Ian Holsman
[EMAIL PROTECTED]
http://med-chatter.com/ it's about the medicine



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Creating a "mostly static" site with Django -- dumb idea?

2006-08-21 Thread Ian Holsman

you might want to check out hugo's dbtemplate  loader (which I  
updated to work with the current trunk)
http://svn.zyons.python-hosting.com/trunk/zilbo/common/dbloader/

that way you can store the templates themselves in a database, which  
might make life a bit more easier.

regards
Ian

On 22/08/2006, at 3:21 PM, Bryan Chow wrote:

>
> Hi Sean,
>
> No worries, glad to hear that you find TemplatePages useful :)
>
> To answer your question, you can write a custom inclusion tag to
> insert snippets of dynamic content into your templates.
> http://www.djangoproject.com/documentation/templates_python/ 
> #inclusion-tags
>
> Alternately, you could use a custom template processor to make
> variables available to your templates, and handle the rendering in the
> templates instead.
> http://www.djangoproject.com/documentation/templates_python/ 
> #subclassing-context-requestcontext
> http://www.b-list.org/weblog/2006/06/14/django-tips-template- 
> context-processors
>
> Check out the SiteRoot context processor in verdjnlib for a working
> example of a custom context processor.
> http://www.verdjn.com/wiki/Siteroot
>
> Cheers,
> Bryan
>
>
> On 8/21/06, Sean Schertell <[EMAIL PROTECTED]> wrote:
>> Hi Brian,
>>
>> I also owe you a big thanks :-)
>>
>> I hope Adrian and friends will consider rolling this or something
>> like it into the django core. We really need a nice clean way to
>> serve up static files within the context of a django website.
>>
>> If you consider that people me tend to build out the static site
>> first, then add the dynamic bits later, it only makes sense to build
>> in functionality for static pages.
>>
>> One quick question:
>>
>> What if I have a bunch of static pages but they all include a bit of
>> dynamic content in the sidebar (pulled from the database)? How can I
>> include that without writing a view method for every page?
>>
>> Cheers,
>> Sean
>

--
Ian Holsman
[EMAIL PROTECTED]
http://garden-gossip.com/ -- what's in your garden?



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Login not working: Site matching query does not exist.

2006-08-21 Thread Ian Holsman

your missing the site record.
go into your database and create a record with the site_id from your  
project file

eg.

insert into django_site(id,name,domain) values (N,  
'example','example.com')

where 'N' is your SITE_ID.

On 21/08/2006, at 6:40 PM, cyberco wrote:

>
> I'm still having this problem (neglected it for a while, but now is  
> the
> time I MUST solve it). Has anybody here a suggestion in which  
> direction
> to search?
>
>
> >

--
Ian Holsman
[EMAIL PROTECTED]
http://garden-gossip.com/ -- what's in your garden?



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: real-world Django examples

2006-08-19 Thread Ian Holsman


On 20/08/2006, at 8:13 AM, Jay Parlar wrote:

>
> Ian Holsman makes the source of zyons.com available.

this powers a couple of different websites:
- http://gypsyjobs.com
and
- http://garden-gossip.com
being 2 examples.

regards
Ian

>
> As well, Jeff Croft makes the source for lost-theories.com available
> (http://www2.jeffcroft.com/2006/jun/06/lost-theories-with-source- 
> code/)
>
> Lost-theories.com is a bit smaller in scope, so I'd recommend looking
> at that too.
>
> Jay P.
>
> >

--
Ian Holsman
[EMAIL PROTECTED]
http://VC-chat.com It's what the VC's talk about



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: notification when an object is deleted

2006-08-19 Thread Ian Clelland

On 8/18/06, medhat <[EMAIL PROTECTED]> wrote:
> First, I am using sqlite... and I checked the manage.py sqlall and it
> had no "on delete cascade" at all. So, is this done programmatically in
> python to simulate the same effect?

Yes, as James mentioned, it is done programmatically; Django simulates
the effects of "on delete cascade" when you delete an object. I
mentioned the SQL because you could alter your database tables to do
this explicitly, if nothing else is working.

> And I had the ticket model with two
> foreign keys to the user record (who reported it, and who fixed it) the
> first one is required, while the second one is not.

I'd say it's very likely that that is related to this issue... I'd
have to read through the code to be sure, but this might be causing
Django to not delete the user records when the tickets are deleted.

> When I delete the
> user in the admin side it tells me that it will also delete all the
> tickes that are created by that user, but not the ones fixed by the
> user. So here I have a few questions:
>
> 1. Why did it do that (not that I am complaining, I just want to
> understand) does it have to do with one field being required and the
> other not?
> 2. Is this behavior documented anywhere? It feels a bit of magic to me
> when it is hard to predict how the software will behave!

I'm sure the core developers would be much more qualified to answer
these questions than I am :) -- especially if it is related to having
two ForeignKey fields to the same model.

> 3. I am still looking for an answer to my original question at the
> beginning of this discussion. What if I don't want to delete the
> tickets but assign them to another user?

Was that the original question?

All I saw was:

On 8/17/06, medhat <[EMAIL PROTECTED]> wrote:
> I would like to delete all the tickets created by a user if that user is
> deleted. Is there a way to do this *without* changing the user model?

If you want to do something different, like assign the tickets to
another user, you will have to write a custom view (and possibly a
custom manipulator) to do this. In that case, you would not want to
delete users using the built-in admin interface at all, but use your
custom view instead.

Regards,
Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: check for yourself (((;

2006-08-17 Thread Ian Holsman


On 18/08/2006, at 4:39 PM, Ian Clelland wrote:

>
> On 8/17/06, Ian Holsman <[EMAIL PROTECTED]> wrote:
>> this is how various worms spread in the past. they did a google
>> search for a specific 'feature'
>> and then with a known vulnerability in hand, they would attack that
>> site, put their worm on it, and repeat.
>
> Ian,
>
> Do you know of worms that would actually try to leverage a web service
> such as google, and interpret the results of that search?

http://www.viruslist.com/en/viruses/encyclopedia?virusid=68388

> I always
> assumed that all they would do is connect over port 80, and try to
> retrieve something like /admin/, or another platform-specific resource
> over http, and there's not much that excluding the URL through
> /robots.txt is going to do to stop that.

some did do that, but that it isn't very efficient, and gets noticed  
quickly.

>
> I'm actually curious though -- is there enough advantage to be had by
> parsing the HTML response of a google search, that malware writers
> would bother to write that, rather than just trying IPs at random?
>
>
> Getting more off-topic by the minute,
> Ian Clelland
> <[EMAIL PROTECTED]>
>
> >

--
Ian Holsman
[EMAIL PROTECTED]
http://car-chatter.com/ where car fanatics meet



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: check for yourself (((;

2006-08-17 Thread Ian Clelland

On 8/17/06, Ian Holsman <[EMAIL PROTECTED]> wrote:
> this is how various worms spread in the past. they did a google
> search for a specific 'feature'
> and then with a known vulnerability in hand, they would attack that
> site, put their worm on it, and repeat.

Ian,

Do you know of worms that would actually try to leverage a web service
such as google, and interpret the results of that search? I always
assumed that all they would do is connect over port 80, and try to
retrieve something like /admin/, or another platform-specific resource
over http, and there's not much that excluding the URL through
/robots.txt is going to do to stop that.

I'm actually curious though -- is there enough advantage to be had by
parsing the HTML response of a google search, that malware writers
would bother to write that, rather than just trying IPs at random?


Getting more off-topic by the minute,
Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: How to create my own Field Types ?

2006-08-17 Thread Ian Clelland
On 8/17/06, 一首诗 <[EMAIL PROTECTED]> wrote:
>
> Hi all!
>
> Django provides a Ip Address Field.  But actually it's a CharField with
> some IP formate check.

You can definitely subclass db.models.Field, or you can subclass any
of its subtypes, such as IntegerField or IPAddressField. You might
want to read through the source to the Field class, though, to see how
the built-in fields work -- the interaction between the field and the
manipulators is not easy to see at first glance.

I would expect that you could subclass IPAddressField, and just change
the way that the value is stored in the database. (Override the
get_internal_type method to return "IntegerField" at the very least)

Regards,
Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: check for yourself (((;

2006-08-17 Thread Ian Holsman


On 18/08/2006, at 12:56 PM, Deryck Hodge wrote:

>
>
> I know I'm missing something obvious, but why is this a problem?  It's
> not like the default, well-documented admin location isn't /admin/ on
> a Django site.  I not trying to be a smart aleck or critical.  I'm
> really curious what I'm missing.  Why does it matter that a search
> engine knows where the admin page is?

while *you* might know just by looking at a site that is written in  
django,
bots might not.

lets say there was a security problem in django where it didn't  
handle a specific
HTTP request (say SQL injection for example)

using these searches I can get a list of sites I could potentially own.

this is how various worms spread in the past. they did a google  
search for a specific 'feature'
and then with a known vulnerability in hand, they would attack that  
site, put their worm on it, and repeat.

that is one example on why it could be bad.
there are others I could think of but I'm not going to mention them.

>
> Cheers,
> deryck
>
> -- 
> Deryck Hodge  http:// 
> www.devurandom.org/
> Web Developer, Naples News http://www.naplesnews.com/
> Samba Team   http:// 
> www.samba.org/
>

--
Ian Holsman
[EMAIL PROTECTED]
http://VC-chat.com It's what the VC's talk about



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: check for yourself (((;

2006-08-17 Thread Ian Holsman

actually we can help there as well by putting in a
 in the default  
admin base_site.html file.

/me goes to switch URL paths to make it a bit less obvious on his sites

On 18/08/2006, at 5:12 AM, James Bennett wrote:

>
> On 8/17/06, wiz <[EMAIL PROTECTED]> wrote:
>> http://www.google.com/search?hl=en&lr=&q=Django+administration 
>> +Admin+Log+in+Username+Password&btnG=Search
>
> And... that just tells us that people need to have their robots.txt
> disallow '/admin/' (or wherever they choose to have their admin app
> live). I would *hope* that web developers know this, and know how to
> do this already...
>
> -- 
> "May the forces of evil become confused on the way to your house."
>   -- George Carlin
>
> >

--
Ian Holsman
[EMAIL PROTECTED]
http://zyons.com/ build a Community with Django



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: notification when an object is deleted

2006-08-17 Thread Ian Clelland

On 8/17/06, medhat <[EMAIL PROTECTED]> wrote:
> A ticket system where users can create tickets. A ticket object has a
> foreign key field to a user object. I would like to delete all the
> tickets created by a user if that user is deleted. Is there a way to do
> this *without* changing the user model?

I would have thought that this would have been automatic -- normally
Django does a good job of telling me, when I delete an object, about
any other objects related to it which will also be deleted.

But, if you just want to be certain that all of the tickets are
deleted when the user is deleted, you could alter the ticket table in
your database. Just make sure that the user_id column explicitly says
"on delete cascade", and the database will take care of deleting
tickets automatically.

Regards,
Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Custom db fields / creation.py

2006-08-17 Thread Ian Clelland

On 8/17/06, Frank Stüss <[EMAIL PROTECTED]> wrote:
>
> Hi all,
> is there a best practice to overwrite/extend
> django.db.backends..creation without doing it in django source?
>
> I want to have a spezialiced ImageField.

Hi Frank,

What I've done in the past, to avoid having to tinker with the backend
source, is to override the get_internal_type method of my custom
fields. By default, it returns the name of the class it is called
from, but you can override that to return the string "ImageField" and
the database table will be created correctly.

Regards,
Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: showing future events only?

2006-08-16 Thread Ian Holsman

would this actually work?

I thought this would have been evaluated when you start up the  
process, and the show_dict is first called.
not on every request (which is what they want I'm guessing)

regards
Ian.

On 17/08/2006, at 5:30 AM, [EMAIL PROTECTED] wrote:

>
> Do I need to import datetime into urls.py or something?
>
> I'm passing
> show_dict = {
> 'queryset': Show.objects.filter(show_date__gte=datetime.now()),
> 'template_object_name': 'show',
> 'allow_empty': 'true',
> }
>
> but it throws an error:
> NameError at /shows/
> name 'datetime' is not defined
>
>
> >

--
Ian Holsman
[EMAIL PROTECTED]
http://peopleintopoker.com/ -- where the poker people go



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: showing future events only?

2006-08-16 Thread Ian Clelland

On 8/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I've got an app for user events, using the generic list view to display
> them. So far , so good. But I don't want to display them if the date is
> past. So, how would I filter those out. Here's the template code, so
> you can sorta see what I'm getting at:

If you're using a generic view, then this sort of filtering should be
done in your urls.py file -- you should already be passing in a
parameter named queryset to the view, so rather than saying, for
instance,

queryset=MyModel.objects.all()

you would add a filter, to make it more like this:

queryset=MyModel.objects.filter(date__gte=datetime.now())

to pass only those objects whose "date" field represents a date after
the present. Of course, the details will vary, depending on the name
of your model and its fields, and the exact structure of your urls.py
file.

-- 
Regards,
Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Re: how to redirect to a new page,but keep the browser's url unchanged

2006-08-16 Thread Ian Clelland

On 8/16/06, James Bennett <[EMAIL PROTECTED]> wrote:
> Being able to see the correct current URL is a vital security feature
> in web browsers, and (short of using JavaScript to open a new window
> which lacks a location bar -- something not guaranteed to work because
> browsers allow users to disable this ability) there is no way to
> accomplish this.

James, I agree that there are a lot of cases where this isn't a good
idea, but who's to say that the mp3 file, for example, is *not* the
correct resource for this URL? If the Django view only exists to
determine the resource which should be presented to the browser, then
an internal redirect would be exactly what you want.


Chris, If you could determine that you want to present a certain mp3
file, using only the URL, then you could use Apache's rewrite rules to
do exactly that, without forcing the browser to request a new page,
and without involving Django at all.

Unfortunately, once Apache has passed off a request to Django, you
will have to use Django views to return your result. If it's
absolutely necessary that a view return an mp3 file, then you could
write a view that opens the file on the filesystem and streams the
data out to the user. However, as mentioned in the documentation,
(this is how Django serves up media with the development server,) this
method is

 a) slow,
 b) prone to bugs, and
 c) not really what Django is best at

For serving up static files, you're probably better off leaving them
in a media directory, and letting Apache handle them, and just live
with the URL bar showing the real location.

Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Accessing db_table in _pre_save()

2006-08-15 Thread Ian Holsman

are you referring to ?
*modelname*._meta.db_table


On 16/08/2006, at 12:57 PM, Julio César Carrascal Urquijo wrote:

>
> I'm using a cursor inside the _pre_save() method for one of my models
> and figured it would be wise to use the table name gerated by Django
> instead of just hard-coding the name.
>
> Is it possible to access the table name of a model from one of it's
> methods?
>
> Thanks.
>
>
> (I'm using Django 0.95, btw)
>

--
Ian Holsman
[EMAIL PROTECTED]
join http://gypsyjobs.com the marketplace for django developers



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Custom file handling

2006-08-15 Thread Ian Clelland

On 8/15/06, Nathan Ekstrom <[EMAIL PROTECTED]> wrote:
>
> Hey all,
> I've  tried searching the list for this but I probably don't know the
> right key words to use.  What I would like to do is customize the
> behavior of the ImageField and FileField of models.  Instead of saving
> to media// I'd like to be able to save it to a
> custom directory dependant on another field in the row

Hi Nathan,

I think you'll probably need to use a custom field type -- it's pretty
much built in to   FileField and ImageField that the user-supplied
filename is the name to save the file under on disk.

What I've done, solve a problem like this, is to subclass ImageField,
and override the save_file method to change the filename in the
incoming data on file upload. Check out
http://www.verdjn.com/wiki/PhotoField -- we use the field name, and
the object's primary key to make up the filename before it gets saved.

> also in the
> case of an image I would like to generate some thumbnails and save them
> to different directories.  Is there a way to do this with the admin
> interface or will I need to do it another way.

Incidentally, our PhotoField class also supports thumbnail generation,
although we generate them dynamically, rather than saving them at
upload time.

Regards,
Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Locking problem with mod_python

2006-08-15 Thread Ian Holsman
aren't semaphores inter-process (not cross process)?try using a file handle instead..regardsIan.On 16/08/2006, at 11:49 AM, Daniel Poelzleithner wrote:Hi,I have a function that generates a tile for a google map overlay andwrites it to disc so later requests can simply use the file. Due thenature of the map, generating the tiles previous is not a option so ithas to be done on demand, which works nice on the developer server butnot on apache. There are many requests for tiles and the calculation isexpensive, so I want to limit apache to only generate one tile at the time.I used something like this:from threading import Semaphore# create Basemap instance. Use 'crude' resolution coastlines.GENSEM = Semaphore(settings.TOPO_MAX_TILE_THREADS)def get_topoimg(request):    ...    def gen():        print "Lock GENSEM"        GENSEM.acquire()        topoimg(x, y, zoom, typ, name, rstate)        GENSEM.release()        print "Unlock GENSEM"        return True    rv = return_cached_file(name, gen, rebuild=False)    ...TOPO_MAX_TILE_THREADS is 1In developing mode and apache2 -X the Semaphore seems to work. Iftopoimg raises a exception, the next request hangs. But in normal apachemode the semaphore doesn't seem to have any affect, causing very highload on the machine.What am I doing wrong ?kindly regards  Daniel

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: How do I store project in subversion?

2006-08-15 Thread Ian Holsman
On 16/08/2006, at 10:55 AM, Corey Oordt wrote:Don't store your .pyc in the repository.the easiest way to avoid doing this it toa) fix up your svn:ignore in your repo to ignore themb) edit ~/.subversion/config and uncomment the line 'global-ignores' and make it global-ignores = *.pyc *.pyo .*.swp *.o *.lo *.la *~ #*# .*.rej *.rej .*~ *~ .#* .DS_StoreCreate a settings.default.py and store it in the repository.or have your settings.py include separate files with the specific options.SECRET_KEY = open('/home/iholsman/.secret').read().strip()which will make it easier to propogate changes through.regardsIan.Each user can then maintain slightly different settingsOn Aug 15, 2006, at 6:50 PM, alex kessinger wrote: I want to thank you for all your anwsers it has been very helpfull.  Ialso have another question. I am new to the python language, but is itokay to store thre .pyc files in subversion. also how do you guyshandle different settings.py files amongest developers.--Ian Holsman[EMAIL PROTECTED]http://med-chatter.com/ it's about the medicine 
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



geographic targeting with django

2006-08-15 Thread Ian Holsman
Hi.does anyone know of a python module/interface to allow me to determine what state a given IP# is in?(Open source preferably) --Ian Holsman[EMAIL PROTECTED]http://VC-chat.com It's what the VC's talk about 
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: question about huge websites

2006-08-15 Thread Ian Holsman
On 16/08/2006, at 7:39 AM, a wrote:What kind of low-level socket and threading code is necessary for a dbintensive site such as reddit. How do we use it from django? doesanyonehave experience using itplease reply...I would imagine that they aren't just using a database.most of the "low level socket stuff" I've seen is about setting timeouts and doing Async IO.regardsIan --Ian Holsman[EMAIL PROTECTED]join http://gypsyjobs.com the marketplace for django developers  
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: upload error | deleting object after it has been uploaded...

2006-08-15 Thread Ian Clelland

On 8/15/06, jelle <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> Enjoying django while working on my new site. Things is that I'm
> experiencing a freak error. When finishing an upload, the object
> generated by the upload action is deleted.
> Checking out the history in the admin interface gives the following:
>
> Aug. 15, 2006, 9:09 p.m.jelle   Added paper image "PaperImage
> object". Changed order for paper image "PaperImage object" and image
> file for paper image "PaperImage object". Deleted paper image
> "PaperImage object".
> Aug. 15, 2006, 9:15 p.m.jelle   Added paper image "PaperImage object".
> Changed title of the image for paper image "PaperImage object", order
> for paper image "PaperImage object" and image file for paper image
> "PaperImage object". Deleted paper image "PaperImage object".

Hi Jelle,

I haven't noticed this exact behaviour before, with objects being
created and then immediately deleted, but it may be related to a
ticket I filed a couple of days ago --
http://code.djangoproject.com/ticket/2534 -- basically, if the only
core field in your model is an ImageField or a FileField, then the
model won't work correctly in the admin interface.

Looking at the Django souce code, I believe that what is happening is
that Django is ignoring the "core=True" on your ImageField, and is
saving the object (because no core fields were missed) and then
immediately deleting it (because no core fields were given)


As a workaround, try giving another field, such as the title, the
attribute "core=True", and see if that help things.

> Also I noticed that a directory media/paper_images was not created.
> Also after having added the directory the upload fails...
> Any ideas on how to avoid this issue?

Is this a permissions issue? If you're running Django behind Apache,
for instance, then the media directory needs to be writable by the
user account that Apache is running under (www-data on my Debian
systems, for example). Double-check the directory ownerships and
permissions, and see if you can get it to work with a FileField in a
simple model.

Regards,
Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Question and a problem about FileField

2006-08-15 Thread Ian Clelland

On 8/14/06, Vizcayno <[EMAIL PROTECTED]> wrote:

> When I save a first record including main and additional attachments
> and then I verify the results of the saving, all goes well; if I change
> the content of some data in the MaeDocs table (nom-doc for example) and
> save the changes, when verifying the record again I can see that the
> secondary attachment files disappeared. Checking the History of the
> record, it indicates that the secondary attachments were effectively
> replaced by ' '. How can I avoid this situation?

At the moment, FileFields don't work the way you expect when you give
them the attribute "core=True". If they are the only core field in
your model, you'll see all sorts of strange behaviour.

The only workaround I know of, at the moment, is to add another field
to your OthAttachs model, say, a caption or description field, and
make it "core=True", instead of the FileField. Then you need to tell
anyone who uses the admin pages that they have to enter a description
for each file attachment, and if they remove the description, the file
will be deleted.

I opened a ticket a few days ago, with a patch to address this problem
( http://code.djangoproject.com/ticket/2534 ). If this patch is
applied to the django source, then your models will work as you expect
them to.


-- 
Regards,
Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: subdomains in django

2006-08-15 Thread Ian Holsman
On 15/08/2006, at 6:56 PM, a wrote:thanks ianhow to do in lighttpd?install apache in front of it ;-)seriously I have no idea about lighttpd. I think it has a virtual host section and a rewrite section..they are pretty basic features for a webserver nowadays.regardsIan.thanks a lotIan Holsman wrote: I'm not sure what you are asking.what do you want django to do with the subdomain?if it is a different site, you can do this via virtual hosts in apache.if you bob.example.com to be 'bobs' blog and 'sue.example.com' to besue's blogyou can acomplish this via mod-rewrite without having to resort totrickery in django.otherwise you could write some middleware to do the same thing aswell I think.On 15/08/2006, at 10:47 AM, a wrote: can you point out how to do this in django and in pythonthanks a bunch --Ian Holsman[EMAIL PROTECTED]http://car-chatter.com/ where car fanatics meet--Apple-Mail-14--945094689Content-Type: text/htmlContent-Transfer-Encoding: quoted-printableX-Google-AttachSize: 2282-khtml-line-break: after-white-space; ">I'm not sure what you are =asking.what do you =want django to do with the subdomain?if it is a different =site, you can do this via virtual hosts in apache.if you =bob.example.com to be 'bobs' blog and 'sue.example.com' to be sue's =blogyou can acomplish this via mod-rewrite without having to =resort to trickery in django.class=3D"khtml-block-placeholder">otherwise you could write =some middleware to do the same thing as well I think.class=3D"khtml-block-placeholder">On 15/08/2006, at =10:47 AM, a wrote:class=3D"Apple-interchange-newline">style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =margin-left: 0px; min-height: 14px; ">0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">can you =point out how to do this in django and in pythonstyle=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =margin-left: 0px; ">thanks a bunchmargin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: =14px; ">margin-bottom: 0px; margin-left: 0px; min-height: 14px; "> = style=3D"border-collapse: separate; border-spacing: 0px 0px; color: =rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: =normal; font-variant: normal; font-weight: normal; letter-spacing: =normal; line-height: normal; text-align: auto; =-khtml-text-decorations-in-effect: none; text-indent: 0px; =-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =white-space: normal; widows: 2; word-spacing: 0px; =">--Ian Holsmanhref="" href="mailto:[EMAIL PROTECTED]">mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]href="" href="http://car-chatter.com">http://car-chatter.com">http://car-chatter.com/ where car =fanatics meet ==--Apple-Mail-14--945094689-- 

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Directory structure & common functions

2006-08-15 Thread Ian Clelland

On 8/14/06, Michal <[EMAIL PROTECTED]> wrote:
> I would like make subdirectory "utils", and import from it all files
> which I need in particular application. But if I type for example:
> from utils.strings import convert_string
> I receive error: "Could not import app1.views. Error was: No module
> named utils.strings

If you want to be able to import files like this, you will need a file
in the utils directory called __init__.py. You can leave the file
empty, but it has to be there for python to recognise the directory as
a package.


Regards,
Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Django neophyte question.

2006-08-14 Thread Ian Holsman
Hi Gloria.welcome to django.you need to specify the ip# when you run the development server, otherwise it will run on 127.0.0.1 (localhost)which can not be accessed from outside the machine.try> django-admin.py runserver 192.168.1.2:or > django-admin.py runserver dev.blah_server.com:and it should work.regardsIan.On 15/08/2006, at 1:11 PM, Gloria wrote:Hi. I am a Python geek who has been in the CherryPy/PythonPaste worldfor the past year. I have decided to give Django a serious look, and Ihave a simple question.After running this command:[EMAIL PROTECTED] wi_2> python manage.py runserver Validating models...0 errors found.Django version 0.95, using settings 'wi_2.settings'Development server is running at http://127.0.0.1:/Quit the server with CONTROL-C.I expect to get to this URL from a remote machine, like this:http://dev.blah_server.com:This works in cherryPy and PythonPaste from behind the firewall, so Iknow it's not a port issue.I'm sure I'm missing something simple. Please let me know what urlparameter to set to access my page from a remote machine.Thank you,Gloria --Ian Holsman[EMAIL PROTECTED]join http://gypsyjobs.com the marketplace for django developers  
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: subdomains in django

2006-08-14 Thread Ian Holsman
I'm not sure what you are asking.what do you want django to do with the subdomain?if it is a different site, you can do this via virtual hosts in apache.if you bob.example.com to be 'bobs' blog and 'sue.example.com' to be sue's blogyou can acomplish this via mod-rewrite without having to resort to trickery in django.otherwise you could write some middleware to do the same thing as well I think.On 15/08/2006, at 10:47 AM, a wrote:can you point out how to do this in django and in pythonthanks a bunch  --Ian Holsman[EMAIL PROTECTED]http://car-chatter.com/ where car fanatics meet 
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: what features do you like to see in a rss reader

2006-08-13 Thread Ian Holsman
On 13/08/2006, at 7:38 PM, René Pijlman wrote:a wrote: i m developing a feedreader/web desktop using djangoi m looking for feature suggesstions Self-learning relevance ranking of individual posts. Bayesian, or otherwise. Information overload is problem #1 for weblogs/rss.i've started doing something similar to what you suggested a while backon http://vc-chat.com. nothing as sophisticated as bayes (yet), just popularityand 1-5 ratings.http://vc-chat.com/aggy/popular/andhttp://vc-chat.com/aggy/rating/d/7/for example.bayes is on the list of things to do, but until the reader base multiplies by 10x I don'tthink it will be worth it, and the rating is hard as it requires people to re-vist the site *after* they have left, which most won't.the popularity code is open source and available here: http://svn.zyons.python-hosting.com/trunk/zilbo/common/counter/regardsIan-- Renéhttp://www.applinet.nl  --Ian Holsman[EMAIL PROTECTED]http://med-chatter.com/ it's about the medicine 
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: stripogram as middleware or templatetag

2006-08-11 Thread Ian Holsman
Hi Dirktryhttp://svn.zyons.python-hosting.com/trunk/zilbo/common/utils/middleware/SafePost.py(it uses stripogram)It doesn't remove all the exploits to be sure, but it raises the bar a bit.regardsIan.On 12/08/2006, at 8:06 AM, Bryan Chow wrote:What exactly are you trying to achieve with Strip-o-Gram?Have you considered using Django's built-in STRIPTAGS or REMOVETAGSfilters instead?http://www.djangoproject.com/documentation/templates/#removetagsBryanOn 8/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi All,I thought about the usage of Chris Withers stripogram [1] as afilter in middleware or filter in the templatetag, but then I readthat stripogram isn't aware of some kind of exploits.Has anybody integrated stripogram into django ?Which security riscs should I remember if I do such thing ?Regards,Dirk[1] http://www.zope.org/Members/chrisw/StripOGram 

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Google-like API keys

2006-08-10 Thread Ian Holsman
personally I would DES encrypt their email address.that way you have a contact if something goes wrong.On 11/08/2006, at 3:01 AM, Jyrki Pulliainen wrote:On 8/10/06, Felix Ingram <[EMAIL PROTECTED]> wrote: On 8/10/06, hernan43 <[EMAIL PROTECTED]> wrote: Nowadays(is that a word?) a lot of fancy web services use API keys toallow an individual access to a service without requiring a usernameand password. Google, flickr(I believe), Akismet, so on and so on.If I wanted to make a Django app that utilized a custom authenticatorand my own "API key" what would be the best way to generate unique APIkeys for my app. Would running a md5/sha sum on username + randomstring+ email be safe? Or is that stupid thinking? Why not just 'randomstring'? I assume you'd be storing it anyway.Tagging on username and email doesn't give you anything extra. Plain random string would make it possible (though not likely) to havetwo accounts with same API-key. That's why some personal data shouldbe inserted in to the API-key (like username+random through SHA)-- Jyrki // [EMAIL PROTECTED]

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Using custom forms with generic views

2006-08-08 Thread Ian Holsman
another alternative you may want to consider is to piggybak ontop of  the generic viewhave a look at http://svn.zyons.python-hosting.com/trunk/zilbo/common/utils/views/create_update.py for a examplewhich adds a 'change_user' and 'last_change' fieldseg.    if request.POST:        new_data = request.POST.copy()        now = datetime.datetime.today()        new_data['last_change_user_id'] = str(request.user.id)        new_data['last_change_user'] = new_data['last_change_user_id']        new_data['last_change_date'] = now.strftime('%Y-%m-%d')        new_data['last_change_time'] = now.strftime('%H:%M:%S')        new_data['create_user_id'] = new_data['last_change_user_id']        new_data['create_user'] = new_data['last_change_user_id']        new_data['creation_date_date'] = now.strftime('%Y-%m-%d')        new_data['creation_date_time'] = now.strftime('%H:%M:%S')        request._post = new_data    return create_object(request,                  model,                  template_name,                 template_loader, extra_context,                 post_save_redirect, login_required, follow)so in your case I would handle the 'tag' field here, and split it into multiple fields which the normal changemanipulator can handle.and it uses all the goodness of the generic update, without me having to duplicate the code.regardsIanOn 08/08/2006, at 2:45 AM, jeffmikels wrote:Thanks for your help. I ended up creating a view to do the work. If thedata is simple enough and just plain text, is there a compelling reasonto use AddManipulator or other manipulators instead of justobject.save()? --Ian Holsman[EMAIL PROTECTED]http://peopleintopoker.com/ -- where the poker people go 
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: usage of GenericForeignKey ?

2006-08-07 Thread Ian Holsman
hi Dirk.you still need to put in the content-type & object-idregardsIan.On 08/08/2006, at 6:40 AM, [EMAIL PROTECTED] wrote:Hi,I have the following model defined:from django.db import modelsclass MyTest(models.Model):        obj = models.GenericForeignKey()if I let print the SQL-Create-Statements for mysql-DB I get this:BEGIN;CREATE TABLE `test_mytest` (    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY);COMMIT;Aren't there 2 fields missing ? content_type_id and object_id ?Or do I have to extend the model by:    content_type = models.ForeignKey(ContentType, db_index=True)    object_id = models.IntegerField(_('object ID'), db_index=True)???Django version from SVN-trunk 3534.Regards,Dirk--   --Ian Holsman[EMAIL PROTECTED]http://peopleintopoker.com/ -- where the poker people go 
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: How can I use variables in included URLConf's before they are sent to views?

2006-08-06 Thread Ian Holsman
If I'm understanding your question correctly, you could write a functionsimilar to gen_pop_pattern (http://svn.zyons.python-hosting.com/trunk/zilbo/common/counter/urls.py )and then include it alaurlpatterns += gen_pop_pattern( models='Conversation', extra_context=context, template_name='forum/conversation_popular.html' )this allows us on vc-chat to have the 'popular' page display in various parts of our url spaceeghttp://vc-chat.com/popular/  -- everythinghttp://vc-chat.com/forum/popular/ -- just forumshttp://vc-chat.com/aggy/popular/ -- just feedsthen if i wanted to add another function say .. popular in the last week, I would add a line to gen_pop_pattern and I would get the functionality in 3 places.eg http://vc-chat.com/aggy/popular/7d/On 07/08/2006, at 7:57 AM, Ahmad Alhashemi wrote:Hello everyone,My problem is like this. I have a main URLconf that will includeanother, application specific, URLconf. In the application specific,I'm preparing some querysets to pass to some generic views.The problem is that the querysets I need to make in the applicationURLconf depend on variables defined in the main URLconf.How can I access the variables that were collected in the main URLconfand use them to build my queryset?  --Ian Holsman[EMAIL PROTECTED]http://VC-chat.com It's what the VC's talk about 
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: Off Topic: Mac software for database design?

2006-08-04 Thread Ian Holsman
On 05/08/2006, at 3:07 AM, John Melesky wrote: If you could point to the specific screencasts, that would makeidentifying the tool easier.At a guess, though, CocoaMySQL is a likely candidate. Even if it's notwhat they're using, it's useful for the things you list:http://cocoamysql.sourceforge.net/CocoaMySQL was abandoned a while back ;-(.another developer started updating it, and called it CocoaMySQL SBG http://www.theonline.org/cocoamysql/I recommend using that version instead of the original.. regardsIaj-joh  --Ian Holsman[EMAIL PROTECTED]http://zyons.com/ build a Community with Django 
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Public Domain ( was Re: Full Text Search w/ MySQL)

2006-08-04 Thread Ian Holsman
			On 03/08/2006, at 10:42 PM, Andrew Durdin wrote: the code in the paper is released intothe public domain, so there's nothing stopping any interested personfrom taking it and developing it into something more suited for generalsearching.AndrewThis isn't directed at you, or your paper Andrew.I know this sounds counter-intuitive, but can you (and others) not put things in the public domain?Go have a look at http://www.rosenlaw.com/html/GL15a.pdf  It's 2 pages, and VERY light reading, writtenby a lawyer and a expert on Open Source Licenses.To quote the paper:	This “Give-It-Away” license provides no protection for anyone if the donated software causes 	harm.ie.. even if you didn't mean it, if I used a piece of public domain code in a app I write and it fails,i can still go after the person who wrote it and sue them.thanks.. that makes my chest feel much lighter. --Ian Holsman[EMAIL PROTECTED]http://economy-chat.com It's what the economists talk about 
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: Rejoice! No more editing hashes when creating users

2006-08-03 Thread Ian Holsman
On 04/08/2006, at 3:37 PM, Malcolm Tredinnick wrote:On Fri, 2006-08-04 at 15:13 +1000, Ian Holsman wrote:[...] I like the idea of a change password view, could I twist your arm a bit and make it a  'generate random passwordand email it to the user view' instead of 'set password' ?and possibly have the email point the user to a view to allow them tomanually set it themselves?this way the admin doesn't need to know what the password is, and youget to verify the email at the same time. I'm -1 on this.It's a lot of extra complexity just for creating a user. It's not auniversal assumption that we care that the email is correct, forexample.Malcolmfair enough.i just hate having 'welcome' as a default password (which is what admins usually set it to for some reason) .. it's such a security hole it's not funny.

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Rejoice! No more editing hashes when creating users

2006-08-03 Thread Ian Holsman
On 04/08/2006, at 2:42 PM, Adrian Holovaty wrote:On 8/3/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: The traditional approach is that they are password entry boxes that areempty and you only pay attention in the form processing if they containsomething (in which case the two entries must match, etc). I would havethough that worked fairly well in our case as well? I'm not a huge fan of that approach -- it's kind of "magic." I'mleaning toward the solution of hiding the password from the "Changeuser" page and creating a separate, special-case "Change password"view. This would be different from the user-facing "Change password"view, as it would be used by admins.I like the idea of a change password view, could I twist your arm a bit and make it a  'generate random password and email it to the user view' instead of 'set password' ?and possibly have the email point the user to a view to allow them to manually set it themselves?this way the admin doesn't need to know what the password is, and you get to verify the email at the same time.I'm not too passionate about it either way, but I'm just glad we'vefinally fixed the "Add user" thing.Adrian-- Adrian Holovatyholovaty.com | djangoproject.com --Ian Holsman[EMAIL PROTECTED]join http://gyspsyjobs.com the marketplace for django developers  
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: Creating 2 linked models from one page

2006-08-03 Thread Ian Clelland

On 8/3/06, cyberco <[EMAIL PROTECTED]> wrote:
>
> OK, but what to do with the following in case of 2 models:
>

In the past, I've made a custom manipulator in situations like this.
Something like this (WARNING: Untested code ahead!) might work for
you:

class CustomManipulator(forms.manipulator):
def __init__(self):
self.fields = (
forms.TextField(field_name="text_a"),
forms.TextField(field_name="text_b"),
)

def save(self, new_data):
# there should probably be some error checking in here somewhere :)
new_a = A(text=new_data["text_a"])
new_a.save()
new_b = B(text=new_data["text_b"], a=new_a)
new_b.save()


You can use this manipulator just like you use the automatic
AddManipulator above; the only difference is that it doesn't return an
instance of A -- although you could certainly make it do that.

Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: accessing was_published_today in a template

2006-08-03 Thread Ian Clelland

On 8/3/06, skullvulture <[EMAIL PROTECTED]> wrote:
>
> In the tutorial you create a custom method was_published_today.  How
> can you access it in the template?  I'm using generic views.  Do I have
> to write my own more complicated view to access it?  Thanks.

You don't need to write any more complicated views in order to access
an object's methods. Using generic views, you should be able to access
it as a member of the "object" variable on an object detail page. Try
something like this:

{% if object.was_published_today %}
  Today's poll
{% else %}
  Not today's poll
{% endif %}

On a list page, you are probably already iterating over the
"object_list" variable -- you should be able to access the
was_published_today method in a similar manner, for each element of
that set.


Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: translating app-name

2006-08-03 Thread Ian Clelland

On 8/3/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> We should definitely solve this problem in a nicer way. What do you
> think? An __appname__ variable in the app's __init__.py file?

Or possibly a __verbose_name__ variable, to use the same terminology
that we already use for models and fields?

Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Is AJAX Alone Reason to Use TG?`

2006-08-03 Thread Ian Holsman
I just came across this presentation: http://domscripting.com/presentations/xtech2006/which describes a new layer/methodolgy on how ajax should be implemented.I personally would think implementing something like this would be a step forwardand we could then argue about if mochikit or dojo or yui or none is a good implementation.regardsIanOn 03/08/2006, at 7:07 PM, Gábor Farkas wrote:James Bennett wrote: On 8/2/06, gabor <[EMAIL PROTECTED]> wrote: django does not force you to use the django-templating-system (you canuse myghty/zope-tal/whatever instead), but it clearly recommends thedjango-templating-system, and that's the system which is the mosttested/streamlined/documented/developed. I'm not convinced that the analogy holds; to me, officially endorsinga particular JS toolkit would be like re-wiring the template system tofavor a particular version of HTML. Just as the choice of HTML orXHTML and which version to use is best left to a case-by-case basis,the choice of which JS toolkit to use is best left to a case-by-casebasis. hmm.. probably this is the point where we disagree.. which is of course not a bad thing.maybe we should clarify what we mean by words like "endorse", "recommend", "support" etc.and also we're probably approaching this from the wrong end (or at least   i).the real question probably is:- what would we gain by having an 'official' _javascript_ library?if the answer is "nothing" then we don't need an official js lib.so, is there something that django could do to make ajax easier? (except the server-get-get/post-and-responds-in-json)gabor

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Project when using multiple sites

2006-08-02 Thread Ian Holsman
On 02/08/2006, at 10:29 PM, Jay Parlar wrote:On 8/2/06, Ian Holsman <[EMAIL PROTECTED]> wrote: and obviously not all the sites are identical (they have different hostnamesand possibly different things enabled for that site) .. they go in thesite_NN directory.I usually have a group of 'shared' URL roots.. url_app_X.pyand of course i have a set of N settings files which are hostname specific. setting_hostname.pyso far this structure has worked for the 6-7 sites I run, and 3-4 projects Iam using. Do you use the Sites framework for any of this though? That's thething I'm having a conceptual problem with.yes.I have several 'sites' in a single DB.but at the moment i'm questioning the usefulness of it, due to it having a common 'user' table, and the cost of adding a new database is quite small.but to your question ;-)More specifically, I'm not quite sure how to configure a project touse the Sites framework. Namely, what to do with settings.py files? Iknow to give each site unique SITE_ID values.But then it *seems* that all the settings.py files have to have thesame SECRET_KEY, or I get a "User tampered with session cookie" error.change the cookie name.for example car-chatter.com hasSESSION_COOKIE_NAME ='revhead'andmed-chatter.com hasSESSION_COOKIE_NAME ='ithurtswhenidothis'both sites have different SECRET_KEY and SITE_ID's.Also, how are we supposed to associate sites that we add through theadmin to a SITE_ID? The sites in the Admin don't actually show theSITE_ID they're associated with.look at the URL in the admin tooleghttp://car-chatter.com /admin/sites/site/6/that is the SITE_ID (6).i also have a line     r'/usr/local/src/magik/itscales/site_%d_templates' % SITE_ID,in my TEMPLATE_DIRS which makes a bit easier ;-)I just can't seem to find any guidelines for configuring settings.pyproperly to use the Sites framework.4 steps.1. copy the settings.py to new-settings.py2. add a site_id via the admin tool3.  configure new-settings.py, changing the cookie name, SITE_ID, and SECRET_KEY as above4. clone your httpd.conf with so that it uses new-settings.py on your host.regardsIanJay P.  --Ian Holsman[EMAIL PROTECTED]join http://gyspsyjobs.com the marketplace for django developers  
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: Project when using multiple sites

2006-08-01 Thread Ian Holsman
Hi Jay.I have a similar issue.I have stuff in http://zyons.com, which is open source, and another set of apps which build on top of it which run on multiple hosts. (http://gyspsyjobs.com & http://car-chatter.com for example)the way I set it up is:project/	common/		app1/			templates		app2/			templates	apps/		app3/			templatesthese contain the standard way I think most people will use my code. the templates are in each app deal with the views the app does.I then have 3 other template directories.	common_templates/	app_X_specific_templates/	site_NN/common ones are usually stuff which I don't need to change that often (or ever) like the the Terms of Service (http://med-chatter.com/terms/ ) or privacy policy (http://med-chatter.com/privacy/ )app specific templates are where I put boilerplates.. like a standard frontdoor for a given project-type. for example the "chat" series of sites are all based on the same front door, but otherapps I'm writing would have a completely different front door.also in the "app" templates I put over-rides of  the common functionality. for example.. I have a non-OSS rating app where users can 'vote' on a given post (1-5) which I intend to use on top of the OSS forum app.so I would put those templates in the app_X_specific_templates directory.and obviously not all the sites are identical (they have different hostnames and possibly different things enabled for that site) .. they go in the site_NN directory.I usually have a group of 'shared' URL roots.. 	url_app_X.pyand of course i have a set of N settings files which are hostname specific.	setting_hostname.pyso far this structure has worked for the 6-7 sites I run, and 3-4 projects I am using.looking at it now, it all looks pretty complex.. but in reality most of the templates live in their corresponding 'app' directory with only one or two exceptions in various places.regardsIan.On 31/07/2006, at 10:51 PM, Jay Parlar wrote:I've recently been looking at the docs, trying to grok the Sites framework.What is the recommended way of laying out the filesystem when doingmultiple sites? Let's say I have two sites, "foo" and "bar", with URLsfoo.com and bar.com.Would you put all the files for both sites into one Django project, orwould you give each its own project?When I say "both sites into one Django project", I mean something like this:myproject/    foo/        settings.py        urls.py        app1/        app2/        templates/    bar/        settings.py        urls.py        app3/        app4/        templates/Then the vhost configurations for each site can point to theindividual settings files, the sites can potentially shareapplications, and they can easily share models.I suppose the same could be done by having each site in its ownproject (after all, these are just Python packages and modules), butit seems like I wouldn't want shared models crossing project domainslike that. That's just a purely conceptual idea though.And that's the other thing, models. Say I have a model "Baz", that isused by app1 in "foo", and by app3 in "bar". Where would I define it?I would guess I can arbitrarily choose to define it in eitherfoo.models or bar.models. Or would it make any sense to define itsomewhere else entirely, so it's not directly coupled to only one app?Thanks,Jay P.

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: customize admin

2006-08-01 Thread Ian Holsman
Hi Gen-Nan.you can override the template that the admin app uses to generate the listing page if that helps.so for example in my performance monitoring app, I created a template admin/perf/log/change_list.htmland put that file in my template directory.now when i click on the 'perf/log' model in the admin my template gets run.but personally I think if you are doing some custom work you should just create a little app and do it in there. it isn't too hard.regardsIan.On 02/08/2006, at 3:00 PM, Gennan Chen wrote:Hi!django's admin is pretty neat and I will like to customize it. I know there is a documentation to change its appearance. But how about I want to add a bit more function or buttons on the form. For example, I need to run some server side scripts/program after user click saving changes. How do I do that? And if I want to add some buttons on the form to run shutdown and reboot machines (this has nothing to do with db except adding a log), where is the documentation for that??   Gen-Nan Chen, PhDChief ScientistResearch and Development GroupCorTechs Labs Inc (www.cortechs.net)1020 Prospect St., #304, La Jolla, CA, 92037Tel: 1-858-459-9700 ext 16Fax: 1-858-459-9705Email: [EMAIL PROTECTED]  

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Django source editing offtopic

2006-08-01 Thread Ian Clelland

On 8/1/06, toth anna <[EMAIL PROTECTED]> wrote:
> What are you using for editing sources?

If you're a native vim speaker, I have a version compiled for OSX,
using the native Aqua interface, off of my homepage here:
http://ian.casa.cavewallarts.com/vim.html

Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Django source editing offtopic

2006-08-01 Thread Ian Holsman
vim.mainly because it works on nearly any platform I need to go into.and my fingers are trained after years of using it.On 02/08/2006, at 9:29 AM, Joseph Heck wrote:On the Mac, I used TextWrangler (http://www.barebones.com/products/textwrangler/ also free, from Bare Bones Software) and liked it significantly better than jEdit - YMMV. Nice editor thought. -joeOn 8/1/06, Tyson Tate <[EMAIL PROTECTED]> wrote: On Aug 1, 2006, at 3:44 PM, toth anna wrote:> Sorry for boring the list with a slightly offtopic question.> I saw that many of you are using a Mac. (i used it perhaps> twice in my life)> Last week i needed to edit several python files on a MiniMac > (without net, b), and i used "built-in" editor of> macosx. Not was so comfortable.> What are you using for editing sources?>> Thanks for your tips,> AnnaTextMate is the be-all-end-all of Mac editors, but it costs some cash. Worth every dime! There's also great Django bundles to helpspeed development: If you need a free editor, grab jEdit and spend some time configuring it and adding plugins.-Tyson 

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Tracking views or clicks

2006-07-31 Thread Ian Holsman
have a look at http://svn.zyons.python-hosting.com/trunk/zilbo/common/counter/and the blog entries I wrote about this yesterday: http://zyons.com/blog/status/a-better-stat-page/ and http://zyons.com/blog/status/where-have-you-been/it is a more general approach than what you propose, as it tracks multiple types of objects, and keeps track of the users who view it.(it isn't fully optimized yet.. the inserts should be done in a cron job, but at the moment they are done at the time of the request)regardsIanOn 01/08/2006, at 4:53 AM, Jay Klehr wrote:I'm interested in what the community suggests on this topic, as it's something I'd like to implement as well.  However, one word of advice if you're using MySQL and its Query Cache...  try to keep the "views" column outside of your models table since updating that table on every hit would basically make the query cache for that table irrelevant.  As I understand it, the Query Cache for a query is wiped if the table that is used in the cached query is changed after the query is cached.  In this case the table would be changed on every load, so the query would never be cached.  So perhaps a generic table like 'views' could be used with the GenericForeignKey setup that Django uses (like for "tags" or "comments").  This could possibly allow queries on that model to be cached (unless the query is hitting the "views" table in a join for every object load/hit).Even if no cache benefit can be gained, I like the ability to add a "views" property to ANY object that you please just by setting up a Generic foreign key though, it's much easier to add that functionality to any object without having to modify your DB schema at all.Jay[EMAIL PROTECTED] wrote: Any suggestions on how I could track how many times an object hasloaded and/or been clicked?I mean, obviously in my model I'd need something likeclass Item(models.Model):     views = IntegerField()but how would I update views when Item was loaded on a page?   

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: non date-based detail pages: previous/next?

2006-07-30 Thread Ian Holsman
you might want to do this 'work' when the user actually requests the page in question, not when you generate the one he is looking at.for example have 2 views defined in urls.pygetnext/(object-id)/getprev/(object-id)/and have these 2 views do the calculation on what is 'next' and issue the 301 redirect's to the real url in question.if you wanted to be really smart you could cache the result so the 2nd person to view the page would get the real url instead of the redirect.(thats how I would do it)but then.. I usually aim for the most complex way possible ;-)regardsianOn 31/07/2006, at 9:24 AM, SmileyChris wrote:jcb wrote: I have a page that lists a bunch of Geolocation objects (using thegeneric view list, works great.) I have a detail page(django.views.generic.list_detail.object_detail) that works great thesame way...displaying one geolocation (with a tiny Google map, nice.) Perhaps the best way is to not use a generic view list page. Instead,why don't you make a simple view which can parse the list, adding innext / prev ids for each item, then return the template.Then in your list template, add the next/prev ids for each item to thequerystring for each detail link.Maybe there's another more genius way, but that's how I'd do it :)

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Scandinavian characters in .po files and timezones

2006-07-30 Thread Ian Clelland

On 7/30/06, Antonio Cavedoni <[EMAIL PROTECTED]> wrote:
> I don't know much about Vim, but it appears your ö and ä are entered
> with an encoding different than UTF-8. Python then tries to decode
> your characters thinking they might be valid UTF-8, but they are not,
> so it raises the UnicodeDecodeError.
>
> FYI: ä (LATIN SMALL LETTER A WITH DIAERESIS) in UTF-8 is \xc3\xa4,
> whereas \xe4 is its encoded form in ISO-8859-1/Latin-1 (and
> ISO-8859-10/Latin-6 as well, I haven't looked at other encodings).

It's quite possible that this is the case -- in a unix environment,
you can use the od command to see the bytewise encoding of the text
file. Use something like

  od -t x1 filename.txt

to see the individual bytes in hex.

Also, to test pythons unicode handling, try a simple file with nothing but

print u"ä"

and see how python handles the string.

> I googled a bit, and found this page [1] where it says that to set
> your Vim to the UTF-8 encoding you have to use the following command
> (note the column at the beginning):
>
> :set encoding=utf-8

The colon at the beginning of the line is to enter command mode in
vim, when you are using it interactively. It is not required in a
.vimrc file.


-- 
Regards,
Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: use data model and database api along

2006-07-29 Thread Ian Clelland

On 7/29/06, Gennan Chen <[EMAIL PROTECTED]> wrote:
> I will like to django's ORM in my standalone app (not web app).  Do I always
> its admin tool to create tables? Or it can reuse the table structure I
> create in the db?

You should be able to use the Django ORM on an existing database (not
that I've actually tried this).

Basically, you can use the admin tool to create the models.py file
from an existing database, rather than doing it the other way around.

Check out the documentation at
http://www.djangoproject.com/documentation/legacy_databases/ for a
starting point.

Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Loading an url takes 60 sec.

2006-07-28 Thread Ian Holsman
could it be that you only have 256M on the machine?  --Ian Holsman[EMAIL PROTECTED]http://economy-chat.com It's what the economists talk about 
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: Loading an url takes 60 sec.

2006-07-28 Thread Ian Holsman
Hi Andrew.I have no idea from the information you have provided me.are you running it via mod-python, fastcgi, or the django-admin?besides from actually uploading your app somewhere where people can see, I'm not sure what else we can do.FWIW.. I will only look at your code if it's open source.. other people don't have this restriction.regardsIanOn 28/07/2006, at 6:28 PM, and_ltsk wrote:hi Ian, you have to give us a bit more >information.  what does your app actually do in that 60 >seconds?  personally it sounds like your database >isn't tuned... but I'm justguessing My app is my first attempt in django.This is simple task manager with task and userprofiles models( 2 tablesin the db). Django admin is used too. Database has few test recordsonly. TCPView shows many browser-server "blinking" connections.

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Loading an url takes 60 sec.

2006-07-28 Thread Ian Holsman
hi and_itsk.you have to give us a bit more information.what does your app actually do in that 60 seconds?personally it sounds like your database isn't tuned... but I'm just guessing regardsIanOn 28/07/2006, at 5:16 PM, and_ltsk wrote:I have a problem with performance of django.WinXP, 2GHz, 256 MB, postgresql-8.1.4 or postgresql-8.0., fresh svndjango.Every url takes 60 or more seconds to load.For comparison, Zope takes 2-3 sec.How speed up it?  --Ian Holsman[EMAIL PROTECTED]http://VC-chat.com It's what the VC's talk about 
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: Generic views and dates in the future

2006-07-27 Thread Ian Holsman
On 08/07/2006, at 12:12 AM, Jan Claeys wrote:On do, 2006-07-06 at 17:03 -0400, Jay Parlar wrote: On 7/6/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: If I were to write a backwards compatable patch, is it something you'dbe willing to put in? I'm thinking along the lines of a keywordargument 'allow_future' which has a default value of False.  Maybe something more generic would be better?  E.g. I'm sure some peopledon't want to view past events (e.g. in case of an event calendar).  Andother people might have other requirements that we can't even imagineyet...you could do this by passing a filtered queryset into the view.regardsIan-- Jan Claeys

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: TEMPLATE_CONTEXT_PROCESSORS

2006-07-24 Thread Ian Clelland

On 7/24/06, Rares Vernica <[EMAIL PROTECTED]> wrote:
> The goal is to have request.META.PATH_INFO in templates.
>
> The problem is that TEMPLATE_CONTEXT_PROCESSORS does not seem to make
> any difference. request is still not accessible from template. Even is
> I
> set the variable to () nothing happens.

As far as I know, the TEMPLATE_CONTEXT_PROCESSORS setting only affects
templates which have a RequestContext object passed to them by the
view, and not a plain Context object.

The Django generic views all use RequestContext objects, but if you've
written your own views, then you may be using plain Context objects,
and your context processors won't be executed at all.

-- 
Regards,
Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Search Engine for Python and Django

2006-07-23 Thread Ian Holsman
SolR  http://incubator.apache.org/projects/solrmight be worth a look.. I think there is a python interface for it.regardsIan.On 24/07/2006, at 1:08 PM, Vizcayno wrote:Hi:Do your have news about the promising MerQuery?I was looking for some good open software Search Engine API (index andsearch) for Python in Win32. I could see some promising ones but, asalways in the open soft. community,  many atomised and incompleteefforts. The last I looked was Swish-e which does not have a .dll API,its API only searches, the word documents can not be indexed withcatdoc.exe because the developer hates Windows and the Python API doesnot seem to be active.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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Syndication and authentication question

2006-07-22 Thread Ian Holsman
I did it like this on economy-chat.comfirst.. every link to the feed itself is unique, based on User-ID or session key.i have the following in my urls.py  (r'^feed/atom/(?P\d+)/(?P\d+)/(?P.+)/$', 'atomfeed'),  (r'^feed/atom/(?P\w+)/$', 'atomfeed'),  and the atomfeed view itself isdef atomfeed(request,  content_type_id=None, user_id=None, hash=None, session_key=None ):    if content_type_id is not None and verify_objref_hash( content_type_id, user_id, hash ):        try:            request.user = User.objects.get(pk=user_id)        except (KeyError, User.DoesNotExist):            pass    else:        if session_key:            try:                request.session = Session.objects.get(pk=session_key )            except (KeyError, Session.DoesNotExist):                pass    return buildfeed(request, feedgenerator.Atom1Feed, tag, author)(where buildfeed would actually generate the XML feed (ala what feedjack http://tabo.aurealsys.com/software/feedjack/ does)which sets up the session/userid for the rest of the request.naturally I have the RSS feeds generate the appropriate link on the page in questionfor exampleorOn 22/07/2006, at 4:25 PM, afarnham wrote:I am messing with feeds for the first time with Django and waswondering if there is anyway to do authentication (i.e. grab thesession) from inside the my Feed class? I followed the high levelframework example from the documentation page if that helps inunderstanding how I implemented this feed.Thanks,Aaron Farnham --Ian Holsman[EMAIL PROTECTED]join http://gyspsyjobs.com the marketplace for django developers  
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: request for applications

2006-07-21 Thread Ian Holsman
On 22/07/2006, at 2:54 AM, Tim wrote:I'm wondering if anyone out there has build a classified adsapplication. I'm pretty new to Django and Python (but I LOVE it so far)and I find I really learn from example (compared to reading the docs).I guess I'm mainly looking for the models, the urls stuff, the viewsand template (and any templatetags I guess).There is a chance that if you send me anything, it could end up in oneof my projects so if it's proprietary, I understand.I'm guessing your after a OSS application.and I don't know of any. my suggestion is to find a OSS classified application in another language that hasmost of the features you like, and see how it works if you are looking for the business logic.There are several OSS applications in django land if you want to see how models/views/urls interact.regardsIanTim  --Ian Holsman[EMAIL PROTECTED]join http://gyspsyjobs.com the marketplace for django developers  
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: How to debug ajax transfer

2006-07-21 Thread Ian Holsman
I use FireBug https://addons.mozilla.org/firefox/1843/ with mozilla.it lets me see each Ajax request, with the responses in a separate window.(so you can see the actual exception).(I also put modified the debug.py so it prints a stack trace at the very top of the HTML as well)regardsIanOn 21/07/2006, at 6:05 PM, limodou wrote:On 7/21/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: On Fri, 2006-07-21 at 15:53 +0800, limodou wrote: On 7/21/06, limodou <[EMAIL PROTECTED]> wrote: Recently I wrote some ajax code in my django project. And as Iinvoking xmlhttprequest to call view methods, and sometimes I seenothing happened in browser, but I found some messages in developmentserver's log output, just like:[21/Jul/2006 08:35:36] "POST /easyadmin/add/users/TPermission/HTTP/1.1" 500 46557I saw there is a 500 error, but I cann't see the debug page, so I wantto know how to get the errors at this case? Is there an easy way tooutput the debug to somewhere manually?   --Ian Holsman[EMAIL PROTECTED]join http://gyspsyjobs.com the marketplace for django developers  
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: ContentTypes usage

2006-07-20 Thread Ian Holsman
What are you trying to figure out exactly?Content Types are basically meta data describing your application's models.It gives you a database wide method of uniquely identifying a object.this allows you to do stuff like:have a global redirect mechanism  /r//allow you to add tags or comments to any object in your schema. (ie it is painfully easy to add comments to the 'user' object, or 'forum' object, or 'review' object)and do things like row-level permissions.regardsIanOn 21/07/2006, at 11:24 AM, Uros Trebec wrote:Aidas Bendoraitis wrote: You can learn about ContentTypes fromhttp://www.djangoproject.com/documentation/models/generic_relations/and also from the code of django.contrib.comments Thank you very much for this one! I'll try to figure it out.regards,Uros  --Ian Holsman[EMAIL PROTECTED]http://zyons.com/ build a Community with Django 
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: Is Django the framework I've been looking for?

2006-07-20 Thread Ian Holsman
On 21/07/2006, at 11:22 AM, Adrian Holovaty wrote:(1) Portable apps across projects architecture. From what I've read, it sounds like a perfect fit for what I want to do. Is it really that great?  Yes. It is that great. :) It's really interesting that you see that as one of Django's main strengths, as it's something we don't really advertise (but we should!). The software from which Django was extracted -- a news package called Ellington -- was designed to let apps be portable across projects/servers/sites. We wanted to be able to say "Let's reuse this events-calendar thing on Lawrence.com and LJWorld.com, giving them different templates for the different sites, but keeping the same backend code."  It's exactly what you're looking for, in that respect. And thanks for indirectly encouraging us to advertise this feature more... It's the main reason I chose to develop my first app in Django, instead of Rails, and from then I've been hooked. --Ian Holsman[EMAIL PROTECTED]http://economychat.com discussion on the economy and economics in general 
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: shared apps accross multiple sites/projects

2006-07-20 Thread Ian Holsman
On 21/07/2006, at 7:49 AM, Brian Hamman wrote:Hey there,I'm working on a project that will run several related news sites froma single Django installation. I'll be treating each site as a separateproject, complete with its own settings.py file and corresponding useof the sites framework.Where I run into trouble is with apps that are common to all sites, sayan article app. Currently I'm arbitrarily placing that app into one ofthe sites and then referencing it in the others, which seems a bitawkward. I have a similar problem with the views and templates.are you talking about the data itself, or the code?If your app requires sharing of data, you should probably think of using sites as a many-to-many fieldinstead of as a foreign key. but this will cause a lot of upheaval in your code when you are doing retrieval.if it's the code just stick it in a common place and put it in your python path.Hugo has his 'stuff' directory. I have zilbo.common it isn't a big deal.. it all works.I've bandied about a few ideas such as pulling the apps and/ortemplates out of the projects directory into a main directory, orcreating a "common" project that isn't associated with any particularsite, but which contains all the common apps, views, and templates.I'm worried that this violates a sacred principle of the Djangoframework, which could have consequences down the road.nope.. a couple of people do this.what I do is have a site specific folder in my template path which overrides any project-specific ones.that way if site #4 wants to do something crazy it goes in site_4_templates/.regardsIan --Ian Holsman[EMAIL PROTECTED]http://economychat.com discussion on the economy and economics in general 
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: Caching in Django admin

2006-07-20 Thread Ian Holsman
is there a similar decorator to cache the output of a tag?regardsIanOn 20/07/2006, at 6:28 PM, Axel Steiner wrote:Hi, It looks like the right way to deal with this is to implement per pagecaching, but that doesn't look too simple to me. I hope that someonewill prove me wrong by posting some simple instructions for implemetingper page caching. Alternatively please post a mechanism for disablingglobal caching for selected pages (even though I doubt that that ispossible without creating some custom middleware.) caching individual views is also simple. When your cache is already setup,just add a decorator for each view, which should be cached.from django.views.decorators.cache import cache_page@cache_page(900)def myview(request):   ...The argument for cache_page is the cache timeout in seconds.Bye,Axel

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Having problems getting started with Zyons

2006-07-19 Thread Ian Holsman
try order by 3 descOn 19/07/2006, at 8:40 PM, tonemcd wrote:I dug around a little, href=""http://archives.neohapsis.com/archives/mysql/2005-q2/1966.html">http://archives.neohapsis.com/archives/mysql/2005-q2/1966.html">thishelped a lot - and I found that this works (4.1.18-standard);mysql> select content_type_id, object_id, sum( unique_views)  fromcounter_objecthourcounter  where site_id=1 and effective_date >='2006-07-18 09:50:07' and content_type_id in (30) group bycontent_type_id, object_id  LIMIT 40;Empty set (0.00 sec)But of course the 'order by sum (unique_views) desc' has gone.Tone

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Having problems getting started with Zyons

2006-07-19 Thread Ian Holsman
hmm..the SQL shouldn't be that complex.. it's pretty standardcan you try running it without the date ?or perhaps changethe with content_type_id in (30) to content_type_id = 30On 19/07/2006, at 8:10 PM, tonemcd wrote:Ian,I think that's it - it definitely causes an SQL error on MySQL4.1.18-standard.Drat. Our main systems (where I intend to run django 'for real') arestuck on the 4.1 series for the time being (hence why my machine isstill running 4.1.18-standard). However, as I make the final decisionson what server versions we use, this could change ... ;)Tone

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Having problems getting started with Zyons

2006-07-19 Thread Ian Holsman
didn't 'diss' it at all.bugs happen.have you tried running the SQL directly from the mysql command prompt?it doesn't cause an error on mysql 5.0.16 or 5.1.11;(maybe the trackback will help.On 19/07/2006, at 7:56 PM, tonemcd wrote:Sorry Ian, I didn't mean to diss your application in the maindiscusssion forum! I just thought it might be a stupid user problem (Icouldn't find it in the zyons.com forum).I've been watching the development of zyons for a while with a view tousing it for the first stage of our Zope migration project and thoughtthat I'd have a go at the latest release.Stupidly, I have posted the wrong SQL, it should be;select content_type_id, object_id, sum( unique_views)  fromcounter_objecthourcounter  where site_id=1 and effective_date >='2006-07-18 09:50:07' and content_type_id in (30) group bycontent_type_id, object_id order by sum( unique_views ) desc LIMIT 40I'll post the trackback in the 'bugs' forum at zyons.comThanks for what looks like a really useful application by the way!Cheers,Tone

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Having problems getting started with Zyons

2006-07-19 Thread Ian Holsman
Hi Tony.Thanks for giving Zyons a whirl.'popular_objects' is part of the 'counter' app which tracks what people are viewing.you don't need it installed for the rest of the app to run.that being said.he SQL you are showing me doesn't seem to contain the 'group by' command which looks like it is present in all the vairous forms in zilbo/common/counter/models.py ;(can you post the trackback on zyons in the 'bugs' forum.. http://zyons.com/forum/bugs/as I'm not sure django-users is appropriate for discussion custom apps.On 19/07/2006, at 7:16 PM, tonemcd wrote:Hi all,I'm trying to get the Zyons community/bulletin board system up andrunning - we think it could be extremely useful for a large part of oureducation community, and will assist us in migrating from Zope toDjango. Trouble is, I can't get it to work on my machine (MacBook Pro,Python 2.4.3/MySL 4.1.18-standard)I get this error on pointing at the root;ProgrammingError at /(, 'Invalid use of group function')Template error (at line 38)In template/Users/bingobob/Sites/zilbo/common/forum/templates/forum/main_page.html,error at line 38Caught an exception while rendering.28	        {% latest_conversations conv 10 %}29	30	   {% for c in conv %}31	   {{ c.forum.name}} {{ c.name }}32	   {% endfor %}33	34	3536	37	Most Popular38	{% popular_objects Conversation c_o 40 %}39	40	{% for a in c_o %}41	{{ a.0.name }}42	{% endfor %}43	44	45	46	4748	{% endblock %}The actual SQL generated is;select content_type_id, object_id, sum( unique_views)  fromcounter_objecthourcounter  where site_id=1 and effective_date >='2006-07-18 09:12:08' and content_type_id in (30) order by sum(unique_views ) desc LIMIT 40Is this a simple thing that I can fix (ie I've done something stupid),or do I need to include more traceback information?Cheers for any help,Tone

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


<    1   2   3   4   5   6   7   >