Re: import of mysql in settings.py

2008-08-21 Thread Ian Holsman

Cortland Klein wrote:
> I just had the same problem. It has something to do with MySQLdb not  
> being included.
>
>   

when it rain's it pours. I'm been hitting my head on the same problem.
to verify that this is the case just replace 'mysql' with 'dummy' and 
you should be able to validate the problem is with the include.

regards
Ian
> For me, I think it's because Mac OS X 10.5.4 doesn't have this python  
> thing installed. The documentation and tutorial should mention this,  
> IMO.
>
> http://code.djangoproject.com/ticket/5531#comment:12
>
> On Aug 21, 2008, at 2:52 PM, mpls wrote:
>
>   
>> I've edited the DATABASE_ENGINE = 'mysql' in settings.py along with
>> specifying a database name and user account info. But I get the
>> following error:
>>
>> ImportError: No module named mysql.base
>>
>> How can I fix this problem. Any help is appreciated.
>> 
>
>   


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



paul bragiel / lefora is a spammer

2008-04-09 Thread Ian Holsman

Writing it here as lefora is written on django, and he or the developer 
who wrote it for him will see it and be ashamed of themselves.

This guy just IM'd me asking me to digg his forum software.

I have never met the guy, and am assuming he also spammed other people 
on the mailing list. and am sick of this behavior


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Xcode as Django IDE

2008-02-13 Thread Ian Holsman

Alex Ezell wrote:
> Textmate works great for me. I use GetBundle
> (http://projects.validcode.net/getbundle) to get the Django bundle
> which does syntax completion and highlighting for Django-specific
> Python files and Django template HTML.
>
>   
Textmate, and a couple of terminal windows for mysql and ipython.
2 monitors helps ;-)

what does 'getbundle' do? I already have django specific templates in 
textmate via the "mateup" script on their site.

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Rails/Django comparison synopsis

2007-03-29 Thread Ian Holsman

management perspective
- ease of deployment
- ease of development
- ease of training your developers

I would say both Rails & Django are comparable  in these, both easily  
beat the competition (java / PHP).

- ease of finding developers
Rails wins on this one I think .. there are more rails developers out  
there, but on the flip side there are also more open reqs for rails  
guys as well.

- 3rd party add on's.

I think django's python background gives it a lead on this, and the  
framework is structured lends itself to reuse.

regards
Ian


On 12/09/2006, at 9:41 AM, Jeff Rodenburg wrote:

> I'm trying to get some education on rather quick order and was  
> looking for feedback from the Django side of the equation.
>
> I've seen a bit of comparison in public forums of Rails and  
> Django.  I'm trying to eval these things from a higher level, or  
> one might call "management" perspective.  (No, I'm not management;  
> I just work for them.  ;-) )
>
> On observation, the frameworks seem rather similar with subtle but  
> key differences, i.e. interpretation of the MVC terminology and  
> structure.  On a quick-read basis, Rails seems to have an advantage  
> of a lot of documentation, more publicity (the Hanson kid sure  
> knows how to work a crowd) and a nice IDE in RadRails.
>
> My question: how would you (you = someone with solid Django  
> background) characterize similarities and differences with Rails?
>
> cheers,
> jeff r.
>
> >

--
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?hl=en
-~--~~~~--~~--~--~---



Re: Django Hosting

2006-10-20 Thread Ian Holsman


On 20/10/2006, at 7:49 PM, Fredrik Lundh wrote:

>
> "Guest007" wrote:
>
>> http://www.djangodomain.com/
>
> ah, the warm and fuzzy feeling of a faceless web provider hiding  
> behind an anonymous
> web contact form, and with a "terms of service" page copied word by  
> word from other
> similar sites...
>
what's anonymous about it ?
from whois.
Administrative Contact:
NZ Interlink Group
Mihail Bourduk (domain_at_1webspace.net)
+1.212530185
Fax: 94734313
30 Dunraven Place
Torbay
Auckland,  1310
NZ


it just seems like a very cheap setup with not much thought.. but not  
anonymous by any means.

> 
>
>
>
>
> >

--
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: (Third Attempt To Post)Complex Application Security Model

2006-10-19 Thread Ian Holsman


On 20/10/2006, at 9:01 AM, [EMAIL PROTECTED] wrote:

>
> Hi Ian,
>   This is very similar to what Chris has done.  The issue is that his
> code hasn't been merged with Trunk, which puts me in an awkward
> position in terms of adopting it for something that is outside the
> scope of a test application.

