开发者

Review Website In Python. Is django right for this?

Basically, I misread this but would still really appreciate some assurance. I recently came across the django tutorial (http://djangotutorial.com) and have fell in love with the framework. I have a website that is simply ran on wordpress and a simple plugin at the moment at http://runningshoesreview.org.

I've been wanting to do many things, such as allow users to add their own reviews, talk to eachother, comment, etc. Naturally, I see django as a perfect f开发者_如何转开发it until I came across this:

"It’s not intended to be a public interface to data"

It's was referencing the django admin section, I think. Can someone tell me if django is what I need for this task?

Thanks,

Cody


The Django admin is for administrator use only. You could use this for moderation and general admin tasks.

You would create a different interface using django for your users. Django would be a great framework for your app. I'm developing a service with it now.

There are other great frameworks out there too. CakePHP & Code Igniter for PHP, and Ruby on Rails. There is no one best framework but people tend to pick one and stick with it, so use the one that uses the language you like best and offers the features you need/want.


Django provides an automatically generated admin interface for your models. For your blog you can use this admin interface to create new posts, moderate comments and so on.

However, you should not allow your users to access this interface for security reasons, so when you want normal users to create comments, you should simple provide a form for them to enter the comment (see the form handling section in the documentation).

And yes, django is suited great for blogs and things like that. However you should keep in mind that django is a framework for creating web applications and not a ready-made web application. However, if you are a developer, you will like the tools django offers you and you will be able to create individual web applications quickly...

Maybe you should also take a look at some django examples (I think there are also some blog examples) and see if you understand the source. Here is for example the source of the blog running at djangoproject.com


Read the first few chapters of The Django Book to give you an idea of how Django works - won't take you long and will open your eyes to the possibilities.


Django is a general-purpose framework and is perfectly fine for your intended uses, although probably an overkill, since adding these features to WordPress is likely simpler, especially if your host doesn't support Python and you'd have to move hosts.

As for the comment you quotes, it simply means that you shouldn't let normal users muck around with admin controls.


The django admin area is a backend, an area you have to login first. So it's not the typical website approach for a public review site. After a user logs in you can restrict the database access (=model editing) to certain parts, but you can't avoid people DROPing the whole content of smth. they have access to. There is nothing in the backend that lets you setup some kind of website feeling (navigation structure, e.g.).

Take a CMS with lots of plugins available if it's really just about chat, comments and votes. They all should allow you to add the thin layer of development ("glue") where needed, be they Typo3, Drupal, Joomla, even Wordpress.

Take a look at http://djangosites.org - some of them even offer complete source code...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