Railsfactory Blog
WebNotes Meta-Data Driven Framework

WebNotes Meta-Data Driven Framework

Introduction to Webnotes Framework

Webnotes Framework is a metadata web application framework that is build on Python and Javascript that helps you build database driven applications at ease using a simple GUI. It helps you create web applications without having to code much (unlike any other frameworks) as It includes an Object-Relational Mapper, Meta-data modelling, Role based permission structure, Form Rendering, Report Builder, Built-in AJAX, navigation widgets and a rich admin / development web interface for creating all the necessary elements of your web app.

How is wnframework different from Django or any other Framework?

WebNotes Framework is tightly integrated with the front-end, In Django or any other framework the views are generated on the server-side and then sent to the browser but in wnframework, the views are rendered in the browser.

  • It contains a very rich development web interface hence an entire application can be built from the browser
  • It automates a lot of tasks so that you have to write minimum code
  • It has an built-in Role based Permission structure
  • It has a built-in Report Builder with filters and column picking.

Features of WebNotes Framework

  • It is a pure meta-data framework, not based on templates that most frameworks support, taking automation to the next level
  • It has back-end and front-end integrated with built-in AJAX
  • It has more out-of-the box features
  • It is extremely light weight and runs on Apache-CGI

Now lets Install WebNotes Framework and Get Started

Installation of Pre-requisites
First, we need to install the following pre-requisites.

  1. Apache2
  2. MySQL
  3. PhpMyAdmin (optional)
  4. Python
  5. MySQL-Python (connector)
  6. Python-setuptools to do the easy_install for pytz
  7. Install PYTZ
  8. Install PIL (optional)
  9. Subversion

sudo apt-get install apache2 libapache2-mod-php5 mysql-server php5-mysql phpmyadmin python2.6 python-mysqldb python-setuptools subversion
sudo easy_install –upgrade pytz
sudo apt-get install python-imaging

Then Setup an Apache Virtual Host for WNF

Open a terminal and enter the following commands 1 sudo gedit /etc/hosts
Example :
127.0.0.1 localhost.localdomain localhost webnotes.rf

Add cgi handler and ExecCGI in the options directive
sudo gedit /etc/apache2/sites-available/default

Example :
Options ExecCGI Indexes FollowSymLinks MultiViews
AddHandler cgi-script .cgi
# AllowOverride None
Order allow,deny
allow from all

Add index.cgi to the directory index
sudo gedit /etc/apache2/mods-available/dir.conf

Example :
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm

Browse into the root of your web directory

Download the source for WebNoteFramework
svn checkout -r 1340 http://wnframework.googlecode.com/svn/trunk/v170/

Browse to where you want the source files for the modules to be and download the source:
svn checkout -r 138 http://wnframework-modules.googlecode.com/svn/trunk/
(run the above command twice if you have any issue after checking out)

Now we need to edit defs file
sudo gedit v170/cgi-bin/webnotes/defs

Change the root password for mysql
# root
root_login = ‘root’
root_password = ‘root’

After editing the defs file, save it and exit

Copy the defs file defs.py
sudo cp v170/cgi-bin/webnotes/defs v170/cgi-bin/webnotes/defs.py

Browse into cgi-bin directory of the wnframework
cd /var/www/v170/cgi-bin

Change to Python shell mode
$python

Enter the following commands
import webnotes
import webnotes.db
import setup
setup.import_db(‘Framework’,’s3u001′)
setup.create_account_doctype()

Exit the python shell mode by Ctrl+d

Edit the modules path in defs.py
sudo gedit v170/cgi-bin/webnotes/defs.py

Find the line modules_path
modules_path = ‘/var/www/trunk’
note : Also notice there is lines to configure a path for a log and what you want to log commented out in the defs.py file. You can uncomment this and configure it to meet your needs. The possible options for log information is commented as well.

To install some essential modules

Browse into cgi-bin directory of the wnframework
cd /var/www/v170/cgi-bin

Change to Python shell mode
$python

Enter the following commands
01 import webnotes
02 import webnotes.db
03 webnotes.conn = webnotes.db.Database(use_default=1)
04 from webnotes.utils import app_manager
05 app = app_manager.AppManager(”)
06 app.create_apps(1, ‘Framework’)
07 from webnotes.modules import import_module
08 webnotes.set_as_admin()
09 import_module.import_from_files([‘System’])
10 import_module.import_from_files([‘Roles’])
11 import_module.import_from_files([‘Application Internal’])
12 import_module.import_from_files([‘Setup’])
[Note: if you get any error while importing the above modules, run this command again svn checkout http://wnframework-
modules.googlecode.com/svn/trunk/ (checkout again because you might have missed few files)]

Exit the python shell mode by Ctrl+d
To avoid forwarding to the erpnext.com site.Browse into cgi-bin directory of the wnframework
cd /var/www/v170/cgi-bin

Change to Python shell mode
$python

Enter the following commands
1 import webnotes
2 import webnotes.db
3 webnotes.conn = webnotes.db.Database(use_default=1)
4 webnotes.conn.begin()
5 webnotes.conn.set_value(‘Control Panel’, None,’sync_with_gateway’, 0)
6 webnotes.conn.commit()

Exit the python shell mode by Ctrl+d

Start the apache webserver and go to your browser:
Restart your web server, Enter the url http://webnotes.rf/v170/.

Enter your login details
User Name : Administrator
Password: Admin

как увиличить половой член

гугл реклама на сайт

александр лобановский

макияж глаз

продвижение это

артмани

Your Header Sidebar area is currently empty. Hurry up and add some widgets.