I'm assuming you have some query from where you take the posts.
In the select part there's a parameter orderby. To give it to sort it in
reverse order just write the sign ~ in front of the orderby parameter.
example
db(some_query).select(db.table.ALL, orderby = ~db.table.field)
regards
mmlado
You can do something with the auth class.
Here some tutorial about it.
http://mdp.cti.depaul.edu/examples/default/tools
You can expose only functions for login/logout. Create a user by hand, through
web2py admin.
Then create controllers/functions that requires authorization.
For the safety... it should be enough safe for a blog. :)
Nothing is safe on the internet, theres always someone who can hack it.
The only question is: is it worth to hack it. :)
regards
mmlado
Yes there are. If you need more from the authorization you can expose those
too, or all of them if you want to allow registration on the blog.
Usually I work on things where registration isn't good thing, and I need only
login and logout.
If you want all the functions:
def user(): return dict(form = auth())
or some of them:
def login(): return dict(form = auth.login(next=URL(r=request, f="index")))
def logout(): return dict(form = auth.logout(next=URL(r=request, f="login")))
#any other function you need...
regards
mmlado
For the html editor, wouldn't know to recommend.
When you got the post for the blog, just put it into XML() helper. Like:
XML(post) This way it won't be escaped.
regards
mmlado
You'll need to add html for formating in the view. You can also add the XML
helper if you want to have html code in the post. Like:
{{for post in posts:}}
<div>
<h1>{{=post.titel}}</h1>
<p>{{=post.time}}</p>
<p>{{=XML(post.post)}}</p>
</div>
{{pass}}
regards
mmlado
Phynthon (is it your name or nick? :-P),
You can use wiki syntax, but if you want to edit as in a WYSIWYG you
can add a javascript library that do this for you: transform a
textarea in a full-featured text formatter and return HTML code to
you.
See NicEdit: http://www.nicedit.com/
It is very simple and do what you want (if you do not want wiki).
--
Álvaro Justen
Peta5 - Telecomunicações e Software Livre
21 3021-6001 / 9898-0141
http://www.peta5.com.br/