here is what I hear you saying.

you'd rather write your own code to do the same/similar thing to what  
chris
has already done (and also what has a high chance of getting merged  
in the
coming months).

and as it's your own code, you are also willing to handle all the  
merges, bugfixes,
and potential incompatiblies in it by yourself, and on your own dime.

If you have an active interest in Chris's code, may I suggest you  
petition the powers
that be for a SVN account on it, and modify it instead of writing it  
the same functionality yourself.

that way you can keep it current with the trunk (just like you would  
have to do with your own)
and get it to a state where the trunk maintainers will feel much more  
confident with merging it back
into the trunk.

That is how I would justify working on it to my boss at least ;-)

regards
Ian

>   I started working on a solution to this
> problem a few months ago, then saw the initialization of the RLP
> project  around 5/27/06.  I stopped working on that problem and  
> started
> working on the application, figuring out the model design, etc.   
> Nearly
> five months have passed and I'm at a point where I need to solve this
> problem in a logical and sustainable fashion.  I would much rather use
> the RLP and GA tools, but little progress has been made on there
> adoption.  I realize that the contributing members of the project are
> busy, but I'm running out of time, and need to meet a deadline.I
> would even be willing to cough up a few hundred dollars for someone to
> help as long as I can meet the requirements of my application, and the
> code was adopted in Trunk.  I have about two weeks, to come up with a
> solution to this issue.  I have thought about moving this project to
> TurboGears or Rails(+Plugins) because they have libraries that address
> this type of problem.  I would appreciate any suggestions.
>
> -- Nick
>
>
> >

--
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: (Third Attempt To Post)Complex Application Security Model

2006-10-19 Thread Ian Holsman
self):
>return "%s, %s, %s, %s  " %(self.start_date, self.start_time,
> self.end_date, self.end_time)
>
>class Admin:
>
>list_display = ('start_date','start_time','end_date',
> 'end_time',)
>
>class Meta:
>#Add some addtional permissions to test/play with this
> fuctionality.
>permissions = (
>("can_view", "Can View"),
>("can_edit", "Can Edit"),
>("can_confirm", "Can Confirm"),
>
>)
>
> == 
> ===
> Your advice is much appreciated!
>
> Regards,
> Nick Pavlica
>
>
> >

--
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: Django Hosting

2006-10-19 Thread Ian Holsman

I've been using webfaction for a couple of months, and haven't had  
any issues.
their machines stay up, service is prompt and helpful, and the  
machines themselves appear lightly loaded too.

what else can u ask for?

--I

On 20/10/2006, at 6:41 AM, ian wrote:

>
> 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
>
> >

