This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. | |
****truncate foreign key constrained table**** | |
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE table1; | |
SET FOREIGN_KEY_CHECKS = 1; | |
2. | |
**** Create SSH Key **** | |
ssh-keygen -t rsa -C "[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NB: No need to assign STATICFILE_DIRS before commanding collectstatic | |
1. create project using django-admin.py startproject project | |
2. /project | |
pip install gunicorn | |
3. gunicorn project.wsgi:application #this is for dev and the server dies once you break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smtplib | |
import MySQLdb | |
import datetime | |
from datetime import date | |
# from datetime import datetime | |
from datetime import timedelta | |
import time | |
import os | |
import logging | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BRANCH_ID={'btech_CSE':'b1', | |
'btech_ETC':'b2', | |
'btech_EEE':'b3', | |
'btech_IT':'b4', | |
'mtech_CSE':'A1', #I don't really know what it is | |
'faculty':'FP' # i have no clue kya hai iska. i will do that | |
} | |
class DoesNotExistError(Exception): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "this is a test file" |
NewerOlder