Posts

Showing posts from January, 2020

How to Set up virtual environment in pycharm

First of all, create a virtual environment in your local system open your folder and go to your path in Command promt day-1> virtualenv gmenv or For Specified Version-   virtualenv env_name --python==python3.6 To activate the Virtual environment in terminal use source ./env_name/bin/activate then Successfully created Then Go to pycham and to settings to inseide project and selecte project interperter Next you can see the Settings symbol, Then click on that symbol and ADD Select Existing environment and your virtual env path and click on ok. Done, Thanks 

How to Create cornTab for Django Applcation

referance link: https://medium.com/@harishoraon/writing-your-first-cron-job-in-django-ed62b805d822 https://pypi.org/project/django-crontab/

How to Scheduled tasks on server using Corn Job

As we know, Cron Jobs are nothing but Scheduled tasks in software environment which will be running at a specified frequency. Examples: Sending notifications to the users. Sending registered users list to the specified email id..etc. Writing Cron Jobs are different in Cloud Servers than writing in Shared hosting. In Shared hosting, you have options to add Cron Jobs in Cron Job Manager. You can see this option in Cpanel from the Shared Hosting providers. In Cloud servers, we have to work with CLI (Command Line Interface) to write Cron Jobs. Here I am going to explain the simple steps to write your own Cron Jobs on AWS EC2 Server. a.   First, you have to Log in to your AWS EC2 instance b.   Run the below command     $ crontab -e When you run   Crontab   command for the first time you will get some of the existed editors options to open   /bin/ed   /bin/nano   /usr/bin/vim.basic   /usr/bin/vim.tiny Choose 1-4?...

How to Add Loggin

Add in your Setting.py LOGGING = {     'version': 1,     'disable_existing_loggers': False,     'formatters': {         'console': {             # exact format is not important, this is the minimum information             'format': '%(asctime)s %(name)-12s %(levelname)-8s %(message)s',         },     },     'handlers': {         'file': {             'level': 'INFO',             'class': 'logging.FileHandler',             'filename': 'loggers.log',             'formatter': 'console...

How to Download Any New Released Movies

I am Showing now on Desktop:

How To Install and SetUp Visual Studio (IDE) and NodeJs and NPM

First, install the Visual Studio IDE for ForntEnd Code Editor (Visual studio is flexible for Frontend Technologies) How To Install Visual Studio On System? To download Visual Studio - https://code.visualstudio.com/Download If prompted, click on Save File.  After the file downloads, open your terminal and go to the Downloads folder.  $ cd ~/Downloads  Next, run this command to install the Visual Studio Code. sudo dpkg -i code_1.26.0-1534177765_amd64.deb  Close the terminal.  Visual Studio Code is now installed. How To Install and SetUp NodeJs and NPM  go through the link and download  - https://nodejs.org/en/ Once download done, open, and click on next... after they need to add some packages so allow auto-download  and it takes 20 to 30 mins(based on the internet) after open cmd - type npm install after the check version: npm -v (here you can find successfully install or not. if version show then install otherwise please do proper setup)...

how to push code on github

 git stash - Saved working directory git stash pop - get Back Saved working directory git checkout -b refactor/venkat_TraineeAttendanceReportView ( to Create new Branch) git status ( To check that stutus) git add -u git commit -m "msg" git push origin refactor/venkat_TraineeAttendanceReportView
venkatasivaramireddy@LAPTOP-TE1TH4G9 MINGW64 ~/Desktop $ cd lms venkatasivaramireddy@LAPTOP-TE1TH4G9 MINGW64 ~/Desktop/lms $ cd lms venkatasivaramireddy@LAPTOP-TE1TH4G9 MINGW64 ~/Desktop/lms/lms (enhancement/card-31540754_venkat_automate_review) $ git stash Saved working directory and index state WIP on card-31540754_venkat_automate_review: 998412d change in requiremwnts.txt venkatasivaramireddy@LAPTOP-TE1TH4G9 MINGW64 ~/Desktop/lms/lms (enhancement/card-31540754_venkat_automate_review) $ git checkout enhancementcard-31558461_review_json error: pathspec 'enhancementcard-31558461_review_json' did not match any file(s) known to git venkatasivaramireddy@LAPTOP-TE1TH4G9 MINGW64 ~/Desktop/lms/lms (enhancement/card-31540754_venkat_automate_review) $ git fetch origin Enter passphrase for key '/c/Users/venkatasivaramireddy/.ssh/id_rsa': remote: Enumerating objects: 34, done. remote: Counting objects: 100% (34/34), done. remote: Compressing objects: 100% (17/17), done. remote: ...

How to Generat SSH Key & SetUp In gitHub - Step By Step Procedure SSH Key

venkatasivaramireddy@LAPTOP-TE1TH4G9 MINGW64 ~/Desktop $ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/c/Users/venkatasivaramireddy/.ssh/id_rsa): /c/Users/venkatasivaramireddy/.ssh/id_rsa already exists. Overwrite (y/n)? y Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /c/Users/venkatasivaramireddy/.ssh/id_rsa. Your public key has been saved in /c/Users/venkatasivaramireddy/.ssh/id_rsa.pub. The key fingerprint is: SHA256:mScWwMD1XeqPT8Oqu/m2TV7hVvmcpxH53V2jHv2XjzI vennavenkat147@gmail.com The key's randomart image is: +---[RSA 4096]----+ |   ..+o     .    | |    . .o . o     | |        o o      | |         =     ..| |        S o...

How to Connect Django With PostgreSql / Mysql / Oracel Database

How to Connect Django With PostgreSql Database: Before need to Download: PostgreSql ( download ) and PG Admin- Download ( To view Data We use This Software) Install psycopg2 Package in your virtual environment or Command Prompt ( Using  pip install django psycopg2) Goto your settings.py in your django project and add DATABASES = {     'default': {          'ENGINE': 'django.db.backends.postgresql_psycopg2',          'NAME': 'postgres',          'USER': 'postgres',          'PASSWORD': 'password,          'HOST': 'localhost',          'PORT': '5432',      } } cd ~/myproject  python manage.py makemigrations  python manage.py migrate After creating the database structure, we can ...

How Many Ways to Upload into GitHub

Using Pycharm

How To Add New Python Interpritor / Virtual enivorment In Pycharm

go to Settings - File | Settings | Project: go to python Interpriter in Python Interpriter, On Letf Set You will Find Settings symboll click and ADD go to Exisitng Enivironment and add the path As you created VE and clikc on ok 

Creating Virtual Enivironment

Creating Python virtualenv in Windows FIrst go to Path You want install VE C:\Users\venkatasivaramireddy>cd Desktop C:\Users\venkatasivaramireddy\Desktop>cd C:\Users\venkatasivaramireddy\Desktop>cd django-google-maps-master C:\Users\venkatasivaramireddy\Desktop\django-google-maps-master>virtualenv env C:\Users\venkatasivaramireddy\Desktop\django-google-maps-master>virtualenv --version 16.7.9 C:\Users\venkatasivaramireddy\Desktop\django-google-maps-master>cd env C:\Users\venkatasivaramireddy\Desktop\django-google-maps-master\env>cd Scripts C:\Users\venkatasivaramireddy\Desktop\django-google-maps-master\env\Scripts>activate (env) C:\Users\venkatasivaramireddy\Desktop\django-google-maps-master\env\Scripts> pip install -r requirement.txt   ....................................................... If python is installed in your system, then pip comes in handy. So simple steps are: 1) Install virtualenv using > pip install virtualenv 2)Now ...