--
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: 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: 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
-~--~~~~--~~--~--~---



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-15 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
-~--~~~~--~~--~--~---



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: 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: 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: 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: 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: 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: check for yourself (((;

2006-08-18 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 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==Django+administration 
>> +Admin+Log+in+Username+Password=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: 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: 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: 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  -~--~~~~--~~--~--~---



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: 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: 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-04 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: 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
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 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: 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: 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: 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, 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  -~--~~~~--~~--~--~---


Re: how to email a password

2006-07-18 Thread Ian Holsman
I do something similar to Kenneth.the other approach is to use something like OpenID, and make it somebody else's problem.On 19/07/2006, at 3:16 PM, Kenneth Gonsalves wrote:On 18-Jul-06, at 9:20 PM, va:patrick.kranzlmueller wrote: next problem with my user registration process:how do I send the password to registered users after they confirmedtheir registration?the process should look like this:1. registration2. email confirmation3. account activation & email with username and password4. now the user can log insince the password is stored encrypted, I´m not sure how to send it. why send it? What i do is, take the username and email address on  registration. Then the user gets an email to confirm, the  confirmation screen also requires him to add password and allows him  to add other information also. So the password never gets mailed.  Password reset on lost password is done the same way-- regardskghttp://lawgon.livejournal.comhttp://avsap.org.in

--~--~-~--~~~---~--~~
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 get django to show me the sql it executed recently?

2006-07-17 Thread Ian Holsman


http://zilbo.com/@perfmon captures this kind of information on a per- 
request basis.


On 18/07/2006, at 12:06 PM, Malcolm Tredinnick wrote:

>
> On Mon, 2006-07-17 at 18:44 -0700, Scott Chapman wrote:
> [...]
>> p.s. Any chance this could be added to the Admin interface.  It's the
>> intuitive place for such things.
>
> Not a good idea. It's a security hole. You would be able to see every
> query people run just because you can log into admin -- and those two
> access levels are not equivalent. If you want to view queries from the
> command line, you already have permission to connect to the database
> (since you are allowed to run a terminal and execute the django app  
> and
> read the settings file, so the database access permissions follow).
>
> Also, the query cache is per-request, not forever. So it gets cleaned
> out between web page requests (otherwise you wouldn't just see one or
> two people noticing massive memory usage; we'd all see it after  
> testing
> for an hour or two).
>
> Regards,
> Malcolm
>
>
> >


--~--~-~--~~~---~--~~
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 vs. Rails vs. Symfony: Django is fastest

2006-07-16 Thread Ian Holsman

is this a test of django vs pylons or a test of mod_python vs wsgi ?

a pre-test showing a serving a simple static page through both of  
them (also 15k) would highlight
if django's templating engine is indeed faster than pylons.
(and it might convince the pylons team to use mod-python instead of  
fastcgi)




On 17/07/2006, at 7:03 AM, [EMAIL PROTECTED] wrote:

>
> a nice overview of the test (django and pylons) can be found here:
> http://www.cms.rk.edu.pl/benchmark.html
>
>
> >


--~--~-~--~~~---~--~~
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: Perspective on building a community blog in a short timeframe

2006-07-15 Thread Ian Holsman

maybe http://zyons.com will do what you need (or provide a base for  
it at least)
On 15/07/2006, at 4:06 AM, Joe Murphy wrote:

>
> Yup, I caught that earlier today, it's a good start. I think the
> details that matter here are the timeline, ease-of-use by a
> non-technical audience, and hacking a pre-packaged solution vs.
> building from scratch.
>
>
> >


--~--~-~--~~~---~--~~
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: Set up problems ( webfaction )

2006-07-13 Thread Ian Holsman

Hi Iain.

in your apache config do something similar to
http://svn.zyons.python-hosting.com/trunk/zilbo/conf/zyons.conf.tmpl

and that will let the apache handle the 'images' area of your site  
instead of django.

On 14/07/2006, at 12:02 PM, Iain Duncan wrote:

>
> I'm setting up a sight on webfaction, and so far things are coming  
> along
> ok, but I can't figure out how to serve images. I've never used a  
> shared
> hosting setup that didn't have a directory called 'public' or  
> 'htdocs'.
> Has anyone on here used them? Any tips on where I need to put media  
> and
> what I need to put in my httpd.conf to get this working?
>
> Thanks
> Iain
>
> >


--~--~-~--~~~---~--~~
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: Atomic value increment

2006-07-12 Thread Ian Holsman

why not use a GUID ?
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/163604

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

>
> On 7/12/06, Don Arbow <[EMAIL PROTECTED]> wrote:
>>
>> On Jul 12, 2006, at 8:56 AM, Jay Parlar wrote:
>>>
>>> Is there a better way to do this? More specifically, an atomic  
>>> way to
>>> generate and set the new unique_id? I can't just use the  
>>> autogenerated
>>> 'id' primary key as an unique identifier, because I have a list of
>>> legacy unique_id values which I have to initially populate the db
>>> with.
>>>
>>
>>
>> You could populate your database with the legacy values, then set the
>> sequence start number to the number following those.
>>
>> You can do this in postgres with the setval function.
>>
>
>
> What about a table lock? My whole system is currently implemented with
> the unique_id column, so it'd be much easier if I didn't have to
> change that.
>
> The stuff that happens inside the view is minimal, so there'd be very
> little performance loss if one process was waiting for the lock to
> release.
>
> 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: Announce: Django Performance Monitoring

2006-07-10 Thread Ian Holsman

Hi Favo,
It's free if you work on a OSS project.

regards
Ian

On 11/07/2006, at 12:21 AM, favo wrote:

>
> Ask very carefully, Do you want to make it OS?
> If you feel not happy with the question, just ignore it please.
>
>
> >


--~--~-~--~~~---~--~~
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: Problem with middleware

2006-07-09 Thread Ian Holsman
Hi Gullermo.I've done the same thing here:http://svn.zyons.python-hosting.com/trunk/zilbo/common/utils/middleware/lastseen.pyby the looks of it you are forgetting to actually store it.ie      request.session['sysvortex_last_visit'] =  datetime.datetime.now() cheersIan.On 09/07/2006, at 11:56 PM, Guillermo Fernandez Castellanos wrote:Hi,Seems like last time I was not that clear, so here is what I want todo: I want to keep track of the users that visit my site, keeping inthe DB what IP addresses visited my site, when, ... I define a visitas a click on one of my pages, given that this visit is done a certaintime after the last visit (30 minutes, 1 hour, 1day,... that can bechoosen).I've decided to keep in the cookies, through the session middleware,the value of the last visit. I do this with the request.session in theprocess_view of a personal middleware I am trying to develop:class IpMiddleware:   def _add_ip(this_ip):    # Adds IP and Visit to database       [...]   def process_view(self, request, view_func, view_args, view_kwargs):       last_visit=request.session.get('sysvortex_last_visit', datetime.now())       difference=datetime.now()-last_visit       if difference > timedelta(minutes=30):           self._add_ip(request.META['REMOTE_ADDR'])       return NoneMy problem is, I can not make the request.session to store my value.No matter how many time I wait or what I do, 'difference' always is(almost) 0. It seems to me that when I dorequest.session.get('sysvortex_last_visit', datetime.now()) the valueis not actually saved, which seems strange.I am struggling with this for a few days now, so any help or pointeris higly appreciated, thanks!G

--~--~-~--~~~---~--~~
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: Announce: Django Performance Monitoring

2006-07-09 Thread Ian Holsman

Thanks Jeremy.
I'll add that feature shortly.

On 10/07/2006, at 6:06 AM, Jeremy Dunck wrote:

>
> On 7/9/06, Ian Holsman <[EMAIL PROTECTED]> wrote:
>> you can find out more about it here: http://zilbo.com/@perfmon
>
> On the log detail screen, and if the response MIME is
> browser-renderable (html or so), you can  throw the response content
> into an IFrame using a data URL for added goodness:
> http://en.wikipedia.org/wiki/Data:_URL.
>
> >


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Announce: Django Performance Monitoring

2006-07-09 Thread Ian Holsman
Perform is a tool to help you diagnose your performance and QA issues within your Django application.you can find out more about it here: http://zilbo.com/@perfmonI've decided to charge $20 for it. People using it for debugging open source projects can get it for free. regardsIan
--~--~-~--~~~---~--~~
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: Don't make me wait!

2006-07-09 Thread Ian Holsman

I actually started writing a queueing system a while back (and lost  
it during a hard drive crash)

I recommend you look at hugo's stuff.jobcontrol package https:// 
simon.bofh.ms/django-projects/stuff/trunk/jobcontrol/
as a base.

regards
Ian

On 09/07/2006, at 6:07 PM, wiz wrote:

>
> On 7/6/06, Tyson Tate <[EMAIL PROTECTED]> wrote:
>>> Why not put the messages in the database and read it from other  
>>> side?
>
>> I'm not sure I understand what you mean. Do you mean that I should
>> take the API call responses and read them from the user-side with
>> AJAX? I hope that's not what you meant because that would just be
>> silly. :)
> Instead of directly polling services, your signals may put an entry in
> a table like 'ping magnolia for user A, get 10 latest stufflets'. And
> there are daemon (or process, hooked on cron), which will check his
> queue table and do jobs.
>
> >


--~--~-~--~~~---~--~~
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: Deploying and set up on shared hosting?

2006-07-08 Thread Ian Holsman

my experiences have been vastly different to yours James.

I found the attitudes of the admins to be very blasé.
with a 'what do you expect for a shared host' type response.

I would recommend going with someone who actually wants the business
and knows how to support django.

On 09/07/2006, at 9:13 AM, James Bennett wrote:

>
> On 7/8/06, Iain Duncan <[EMAIL PROTECTED]> wrote:
>> I checked them out on a friends reco, but got the impressions that
>> reliable uptime for a business was not really their priority, so I  
>> don't
>> feel like I could in good faith put a clients site up there that  
>> is just
>> supposed to keep working. Correct me if I'm wrong?
>
> I've been a very happy shared hosting customer for about eighteen
> months; they went through a period of growing pains where their shared
> hosting base increased by a huge amount and a lot of their users found
> new and interesting ways to eat up server resources, but things have
> been very smooth for quite some time now.
>
> Through it all I've never once gotten the impression that "reliable
> uptime was not a priority"; if anything, most of the complaints I've
> heard in the past few months are that TextDrive came to be a little
> too zealous in their automated enforcement of things like
> resource-utilization limits (which were relaxed a tiny bit just the
> other day in response).
>
> They do also offer business-level accounts with SLA-style guarantees
> on uptime, though, and common sense would recommend going that route
> if it's what you really need.. I've always marveled at the number of
> people out there who claim to have "mission-critical" sites but are
> unwilling to pay more than the base $12/mo. shared plan to host
> them...
>
> -- 
> "May the forces of evil become confused on the way to your house."
>   -- George Carlin
>
> >


--~--~-~--~~~---~--~~
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: Archlinux now running django!

2006-07-08 Thread Ian Holsman

congrats Sandro.
it looks great.

I'd be interested to hear what you (and others) think were the  
biggest obstacles you had and how you overcame them.

regards
Ian

On 09/07/2006, at 2:25 AM, Sandro wrote:

>
> http://www.archlinux.org has just redesigned their site which is now
> powered by django!  I luvs me my django and I luvs me my archlinux!
>
> Good times.
>
> http://www.archlinux.org/admin/
>
>
> >


--~--~-~--~~~---~--~~
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: mod_python autoreload acts unpredictable

2006-07-08 Thread Ian Holsman

while I don't advocate developer's hitting production .. it happens,  
and can make life easier

may I suggest you just set up a sudo command to bounce the server?

I would also make it so you have 2 code-bases and the command would  
switch to the 'fresh' one.

ie
the script would do something like

cd old
svn up
cd ..
mv old tmp
mv running old
mv tmp running
apachectl restart

and of course have a corresponding 'backout' command which reverses  
it for when the developer screws up


On 08/07/2006, at 7:23 AM, x0nix wrote:

>
>> Um, you earlier stated that the problem was that you have
>> "PythonAutoReload On". That's not on your production server is it?
>> Generally, that setting would only be used in a testing environment.
>
> Oh I didn't notice that it should be used only for testing, thanks for
> info.
>
>> And do you really update you production server with each little
>> modification? Wouldn't it be more practical to update the production
>> server once a day or so. That way, only one developer would be
>> restarting apache only once a day. The process could perhaps even be
>> automated to run at a low traffic time.
>
> I was thinking about the same (cron) solution, seems the best
> available.
>
> [I still don't think that one day is adequate response time, but with
> possibility of Apache restart it could be sufficient]
>
> Thank you all for answers
>
> x0nix
>
>
> >


--~--~-~--~~~---~--~~
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: Deploying and set up on shared hosting?

2006-07-08 Thread Ian Holsman


On 08/07/2006, at 12:32 PM, Iain Duncan wrote:

>
>
>
> Jay Parlar wrote:
>> Probably WebFaction (formerly python-hosting.com) would be your best
>> bet: http://www.webfaction.com/shared_hosting
>
> That looks sweet. Anyone else have any feedback on these guys?

Remi (the owner of webfaction) actually hangs out on this thread from  
time to time
and Jacob runs gypsyhosting

how many other hosting providers are here ;-)



