DEV Community

krishnaa192
krishnaa192

Posted on

Creating google app password (for django project)

Previously we had feature to use your gmail password directly to your project as a host password in settings.py.Last year google have updated its privacy terms and discontinued this feature.
Now we need to create a specific passwords to avail such feature,in short your host password would be of 16 chars.

I will tell you steps to generate an app password that you can use in django projet.

  1. Visit your Google Account security page.
  2. In the 2-Step Verification box, click Settings (if there is no settings link, you may want to create a new one. you can skip step 3 & 4).

  3. Click the tab for App-specific passwords.

  4. Click Manage your application specific passwords.

  5. Under the Application-specific passwords section, enter a descriptive name for the application you want to authorize, such as “”Django gmail”” then click Generate application-specific password button.

  6. note down the password. for example: "krishnapass"![password][1]

After finishing pervious steps,update your settings.py of your django project....

_EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'your-username@gmail.com'
EMAIL_HOST_PASSWORD = 'Application spectific password(for eg:krishnapass)'
EMAIL_PORT = 587
EMAIL_USE_TLS = True_

``




Enter fullscreen mode Exit fullscreen mode

Top comments (0)