Gah, why does Google Group always break my links up :/
The worst part is that I'm still forced to use PHP from time to time,
since I supply many of my clients with a PHP-based CMS, Drupal.
The code in Drupal is not particularly nasty, but thinking about why
$server = explode('.', implode('.', array_reverse(explode(':',
rtrim($_SERVER['HTTP_HOST'], '.'))))); needs to be so complex and find
the itty bitty syntax error that might sneak itself into to a complete
mess of different parentheses, concatenation operators and other nasty
stuff. Python is not perfect, but it /is/ better :)
In any case, I'd rather not have to implement my own "one-size-fits-
all" CMS. Ever. Drupal is a good system in many ways.
On Feb 8, 10:14 pm, "Ian Wilson" <[EMAIL PROTECTED]> wrote:
> I tried to use the scroll bar to view the rest of the comics,
> screenshots always get me with that. Looks good though I'm glad it
> worked.
>
> Yeah ha I don't know if complex thinking in reference to php is the
> right phrase. Maybe ,obfuscated thinking, kind of like thinking about
> how to make a car out of small stones and mossy sticks you found in
> the forest. And all the sticks are named stick_threadsafe, stick_r,
> stickMossy and the docs are filled with comments about how each stick
> cannot be used with one of the other sticks unless you compiled php
> with the sticks_ok flag. So yeah I guess my point is I agree and
> some, python(and friends) is heaven and php is that other place. Ha I
> just have to forgive and forget and move on.
>
> -Ian
>
> On 2/8/07, Mikkel Høgh <[EMAIL PROTECTED]> wrote:
>
>
>
> > Yay, that worked. For screenshotty goodness of my now-working comic
> > view method, check outhttp://www.flickr.com/photo_zoom.gne?
> > id=383998530&size=o :)
>
> > A thing about that never ceases to amaze me is how Python just works
> > in the way that seems most logical. It is just hard to unlearn the
> > complex thinking that comes from hacking PHP for years...
>
> > In any case, thank you, Ian.
>
> > On Feb 8, 9:08 pm, "Ian Wilson" <[EMAIL PROTECTED]> wrote:
> > > O right and thenhttp://example.com/comic/view/userfriendlyshould
> > > result in a call to view with comicName=userfriendly. So pretty much
> > > what you though worked does work.
>
> > > On 2/8/07, Ian Wilson <[EMAIL PROTECTED]> wrote:
>
> > > > I think you could have Comic as a subcontroller of Root with a method
> > > > view:
>
> > > > class Comic(Controller):
>
> > > > @expose(...)
> > > > def view(self, comicName=None):
> > > > """ Use comicName to find the correct comic. """
> > > > return dict(...)
>
> > > > class Root(RootController):
>
> > > > comic = Comic()
>
> > > > -Ian
>
> > > > On 2/8/07, Mikkel Høgh <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi fellow TurboGeeks,
>
> > > > > I have been working on a small webcomic aggregator in TurboGears, and
> > > > > I've made good progress so far (The project page is
> > > > > athttps://launchpad.net/parade
> > > > > and the code can be found athttps://launchpad.net/~mikl/+branch/
> > > > > parade/parade.dev (Bazaar-NG repository - if you have bzr installed,
> > > > > you can just do a bzr branch with the URI above))
>
> > > > > The only problem I have is that I cannot seem to remember the finer
> > > > > details of TurboGears controllers, and I cannot seem to find the
> > > > > documentation that I need...
>
> > > > > I want to use the /controller/action/id paradigm for URIs in my
> > > > > project, so that /comic/view/userfriendly does just that.
> > > > > So, how to proceed?
> > > > > 1) Is it enough to just create a new controller named Comic and have a
> > > > > method in that called view?
> > > > > 2) How do you pass the last bit of the URI as an argument to the
> > > > > function?
>
> > > > > I hope some of you will be able to enlighten me :)
>
> > > > > Kind regards,
> > > > > Mikkel Høgh
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---