--
Clint Ecker | STONE WARD
440 N. Wells, Suite 750, Chicago, IL 60610
Boston | [ Chicago ] | Little Rock
www.stoneward.com
There is a pyzeroconf module [1] and it seems pretty easy to use [2].
Just find in the code where it does assign the IP address, and insert
the 15 lines you need to advert the service. Should be pretty easy.
Now, the problemis, Django tries to use as little dependencies as
possible, and this would be one. But there has not been any new
release since a year and a half, so it might be pretty stable.
Enjoy,
G
[1] http://sourceforge.net/projects/pyzeroconf
[2] http://www.amk.ca/python/zeroconf
You say it's just as easy as pulling down the bookmark bar in Safari,
but in my browser (Firefox) I just type "lo" and the bar autocompletes
for me--I think Safari does this too, right? I don't think I've fully
typed out "localhost:8000" in quite a while :)
--
Clint Ecker | STONE WARD
440 N. Wells, Suite 750, Chicago, IL 60610
Boston | [ Chicago ] | Little Rock
www.stoneward.com
On 10/17/06, Guillermo Fernandez Castellanos
You can see it in action here:
http://www.turbogears.org/svn/turbogears/trunk/turbogears/startup.py
Look for 'def start_bonjour():"
cheers,
mick
That's one neat idea we could learn from TG. With the TG's code as an
example, it shouldn't be hard to put up a patch.
-Cheng Zhang
http://www.ifaxian.com
1st Django powered site in Chinese ;-)
http://www.aiyo.cn
Our 2nd Django powered site in Chinese
On Oct 17, 10:24 am, Cheng Zhang <czhang.ml...@gmail.com> wrote:
> On Oct 17, 2006, at 11:50 PM, Michael Twomey wrote:
>
> > Turbogears just uses the command line tools if they are available, no
> > need to drag in any library dependencies. Another advantage of this
> > approach is that it works on any platform with the bonjour command
> > line tools, not just the mac.
>
> > You can see it in action here:
> >http://www.turbogears.org/svn/turbogears/trunk/turbogears/startup.py
>
> > Look for 'def start_bonjour():"That's one neat idea we could learn from TG. With the TG's code as an
> example, it shouldn't be hard to put up a patch.
>
> -Cheng Zhanghttp://www.ifaxian.com
> 1st Django powered site in Chinese ;-)http://www.aiyo.cn
Is Django competing for mindshare among web developers? Every little
bit of polish matters. TurboGears already has this, and you can bet
that as Apple integrates Rails into Leopard, they're thinking about
"fit and finish" stuff like this.
It's always a really nice feeling when you get a little surprise like
finding the website you're developing in your Bonjour bar. "Wow:
someone thought of that." It gives you (well, me anyway) a nice tingle
and makes a positive emotional connection-much like the feeling I got
when I realized how much work Django's free Admin app saves me.
This kind of stuff evangelizes itself.
If you're developing more than one Django site at the same time,
they'll show up by name in Bonjour, instead of localhost:port. While I
can keep it straight that MisterWidget is running on localhost:8000,
CrazyBlog is running on localhost:8020, and MyWebStore is running on
localhost:8080, why should I have to? It's much nicer to hit the
Bonjour bar and pull them down by name. While this is a contrived
example, I think it illustrates the point nicely.
I don't actually use Firefox at all, other than to make sure my
websites look and behave normally in it. I simply dislike the browser.
I use Opera and Safari. Camino (the Mac-native browser with a creamy
Gecko core) also uses Bonjour, so it would be useful to non-Safari Mac
devs as well.
If no one has added this by the time I'm more proficient in Django's
innards (I've only got about 8 hours' total experience in Django and I
haven't even finished my first tutorial yet), I'll submit a patch
myself and hope it gets accepted. It's worth doing and worth having.
And it's easy! The TurboGears code to do this, in their setup.py, is
not very many lines of code.
Well it turns out it is not so trivial. It took me a good amount of
evening to come up with first version of this patch.
You can get it from here: http://code.djangoproject.com/ticket/2933
Right now I tested only on OS X 10.4.8 and I don't have prior
experience with Bonjour so getting some feedback from people who
actually use these Bonjour capabilities would be nice.
Also for some reason the way TurboGears do the Bonjour thing didn't
work for me so I turned around a bit their code and probably broke a
lot of usage scenarios. But at least now you have a patch to test.
regards,
Jure Cuhalev