>
> Iain
>
> >


--~--~-~--~~~---~--~~
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: PostgreSQL vs. MySQL

2006-07-07 Thread Ian Holsman

guys...
this is turning into a religious debate.
I think the question has been answered.

both are excellent choices.
and in the hands of an expert can be made to shine.


On 08/07/2006, at 8:18 AM, Geert Vanderkelen wrote:

>
> Don Arbow wrote:
>> On Jul 7, 2006, at 3:35 AM, Kenneth Gonsalves wrote:
>>> another thing, your have to be careful about postgresql is that data
>>> recovery tools for a borked db for postgres are rare to the point of
>>> non-existence, whereas there are lots of them for mysql
>>
>>
>> Perhaps MySQL borks its databases much more frequently, requiring
>> said tools. I have much more experience with Postgres than MySQL and
>> have never needed any tools other than those provided with the
>> install and never have had Postgres corrupt a database.
>
> Well.. Since corruptions comes mostly from failing hardware, you  
> better have
> more tools to make backups, than just one or even none.
> If you don't have tools to make backups correctly, you better don't  
> use this
> particular DBMS at all. :)
>
> If using MySQL with Django, or any tool, some quick check list for  
> backups:
> - binary log on (point in time recovery)
> - replication going
> - regular backups using mysqldump or LVM snapshotting
> - backup the my.cnf and mysql database
> - and make sure the backups are actually usable!!!
>
> If you are hosting your project, make sure the hosting company has  
> at least
> some replication going and daily backups in place. Never trust your or
> others hardware..
>
> Cheers,
>
> Geert
>
> -- 
> Geert Vanderkelen
> http://some-abstract-type.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: PostgreSQL vs. MySQL

