Tuesday, July 1, 2014

How to install cosmos framework

The framework is uploaded to python package index to make it simple to install as library. It is recommended that you use virtualenv, but it is not required.

First create a virtualenv and activate it:

virtualenv --no-site-packages testenv
source testenv/bin/activate
Now install cosmos inside it:
pip install cosmos
A console script named cosmosadmin has now been created for administration tasks. Run new-project command from console from any directory to create new project:
cosmosadmin new-project

The app folder is the root of the webserver in the create project by default. Index page is mapped to serve templates/index.html with current_user passed to it. The /service/* endpoint is mapped to the service handler. You may look into endpoints.py for other endpoints.

After creating the project change the values in the settings.py file (or create a new file named local_settings.py nad add it to your .gitignore file- so this settings does not end up in the source repository) for the database and create admin user:

python cosmosmain.py new-admin
Now start the project:
python cosmosmain.py start-service
And browse to http://localhost:8080/ to see the start page.

8 comments:

  1. Replies
    1. IEEE Final Year Project centers make amazing deep learning final year projects ideas for final year students Final Year Projects for CSE to training and develop their deep learning experience and talents.

      IEEE Final Year projects Project Centers in India are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation.

      corporate training in chennai corporate training in chennai

      corporate training companies in india corporate training companies in india

      corporate training companies in chennai corporate training companies in chennai

      I have read your blog its very attractive and impressive. I like it your blog. Digital Marketing Company in Chennai

      Delete
  2. I have been reading for the past two days about your blogs and topics, still on fetching! Wondering about your words on each line was massively effective. Techno-based information has been fetched in each of your topics. Sure it will enhance and fill the queries of the public needs. Feeling so glad about your article. Thanks…!
    best software testing training in chennai
    best software testing training institute in chennai with placement
    software testing training
    courses

    software testing training and placement
    software testing training online
    software testing class
    software testing classes in chennai
    best software testing courses in chennai
    automation testing courses in chennai

    ReplyDelete