Friday, 28 November 2014

Monday, 27 October 2014

create thumbnail on image upload in django

Django does not provide any standard way of organizing thumbnails.
Even though community has some applications to work with thumbnails, they are usually over kill if You only want to create a thumbnail for an ImageField. So here is my solution to handle thumbnails.

To hande thumbnails I over-wrote my model's save method to read original image field into a StringIO, manipulate the image and save it into a thumbnail image.
first of you need a python PIL library so first install it :

sudo apt-get install libjpeg libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev
pip install PIL 

Here is the code.

Monday, 6 October 2014

x-mvc form validation

in new x-mvc i have added form validation it is so simple and usable

reference link :

How to use

Install from npm
npm install x-mvc
Instantiate a new form_validation object


/** construct a new form_validation object passing the data array to validate
  * date array should contain a set of objects formatted as following
  * {fieldName: value}
var data = {
    name: 'foo bar',
    email: ''
var form_validation = new req.library.form_validation(data);

Saturday, 27 September 2014

a pagination module/library for node.js (x-pagination)

today i have realize that this world not enough for future data then i think we need to hire MARS or other planet .

so can not all data in one page it will more time consumption and not reliable and page will open so slow and if you have more data then page will time out so then we need a mechanism where we can handle all data smoothly and systemically that we need pagination all data will split with a limit and show in different page.
so i have developed a module that will help create pagination in node.js
this is recently cooked by me you can find this in bellow link

bellow all detail

Friday, 26 September 2014

x-image-processing a image processing package for node.js



a simple image upload and processing module in node.js
and this image processing module under development but all time it usable
So hope this library help someone like me.

this module just cooked and i know this is not better test but i will try to give more better test so if you have any idea and suggestion so you can write in comment  i will be thank full for me
this image processing inherit from node gm package but this is more usable and simple and easy to use

Any ideas are appreciated.
follow bellow link


  • image crop
  • image resize
  • image upload

x-mvc a mvc package for node.js



today i will give a small description on a recent cooked mvc package this is developed for node.js and also this is so easy just download and use it and also it development on going for more better test you can check this in -

(if you have any idea or suggestion please write in comment it is very great full for me)

this is a simple node.js mvc structure this is a extended version of just-mvc it is more better of just-mvc. in this mvc we have added more feture like:
  • create slug
  • flush message
  • more comfortable structure

Sunday, 14 September 2014

how to install perl framwork catalyst and how it work

today i will tell you how you install perl and catalyst in your linux system

first of all what is catalyst:
catalyst is a framework of perl its have some complication, in this article i will tell you how you install perl with catalyst

ok first of all install perl in your system so follow bellow command

$ sudo curl -L | bash

after perl install complete next install catalyst so follow bellow command

$ sudo cpanm Catalyst::Devel

now you have catalyst and perl so now you can test your framework so create folder perl for your project product and go to this folder and follow bellow command

Saturday, 13 September 2014

How to Export Your Data as CSV, Excell (XLS), or XLSX in python with django


today i will tell you how you will export data from database

suppose you are export a data format that only you can read or your programmer can read so it's not a good programming , a good programmer design a user interface where a baby can handle.

so give a data format where user can understand what is it and also he/she can download , that's why i choose EXCELL format and for program CSV format.

in python with django it's so simple and easy just follow bellow example

Friday, 12 September 2014

create application using mvc structure in node.js

i am come back after few days

in this days i have try to create a MVC system in node.js and after few days i have successful

i have use lot's of mvc in node but does not simple so then i have decide to developed new mvc, it simple

MVC is a nice structure in computer science in this structure anybody can create a application using small bit of coding, it's nice and reuse of code

ok what is MVC : it's just a structure
M: model
V: View
C: controller

in M(model) we will connect to database and take or manipulate data with database,
in V(view) it's only for design where programmer can define application presentation how it will look like
in C(controller) it's a heart of application where all process will done, actually C get or set data from M and M take/give data from/to database and send to C as C's requirement and C create a data structure and send it to V and V will just show it, and this is story

ok now i will define how you will follow my mvc structure

just go to your application folder from terminal and type bellow command

$ sudo npm install just-mvc

Monday, 25 August 2014

create a module in node.js

requirement will took you to invent. so if you know what your requirement then you will try to invent it.
a good programmer invent or write/hack a code one time but use again and again so today i will tell you how you create/hack a module one time for future requirement in node.js.
create a module in node.js is so easy no complication is here .

ok lets hack first of you need to create a folder "node_modules" if not exist.
in node have two keyword for package manage one "require" and another "exports" require for import a package from node module and another for export a module to app.

create a file like "new_module.js" file or anything and write your function in this file only follow bellow structure:

//your code here

Saturday, 23 August 2014

export database data to excel file in node.js with express

today i will tell you a small script that are so useful.
we have saw that maximum user want to database data store in local machine by excel,csv or other file format so today i will give a code that will create a excel file in user m/c.
ok first you need to install excel-export module in node application so goto folder from terminal where you want to create your app and type bellow command:

$sudo npm install excel-export

next create a get method where you want write excel export code and then copy bellow code in this method:

user todo list application or sample project using python with django

ok today i will tell you how create application in python using django already i have tell you that python easy and smooth and also i have tell you how you install or create a application with mysql in django in previous article:

and also i have tell you how you create or login using django default user table:

but i know you know all of this but you have any idie how you will start so today i have decide that i will tell you how you create/design a project , i give a sample project like user todo list, Already i have create this project using node.js but here i will create using python with django i think you will enjoy in this project

Wednesday, 20 August 2014

embed command prompt or terminal in website using node.js

today i will explain most interesting topic on node.js.
it is not important that you know all about computer language but if you know or feel nothing is impossible then you can do anything today i will tell you like that type of job .
this job actually how you implement or embed your server command prompt or operating system terminal in website.
if you full article then you can realize that it's so easy.
OK now start your job, first open your terminal and go to your application folder and type bellow command:

sudo npm install tty.js

Friday, 15 August 2014

image processing and manipulate in node.js with express

suppose you have milk,sugar and water but you don't know how you process a ice cream then this all stuff going to waste or no matter what resource you have, like you have image but you don't know how you process or manipulate for your requirement so
today i will tell how node.js manipulate or process a image or how you manipulate or process a image in node.js with express framework.

node have lots of image module like.

Thursday, 14 August 2014

user todo list application or sample project using node.js with express


In previous article i have told you how you install and create  a node.js application and also i have told you how you connect with database so now i will give a sample project .
here you can see how database will connect with mysql server and how we manipulate data in node.js
without practice now knowledge is enough so you need a target what you create and how you create that's why i will give a sample project where user can create signup and login and also user can create,edit and delete to do list where you can see project structure and you can idea how a node.js projects work.

so i gave you lots of chitchat and blah blah blah...... now time to work

connect mysql database with node.js with express


you have developed a app but you have not database or you dont know how to connect with database like you create a icecream but its not cool

we have lots of database engine but today i will tell you how you connect with mysql database

so today i will describe how you connect database or install mysql.

Saturday, 9 August 2014

create a application with node.js and express


today is nice day you have lot's of time so don't spend it or spoil it just do anything that will strong your skill.
so i have decide today i will discus about node.js how you create a basic app.
don't forget all project start from a basic app so if your basic and project basic is strong then project and your future not stop any how.

so question is how you will start your app already i have tolled you how you install node.js with express framework.

Wednesday, 6 August 2014

how to install node.js with express in linux/ubontu


today i will tell you a new cocktail this cocktail have already prepared just you need to shake and test if anything is missing or short then again mixed up and drink any one can develop by node who knows javascript, and every body know javascript so any one can developed. 
node.js is a javascript platform for server-side programming that allows users to build network applications quickly. By using Javascript on both the front-end and the back-end, development can be more consistent and be designed within the same system.
In this guide, i will show you how to get started with Node.js on an linux server.

now you need to install node in your system

first of all open terminal and type bellow command

Monday, 4 August 2014

how to create or register,login and manage user in django


you prepare a cocktail but no one have to drink so how to know your cocktail best or not

so today i will write how you manage,login,logout and register user

User registration and account management are universal features found in every
web application. Users need to identify themselves to the application before they can post and share content with other users. User accounts are also required for online discussions and friend networks, among many other uses. so i will focus on building features related to account registration and management, and
taking advantage of the user authentication system that comes with Django.

so now we will follow some common rules like

• Creating a login page.
• Enabling logout functionality.
• Creating a registration form.
• Enabling users to update their account information.

when i will developing the above items, then i use two important Django features:

• Template inheritance.
• The forms library.

Sunday, 3 August 2014

how to find all ip address and website crawler using python


i have try lot's of crawler in this world but not fulfil my total requirement
so i decide to create a new crawler  that find all ip address and home page and store to my folder
it's work fine but little bit slow presently i have 70,000 website in my folder in 3 days this program find all ip address all over world

first of all create a folder where your program will store and create a python file with extension (.py) then copy this to the file and save

how to get database data in django view and send to template

now i will describe how to implement model and template in a view in django

this is so easy and simple follow some rules thats all

ok now take a cocktail and start your coding

we will try to create a user page, first open file in your editor and add bellow code :

urlpatterns = patterns('',(r'^$', main_page),(r'^user/(\w+)/$', user_page),)

how create a django template


good software engineering is separate from UI and business logic

now we will try to implement template in django it nice mechanism where where your application design separate from business logic first create a folder in store folder

next open setting file and write bellow code:

import os.path
TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), 'templates'),)

this is a variable where i have set my django template path so django can access easily my template folder

Saturday, 2 August 2014

how create a model in django


model is a very important part of any framework now i will describe how create a model in django and how it work. model use for data source a model is connector between controller and database, in django connector between view and database actually django is MTV so view call a function from model module and this function is a table name . this function load respective row from database and give  row array

django create table automatic if you add your table in model then when synchronized then this all table will create in mysql database

ok now start by creating the data model for a user table, Open store/ in your editor and type the following code:

how create a besic app in django


Creating the Main Page View

A view in Django terminology is a regular Python function that responds to a page request by generating the corresponding page. To write our first Django view for the main page, we first need to create a Django application inside our project.

the following command within our store folder:

$ python startapp app

• This file for Python that app is a Python package.
• This file will contain our views.
• This file will contain our data models.

Now, create the main page view. Open the file store/ in your editor and enter the following:

how start your first django programing


this framework so easy and nice it just write little and get more

Django is an MVC framework. However, the controller is called the "view", and
the view is called the "template". The view in Django is the component which
retrieves and manipulates data, whereas the template is the component that presents data to the user. For this reason, Django is sometimes called an MTV framework (MTV stands for model template view). This different terminology not changes the fact that Django is an MVC framework, nor affects how applications are developed. But keep the terminology in mind to avoid possible confusion if you have worked with other MVC frameworks in the past

now i will create a empty project

how install python with django and mysql

this is my first blog i dont know how i will start but i will try my best

and today i will start blogging on python when i have start, first of I don't know where i will start and how i will start then i got a framework, this is nice and it is a python best framework and it is a DJANGO

and today is sunday no office, no trafic, no train, no boss and no nothing just free, anything i can do.

python and linux is the best combination, i thing it's cocktail.

so now quetions how start python with django first you need a python in your system so