2006-07-07 Thread Ian Holsman

I've been using mysql with Django for about a 8 months and have never  
had any issues with it.

I chose mysql as I am more familiar with it. others are more familiar  
with postgreSQL.
choose the one you are more comfortable with.

regards
ian.


On 07/07/2006, at 4:17 PM, Thomas Ashelford wrote:

>
> I keep reading that PostgreSQL is the preferred database for use with
> Django, but I'm wondering if anyone can explain what its concrete
> advantages are.
>
> I've just moved from DreamHost to Webfaction to get the advantage of
> using mod_python instead of fcgi. Already the advantages of mod_python
> are clear (it's basically less flaky). But I now have the choice of 2
> dB platforms and I'm wondering if there are any strong reasons to
> switch to PostgreSQL. So far I can only see a potential negative - I
> may want to use fulltext indexing in the future, and I believe this is
> not available on PostgreSQL.
>
> Any opinions?
>
>
> >


--~--~-~--~~~---~--~~
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: where to put template tags post mr

2006-07-06 Thread Ian Holsman

app/templatetags/ ?

On 07/07/2006, at 1:11 PM, Kenneth Gonsalves wrote:

>
> hi,
> in pre MR, custom templatetags directory was placed in the same level
> as the views.py file and it used to work. In post MR, django cannot
> find these tags. Where do i put them. Putting them in the django/
> templatetags directory works, but that is not acceptable.
> --  
>
> regards
> kg
> http://lawgon.livejournal.com
> http://avsap.org.in
>
>
>
> >


--~--~-~--~~~---~--~~
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: Managing database privileges

2006-07-05 Thread Ian Holsman


On 06/07/2006, at 4:56 AM, [EMAIL PROTECTED] wrote:

>
> So does your database only have one user created and you specify  
> that in
> the settings file or whenever you want to inspect the database by  
> hand?
>
> I'm under the impression that having a separate database user for the
> web server and the developer is the Right Thing To Do(tm).
> Unfortunately I don't find anything in the documentation, wiki, or
> archives to support that idea.

that's probably because it is outside of the scope of django itself ;-)
what I usually do is create the schema via a SQL file with a 'admin'  
user, and then grant a restrictive access
to the user I let django connect with.
basically this protects me from 'DML' errors (ie dropping a table or  
an index)
but not from deleting rows.

If I were to be really 'anal' I would set up 2 separate settings  
files and make the updates go to a separate host with more access  
controls on it.
but for the apps I'm writing now that isn't applicable.

regards
Ian
>
> Nate
>
> >


--~--~-~--~~~---~--~~
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: converting time to user's local timezone

2006-07-03 Thread Ian Holsman

hi Joe.

you'll need to do 2 things (as far as I can tell)

1. store your local user's timezone
2. write a custom filter which does the work

then use
{{ object.create_date|convert_tz user.local_timezone }}

or something like that.

On 04/07/2006, at 8:04 AM, Joseph Heck wrote:

>
> Is there a way to twiddle the built-in date filter to convert time to
> a local user's timezone? Or is this something which is more likely
> require it's own custom filter?
>
> -joe
>
> >


--~--~-~--~~~---~--~~
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: Automatic redirecting after login

2006-07-02 Thread Ian Holsman

try
/accounts/login/?next=/foobar

?
On 03/07/2006, at 5:03 AM, bsdlogical wrote:

>
> Luigi Pantano wrote:
>
>> try this
>>
>> from django.http import  HttpResponseRedirect
>>
>> ... ...
>>
>> def login(request):
>>''' some code to put here '''
>>return HttpResponseRedirect("index.htm")
>>
>>
>>
>>
> I see what you're saying, but I was thinking something more on a
> selective basis. This would redirect all users, but those that log  
> in to
> the main site shouldn't be redirected anywhere. Those that login  
> from a
> different site should be redirected back to it.
>
> I have in mind code that would check the referrer in the main site
> login, but I wanted to check for different methods.
>
> Thanks!
>
> Nick
>
> >


--~--~-~--~~~---~--~~
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: mailing list management

2006-06-29 Thread Ian Holsman


On 29/06/2006, at 7:12 PM, Malcolm Tredinnick wrote:

>
> On Thu, 2006-06-29 at 13:45 +1000, Ian Holsman wrote:
>> anyone in django land integrated mailing lists with django ?
>
> I'm tempted to ask (quietly, and just to myself) "how hard could it  
> be?"
> Then I looked at the sender and realised maybe you've done the basic
> research and there are hidden shoals.
>
well.. it depends on what you are after from a mailing list.
if you are looking for a basic join/push model you still have some  
issues like:
- bounce management
- interfacing with SMTP
- subscribe/unsubscribe via SMTP
- forms to take user preferences to what they are interested in
- template generation / basic HTML/Text push

more advanced stuff
- targeted stats (user X clicked on link Y in the email)
- making a template and then adding in customizations (like unique  
links, names to do the stats, ads)
- reporting
- doing  things like PowerMTA does like queue management and  
throttling (eg only send 50 emails/hour to hotmail)


> So, broadly, what are you trying to do and where are the difficulties?

i haven't tried to do it, I'm just trying to avoid doing it ;-0
I was trolling the list to see if someone has done this before (OSS)  
so I could grab theirs ;-)

