2

Is there any lightweight mvc webframework which is not necessary to install to the server? I need something simple, that i could just copy to the shared hosting. And it must handle urls other that localhost/test.py, something like this localhost/Blog/test

2
  • A web framework that's not installed on the web server? How would that even work? What kind of magic are you looking for? Please provide some details on how server-side software is not installed on the server. Commented May 17, 2010 at 19:35
  • Shared hosting? Does this shared hosting even support Python? Commented May 17, 2010 at 19:38

4 Answers 4

4

You should probably check out Flask or Bottle, two nice Python microframeworks. With an appropriate "main" Python script (to initialize your app and dispatch requests to it) and mod_rewrite rules in place, you can probably get pretty close to your goal of "just copy[ing] to the shared hosting" with nice URLs.

Flask has good documentation on deploying via CGI, which is what you might have to use on your shared host. (If your host supports FastCGI or mod_wsgi, those deployment options would be preferable.)

Sign up to request clarification or add additional context in comments.

2 Comments

What they can do in the way of rewrite rules or otherwise really depends on what type of shared hosting they have. Cheap crappy shared hosting doesn't often give you ability to do rewrite rules. In other words they will get what they pay for and if they are cheap, their options in respect of clean URLs could be quite limited as could the actual hosting options, with the worst being they may be stuck with just CGI.
Most dirt-cheap hosting (e.g. Dreamhost) I've run into in the last few years has allowed mod_rewrite rules via .htaccess files, so I thought it was likely that the OP would have access to the same. And I agree, it seems likely to me that they'll be stuck with plain old CGI.
3

Checkout web2py. Seems to be about the simplest python based webserver I can think of.

Django might do, it's hefty, but it comes with it's own development server.

Comments

2

web2py includes everything (ssl-enabled web server, sqlite sql based transaction safe database, web based Integrated Development Enviroment, web based database interface) in one package. The web2py binaries for windows and mac also include Python itself. web2py does not require configuration or installation and can run off a usb drive. It was originally developed as a teaching tool for MVC.

Comments

1

checkout https://github.com/salimane/bottle-mvc or https://github.com/salimane/flask-mvc . They are boilerplates that could get you started with controllers, models in separate folders. They are based on bottle and flask micro frameworks, no useless features, they give you the flexibility to plugin whatever modules you want.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.