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
I'm sorry that I lost the url: http://www.djangocn.org .
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
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
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
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.
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.
>
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.