>
> Malcolm
>
regards
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
-~--~~~~--~~--~--~---



mailing list management

2006-06-28 Thread Ian Holsman

anyone in django land integrated mailing lists with django ?

regards
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: Global template tags

2006-06-28 Thread Ian Holsman

Hi Poromenos.

you can set up a context processor to do this.
check out
http://svn.zyons.python-hosting.com/trunk/zilbo/common/utils/ 
context_processors.py
for 2 simple ones and
http://svn.zyons.python-hosting.com/trunk/zilbo/settings.py.tmpl
(the very bottom)
on how to configure it

regards
Ian

On 28/06/2006, at 9:36 PM, Poromenos wrote:

>
> Is there a way for me to pass a variable in every template context
> without writing custom template tags? I just want to pass the app name
> because I'm not comfortable with hardcoding it, but template tags seem
> too much work for something as simple as this.
>
> Isn't there something like a globals section, which get passed in  
> every
> template, where I could declare my variable and just do  
> {{ company_name
> }} and have it returned?
>
>
> >


--~--~-~--~~~---~--~~
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: Checking For Existing Rows

2006-06-27 Thread Ian Holsman

http://www.djangoproject.com/documentation/models/get_or_create/
?

but yeah.. besides from using get_or_create, the exception route is  
probably the easiest route.

