Posts

How to Send FormData from AJAX and Jquery

$("form#frm").submit(function(event){       event.preventDefault();               //var formData = $('.frm_coupon').serialize();         var formData = new FormData($(this)[0]);                 $.ajax({                    url:'index.php?ajax',                    processData: false,                    contentType: false,                    type: "POST",                   data:formData,                   success:function(res){                             console.log(res);                   }               });             return false;     });

Migrate Table Database in Django

First need to create Model in model.py like class Person ( models . Model ): first_name = models . CharField ( max_length = 30 ) last_name = models . CharField ( max_length = 30 ) the run command a.) python manage.py makemigrations b.) python manage.py migrate

How to use Mysql in Django

1.) Edit your settings.py file like: DATABASES = { 'default' : { 'ENGINE' : 'django.db.backends.mysql' , 'NAME' : 'DB_NAME' , 'HOST' : '127.0.0.1' , 'PORT' : '3306' , 'USER' : 'root' , 'PASSWORD' : '' , }} 2.) (a). sudo apt-get install libmysqlclient-dev      (b). pip install MySQL-python  That's it!! you have configured Django with MySQL in a very easy way. Now run your Django project: 3.) python manage.py migrate 4.) python manage.py runserver

Push Data in your GitHub Repository from your system

 Follow the below instruction. a.) git init b.) git add .    or  git add -A        or     git checkout -b <new-branch> c.) git commit -m 'finish' d.) git push origin master

Pulling Data from GitHub

You need to make clone of your Repository on your system. follow the below instruction. a.) git clone https://github.com/developer-rameshraj/Mean-Stack.git < folder-name > b.) cd < folder-name > c.) git init d.) git pull
1.) Pulling Data from GitHub you need to make clone of your Repository on your system. follow the below instruction. a.) git clone https://github.com/developer-rameshraj/Mean-Stack.git < folder-name > b.) cd < folder-name > c.) git init d.) git pull 2.) Push Data in your GitHubRepository from your system. follow the below instruction. a.) git init b.) git add .    or  git add -A          or     git checkout -b <new-branch> c.) git commit -m 'finish' d.) git push origin master 3.) How to Install Ruby On Rails 4.) How to Use Mysql in Django  1.)  Edit your  settings.py  file like: DATABASES = { 'default' : { 'ENGINE' : 'django.db.backends.mysql' , 'NAME' : 'DB_NAME' , 'HOST' : '127.0.0.1' , 'PORT' : '3306' , 'USER' : 'root' , 'PASSWORD' : '' , }} 2.) (a).  sudo apt-get ins