It might be a time consuming and headache to build admin page for website. But the case is so cool with Django :-). I started with Django because I like python language. But its so amazing that you can build some pretty cool things in short span of time.It was a little difficult to start with it,but in my experience its pretty easy thing once you used with it.
Below is the tutorial I followed to build the admin page.
http://www.djangobook.com/en/2.0/chapter06.html
Saturday, April 16, 2016
Tuesday, April 12, 2016
Models in Django to create tables
How to connect Mysql database to Django
manged to install mysql database in ubuntu and created some tables using Models in Django.
Below online book is really helpful to master Django- http://www.djangobook.com/en/2.0/chapter05.html
models.py:
Mysql:
manged to install mysql database in ubuntu and created some tables using Models in Django.
Below online book is really helpful to master Django- http://www.djangobook.com/en/2.0/chapter05.html
models.py:
Mysql:
Friday, April 8, 2016
Apache Spark installed in Ubuntu
I am not sure much uses of Apache Spark. But thought of installing and play around .
https://www.mapr.com/blog/game-changing-real-time-use-cases-apache-spark-on-hadoop
Successfully installed Apachespark in Ubuntu using the below blog instructions.
http://blog.prabeeshk.com/blog/2014/10/31/install-apache-spark-on-ubuntu-14-dot-04/
This is the beauty of Open Source softwares, you can install it and play around it ..and contribute for the project.
For more details - http://spark.apache.org/
examples - http://spark.apache.org/examples.html
https://www.mapr.com/blog/game-changing-real-time-use-cases-apache-spark-on-hadoop
Successfully installed Apachespark in Ubuntu using the below blog instructions.
http://blog.prabeeshk.com/blog/2014/10/31/install-apache-spark-on-ubuntu-14-dot-04/
This is the beauty of Open Source softwares, you can install it and play around it ..and contribute for the project.
For more details - http://spark.apache.org/
examples - http://spark.apache.org/examples.html
Tuesday, April 5, 2016
sqllite3 commands in Ubuntu Shell
How to install and use Sqllite3 in Ubuntu:
Its quite easy to install sqllite3 in Ubuntu using 'apt-get install sqlite3'
naveen@naveen-Inspiron-7352:~/mysite$ sqlite3 mydb
SQLite version 3.8.2 2013-12-06 14:53:30
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .databases
seq name file
--- --------------- ----------------------------------------------------------
0 main /home/naveen/mysite/mydb
sqlite> exit
...> exit()
...> create table employee(id integer,name TEXT );
Error: near "exit": syntax error
sqlite> create table employee(id integer,name TEXT );
sqlite> insert into employee(1,'naveen');
Error: near "1": syntax error
sqlite> insert into employee values (1,'naveen');
sqlite> ;
sqlite> select * from employee
...> ;
1|naveen
sqlite> .exit
Its quite easy to install sqllite3 in Ubuntu using 'apt-get install sqlite3'
naveen@naveen-Inspiron-7352:~/mysite$ sqlite3 mydb
SQLite version 3.8.2 2013-12-06 14:53:30
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .databases
seq name file
--- --------------- ----------------------------------------------------------
0 main /home/naveen/mysite/mydb
sqlite> exit
...> exit()
...> create table employee(id integer,name TEXT );
Error: near "exit": syntax error
sqlite> create table employee(id integer,name TEXT );
sqlite> insert into employee(1,'naveen');
Error: near "1": syntax error
sqlite> insert into employee values (1,'naveen');
sqlite> ;
sqlite> select * from employee
...> ;
1|naveen
sqlite> .exit
Django Login Page
After the struggle of 2 days :-), I succeed to create login page in Django with sqllite3. First we need to set up sqllite .. visit this site for more details http://www.saltycrane.com/blog/2007/11/django-project-2-sqlite-setup/
The other issue was , I was keep on getting the 'CSRF cookie not set'. I managed to exempt the CSRF using below technique, but its better use CSRF. http://stackoverflow.com/questions/22812721/why-do-i-get-csrf-cookie-not-set-when-post-to-django-rest-framework
and finally my login page worked !!!!!!!!!!!!
The other issue was , I was keep on getting the 'CSRF cookie not set'. I managed to exempt the CSRF using below technique, but its better use CSRF. http://stackoverflow.com/questions/22812721/why-do-i-get-csrf-cookie-not-set-when-post-to-django-rest-framework
and finally my login page worked !!!!!!!!!!!!