On 27/06/2006, at 4:58 PM, Tyson Tate wrote:

>
> In one of my apps, I need to check and see if a row already exists
> based on a unique field. Currently, I'm doing something like the
> following:
>
>
> for photo in photos:
>  try:
>  row = Photo.objects.get(flickr_id=photo("id"))
>  # Raise exception if photo doesn't exist in our DB yet
>  except ObjectDoesNotExist:
>  [[[Make the object, etc]]]
>
>
> However, raising an exception on "success" irks the part of me that
> studied computer science for 3 years, so I'm wondering if anyone
> knows of any other ways I might be able to achieve the above in a
> better way.
>
> Thanks,
> Tyson
>
> -- 
> Tyson Tate
> - CalPoly Graphic Design Student
> - Work: Graphic Designer (CalPoly Library)
> - Play: Mustang Band, CalPoly Triathlon Team, Kappa Kappa Psi (Iota  
> Pi)
>
> >


--~--~-~--~~~---~--~~
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: Time Tracking Tool

2006-06-27 Thread Ian Holsman


On 27/06/2006, at 6:48 AM, Jos Yule wrote:

>
> I'm in the prototype phase for designing a time tracking/invoicing  
> tool
> for my small business. First i'd like to know if anyone has already
> done this kind of thing?
>
> If not, i'd like to make something available to other looking for this
> kind of functionality.
>
> I should note that this _IS NOT_ for planning or project management.
> Its just a time entry, reporting and invoicing tool.
>
> Ok, here is what i've got so far, table wise:
>
> CLIENT - name, address, notes, etc.
> PROJECT - name, description - high level
> JOB - name, related to a project. (rate)
> WORK - hours, date done, by (association to the django USER table).
>
I'm assuming WORK also is associated with JOB

> So, i might have a 'new product page' JOB for the 'web site' PROJECT
> for 'wizbang' CLIENT.
>
> I'd then do WORK, which is associated to a JOB. The JOB currently has
> the Rate ($/hr).

