ANN:Woodlog Testing

5 views
Skip to first unread message

limodou

unread,
Mar 29, 2006, 1:53:44 AM3/29/06
to django...@googlegroups.com
I'm very happy announce that woodlog (multiuser blog system is hosted
on DreamHost, it's openning and receives testing.)

You can test it, but the data may be lost, I only use it to test my project.

--
I like python!
My Blog: http://www.donews.net/limodou
NewEdit Maillist: http://groups.google.com/group/NewEdit

limodou

unread,
Mar 29, 2006, 1:56:32 AM3/29/06
to django...@googlegroups.com
On 3/29/06, limodou <lim...@gmail.com> wrote:
> I'm very happy announce that woodlog (multiuser blog system is hosted
> on DreamHost, it's openning and receives testing.)
>
> You can test it, but the data may be lost, I only use it to test my project.
>

I'm sorry that I lost the url: http://www.djangocn.org .

yml

unread,
Mar 29, 2006, 4:44:28 AM3/29/06
to Django users
hello limodou,

I was think to start developing something similar to add it to a portal
I am working on.
Of course I would have done it with a less talent than you. :-)

Are you going to open source it that I could learn from your source and
use it

Good job

limodou

unread,
Mar 29, 2006, 4:51:16 AM3/29/06
to django...@googlegroups.com

yeah. It's open source. And you can download it from :

svn address: http://cvs.woodpecker.org.cn/svn/woodpecker/zqlib/tangle/limodou/blog/trunk/blog

And the code is somewhat mess and lacks documents. :P

--
I like python!
My Blog: http://www.donews.net/limodou

My Site: http://www.djangocn.org
NewEdit Maillist: http://groups.google.com/group/NewEdit

PythonistL

unread,
Apr 5, 2006, 3:20:08 AM4/5/06
to Django users
Hello Limodou,
It looks very nice.
Can you please answer my question?
What is the file rpc.py for?
Does every user have his own blog in his directory?
And what files must every user have in his directory and which can be
common(the same )?
Thank you for your reply
L.

limodou

unread,
Apr 5, 2006, 3:23:18 AM4/5/06
to django...@googlegroups.com
On 4/5/06, PythonistL <pyt...@hope.cz> wrote:
>
> Hello Limodou,
> It looks very nice.
> Can you please answer my question?
> What is the file rpc.py for?

woodlog support xmlrpc access. So rpc.py is a xmlrpc functions congif file.

> Does every user have his own blog in his directory?

Yes. Woodlog is a multi-user blog system. But there is not user
directory, because all posts are saved in database. And every post has
a user field.

> And what files must every user have in his directory and which can be
> common(the same )?
> Thank you for your reply
> L.

So no need such directory.

--
I like python!
My Blog: http://www.donews.net/limodou

My Django Site: http://www.djangocn.org
NewEdit Maillist: http://groups.google.com/group/NewEdit

PythonistL

unread,
Apr 5, 2006, 3:52:23 AM4/5/06
to Django users
Limodou,thank you for your reply.
I am sorry but I do not fully understand your answer

You say that every user has his own blog but also that there is not
user
directory. But when I want to use my blog as a user, I have a different
URL, e.i.a directory is also different, from another user.
I would guess that every user must have a directory with some files.Or
am I wrong?

What is advantage of xmlrpc access that you implemented it?

Thank you for your reply.
L.

limodou

unread,
Apr 5, 2006, 4:01:31 AM4/5/06
to django...@googlegroups.com
On 4/5/06, PythonistL <pyt...@hope.cz> wrote:
>
> Limodou,thank you for your reply.
> I am sorry but I do not fully understand your answer
>
> You say that every user has his own blog but also that there is not
> user
> directory. But when I want to use my blog as a user, I have a different
> URL, e.i.a directory is also different, from another user.
> I would guess that every user must have a directory with some files.Or
> am I wrong?

Because url can be create dynamicly, so every user can have different
url, just like:

http://djangocn.org/blog/limodou
http://djangocn.org/blog/pythonlist

And in django, I saved almost everything in database. All posts store
in Entry table, and they can be grouped by user field. So if I want to
show all posts of a user, I can:

posts = user.entry_set.all()

>
> What is advantage of xmlrpc access that you implemented it?
>

There are some xmlrpc apis used in blog system, just like bloggerAPI,
metaweblogAPI, and woodlog supports these standard xmlrpc api, so you
can edit your blog in an offline blog editor, and you don't need to
open a browser and sign in the blog system to edit your post. Using
these tools, you can also easily backup your blog. And these apis also
can be used in other purposes.

> Thank you for your reply.
> L.
>

PythonistL

unread,
Apr 5, 2006, 4:20:12 AM4/5/06
to Django users
Limodou,
Thanks for replies.
I am also working on a application that more users should be used by.
So, I would like to learn a little more how to create
url dynamicly( on fly). Can you please let me know where in you
file(s) you make that.
Thanks a lot
L.

limodou

unread,
Apr 5, 2006, 4:31:39 AM4/5/06
to django...@googlegroups.com
On 4/5/06, PythonistL <pyt...@hope.cz> wrote:
>

First you should define url pattern in urls.py, just like:

in ursl.py you will find:

(r'^blog/(?P<user_name>.*?)/', include('apps.woodlog.urls')),

and in apps/woodlog/urls.py you will find:

urlpatterns = patterns('',
(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<object_id>\d+?).html$',
'apps.woodlog.views.detail'),
(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$',
'apps.woodlog.views.day'),
(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/$', 'apps.woodlog.views.month'),
(r'^/?$', 'apps.woodlog.views.index'),
(r'^categories/(?P<category>\w+)/?$', 'apps.woodlog.views.view_category'),
(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<object_id>\d+?).html/addcomment/$',
'apps.woodlog.views.add_comment'),
)

So from two level url parsing, you will get 'username' and other
parameter. And you can process username in your view code, just like:

def index(request, user_name):
try:
user = User.objects.get(username=user_name)
except ObjectDoesNotExist:
return Http404(), "Doesn't exist this user!"
objects = user.entry_set.entries()
page = Page(request, objects, paginate_by=__get_paginate_by(user),
urlprefix=get_app_root('blog') + '/' + user_name + '/')
context = RequestContext(request, {'page':page, 'blog_id':user_name})
return theme_render_to_response('woodlog/list', user,
context_instance=context)

So the user is retrieved from User model according to username. And
later, I pass the user_name as 'blog_id' in RequestContext, so I can
use the 'blog_id' variable in template.

In templte just like woodlog/list, you can use 'blog_id' to create your url:

<a href="/blog/{{ blog_id }}">{{ blog_id }}</a>

That's all.

PythonistL

unread,
Apr 5, 2006, 4:45:13 AM4/5/06
to Django users
Limodou,
Thanks a lot for your help.
Now I understand much better.
Best regards,
L.

limodou

unread,
Apr 5, 2006, 4:47:12 AM4/5/06
to django...@googlegroups.com
On 4/5/06, PythonistL <pyt...@hope.cz> wrote:
>

You are welcome.

PythonistL

unread,
Apr 5, 2006, 5:32:17 AM4/5/06
to Django users
Limodou,
Thanks a lot for the explanation and help.
Best regards,
L.

Reply all
Reply to author
Forward
0 new messages