Simplate awereness

58 views
Skip to first unread message

Jussi Arpalahti

unread,
Apr 23, 2012, 7:43:14 AM4/23/12
to aspen-users
Hi.

Decided to take new Aspen version for a spin. I have to say it was a delight to rapidly develop my project. Documentation was for the most part top notch. I think the JSON simplate might be the best way to develop a Javascript only, client side web app. JSON API with REST kind of naturally flows with the filesystem paradigm. And your hard work with Unicode support seems to have paid off, since I did not see any problems in my testing. Even when I managed to put garbled characters in Redis, Aspen printed it out without hiccups (still garbled, but correction algorithm for this can't be done).


About the only thing I found myself wanting was the way to know about application structure. When printing out URLs to other parts of the app I like to use a central registry where url identifiers are mapped to actual url paths. In Django this means named url in the urls.py, If urls change, I don't have to change every template and view. The relevant Django docs: https://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-patterns

Perhaps the website object (http://aspen.io/api/website/) would be a place to store this information? I don't mind updating some Python module myself, but it would be nice if Aspen would discover app's simplates by itself and give me a way to get information about them. Otherwise what I am probably asking is how to get my module in all Simplates namespace by default?


Also, the one minor gripe with the docs I alluded above has to do with the trash docs:
http://aspen.io/thrash/

It seems the new way is to start Aspen like this: thrash aspen --changes_kill=yes

Also, with the 0.16.7 version, changes_kill there is a bug. This is the error I get:

AttributeError: 'Website' object has no attribute 'dotaspen'

I'll try to create a Github issue if I manage to locate my password... :(

And thank you for Aspen. Really.


Jussi

Chad Whitacre

unread,
Apr 23, 2012, 10:02:47 AM4/23/12
to Jussi Arpalahti, aspen-users
Jussi,

Thanks for revisiting Aspen and for the kind words! Glad we're making progress. :-)


About the only thing I found myself wanting was the way to know about application structure. When printing out URLs to other parts of the app I like to use a central registry where url identifiers are mapped to actual url paths. In Django this means named url in the urls.py, If urls change, I don't have to change every template and view. The relevant Django docs: https://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-patterns

Perhaps the website object (http://aspen.io/api/website/) would be a place to store this information? I don't mind updating some Python module myself, but it would be nice if Aspen would discover app's simplates by itself and give me a way to get information about them.

Yes! I've wanted something similar, not for named urls but for generating nav trees, category pages, RSS feeds, things like that. This won't make it into 1.0 but I've started collecting design notes here:


If you have additional use cases or API suggestions feel free to add there or discuss here.

 
Otherwise what I am probably asking is how to get my module in all Simplates namespace by default?

You can add objects to the request.context dictionary in an inbound hook. See the http://aspen.io/ source for an example:



It seems the new way is to start Aspen like this: thrash aspen --changes_kill=yes
Also, with the 0.16.7 version, changes_kill there is a bug.

Yeah, sorry, I introduced some regressions w/ restarting/reloading in 0.16. :-( 

That's a major ticket for 1.0:


The workaround is to manually Ctrl-C. Gross, I know ... :-(



chad







Jussi

--
You received this message because you are subscribed to the Google Groups "aspen-users" group.
To post to this group, send email to aspen...@googlegroups.com.
To unsubscribe from this group, send email to aspen-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/aspen-users?hl=en.

Reply all
Reply to author
Forward
0 new messages