that OK for small stuff, but if you have 2 people on a JOB it will  
fall down.
>
> I also have an INVOICE table to which each WORK row is associated.

you should probably associate it with the CLIENT, as the client will  
probably want a single invoice
for the time period detailing the work being done overall (but your  
client may be different)

>
> I'm not really happy with the INVOICE and WORK associations, or how a
> JOB has the rate. I've also just hacked on the django USER association
> to WORK.
allow a invoice to over-ride the rate.

>
> It works for now, but in looking to make it (possibly) usable for a
> wider audience, what things would you change or want to see added?
> Don't use the built-in USER? Where should the Rate be stored? What
> other var's would you want to have tracked (keeping in mind this is
> trying to be a small simple app)?


features ?
for me multi-currency and PDF invoice generation.
but you may just want to use SQL-ledger of OFBIZ (or quickbooks) they  
are pretty easy to use, and cheaper than writing it yourself.

regards
Ian

>
> I know that reports need to go in too, but that can be done once the
> schema is defined...
>
> Thanks for any suggestions, hints and comments.
>
> jos
>
>
> >


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



BETA Announce: Gypsy Jobs - helping developers and companies find each other in DjangoLand

2006-06-25 Thread Ian Holsman

Hi.

I'd like to announce the initial release of  Gypsy Jobs (http:// 
gypsyjobs.com/ ) a job matching service dedicated to helping  
developers find work using Django.

It is a beta product, which started about two weeks ago, and thanks  
to the power of django is a reality now.

your comments and feedback are most welcome.

either on the list, email or here: http://gypsyjobs.com/forum/the- 
site-itself/

regards
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: Can a custom field have two database columns?

2006-06-23 Thread Ian Holsman

Hi Arthur.
I do something similar to this.

I chose to implement it in middleware
http://svn.zyons.python-hosting.com/trunk/zilbo/common/text/ 
middleware/Markup.py

in a nutshell, if the 'description' field exists it will create the  
description_html field in the post, which would get applied by the  
standard manipulator

--I
On 24/06/2006, at 2:23 AM, arthur debert wrote:

>
> In a current project, I've got a lot of fields that must accept  
> markup.
> Currently I am using markdown to parse the raw text. I am aware of the
> useful template tags to apply markdown on the template itself, but
> since reads are much more common than writes I would like to store the
> markup on the database, to improve performance. My current solution is
> something like
>
> class Article(Model):
>   raw_text = TextField(maxlength=2000)
>   markup_text = TextField(maxlength=2000, editable=False)
>
>   def save(self):
>   self.markup_text = mardown(self.raw_text)
>   super(Article, self).save()
>
> Which works, but does not feel very  DRYish, since this code is spread
> all over the place .
> I would like to create a MarkupField using it like:
>
> def my_func(text):
>   return markdown.markdown(text)
>
> class Article(Model):
>   body = MarkupField(,
> converter=my_func)
>   # where converter would be a fucntion such as markdown or te=xtile or
> rest... or any other
>
>   and the MarkupField would do the conversion before saving to the
> database, on another column in the database to store the markup text.
> Then when accessed from templates I could say {{article.body_markup}}
> and that's it.
>
>   So I guess my question boils down to this:
>   - can a custom field have 2 database columns (one for raw text, and
> another for the markup text)? Is this possible at all?
>   
>   Any pointers will be very much appreciated.
>   
>   Thanks,
>   Arthur
>
>
> >


--~--~-~--~~~---~--~~
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: "Normalizing/cleaning" text of bad/unclosed tags?

2006-06-20 Thread Ian Holsman

I avoid this issue by using a 'live preview' and let them use bbcode/ 
markup/textile only and stripping out ALL html.


On 21/06/2006, at 9:28 AM, Jay Parlar wrote:

>
> On 6/20/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
>
>> LiveJournal as a well-evolved HTML filter, but it's in perl.
>> http://cvs.livejournal.org/browse.cgi/livejournal/cgi-bin/ 
>> cleanhtml.pl
>>
>> (It seems like Python should have one, but I don't know of one.)
>
> Eww, I don't want HTML in comments enough to warrant passing
> everything through a perl script :)
>
> You'd think the Zope team would have something by now, but all I can
> find from them is a 6 year old module. Oh well.
>
> 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
-~--~~~~--~~--~--~---



  1   2   >