India Today Astrology App

Overview

India Today Astrology App

Introduction

This repository contains the code for the Backend setup of the India Today Astrology app as a part of their recruitment process for internship.

Please find the code migrated to Node.js in the Node Code folder.

Relevant Links

Table Of Content

Development Environment

- python version: python3.9.7 windows-64    # https://www.python.org/downloads/release/python-397/
- PostgreSql version 13.4         			# https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
- text editor: VSCode    					# https://code.visualstudio.com/download
- terminal: Windows Terminal     			# https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701

Dependencies

Install the following Python packages

pip install -r requirements.txt

Prerequisites

Clone the repository

git clone https://github.com/pranjaldube/astrology-app.git
cd indiaToday
  • Open the PostgreSQL shell. You can find the PSQL Shell in the Start Menu.
  • The shell will prompt you for Server, Database, Port, and Username details. Set it to default by clicking on the Enter button in the keyboard without providing any value. Finally, the shell will prompt you for the Password. Provide the password that you used during the PostgreSQL installation.
  • Create a PostgreSQL database via the following steps (here, kesha and 1234 are dummy user credentials):
CREATE DATABASE indiatoday;
CREATE USER kesha WITH PASSWORD '1234';
ALTER ROLE kesha SET client_encoding TO 'utf8';
ALTER ROLE kesha SET default_transaction_isolation TO 'read committed';
ALTER ROLE kesha SET timezone TO 'UTC';
GRANT ALL PRIVILEGES ON DATABASE indiatoday TO kesha;

To make sure that you have connected and uploaded schema to the PostgreSQL database.

python manage.py makemigrations
python manage.py migrate

Load the dummy database to PostgreSQL with

python manage.py loaddata dumpdata.json

Usage

Run the server

python manage.py runserver

The app will be served at http://127.0.0.1:8000/home

You should also create superuser to view Django-admin dashboard

python manage.py createsuperuser

And login with your credentials at http://127.0.0.1:8000/admin to view all the tables and their data.

Models

Defined in indiaToday/astroApp/models.py.

  • AstrologerDetails
  • Reports
  • BannerOffers
  • Horoscopes
  • Questions
  • Testimonials

URL Endpoints

Defined in indiaToday/astroApp/urls.py and methods defined in indiaToday/astroApp/views.py

/home: GET request to http://127.0.0.1:8000/home returns combined GET request data from all 6 APIs below, each designed for specific model as mentioned in the problem statement.

  • /astro_data: List of all astrologers and their details.

  • /questions_data: Get question categories from API and show them in the dropdown list.

  • /horoscopes_data: Get all horoscopes list from API

  • /banneroffers_data : Get details from API of the images and redirection screen when clicked.

  • /reports_data: List of all the reports.

  • /testimonials_data: Get customer feedback and show them in the horizontal list.

    NOTE : Although the 6 APIs would be used to retrieve data (hence the GET method), but they have been equipped additionally with POST, PUT and DELETE methods.

Images

Sample images of use case goes here.

Owner
Pranjal Pratap Dubey
Pranjal Pratap Dubey
1 May 12, 2022
A simple script for generating screenshots with Vapoursynth

Vapoursynth-Screenshots A simple script for generating screenshots with Vapoursynth. About I'm lazy, and hate changing variables for each batch of scr

7 Dec 31, 2022
Fastest Semantle solver this side of the Mississippi

semantle Fastest Semantle solver this side of the Mississippi. Roughly 3 average turns to win Measured against (part of) the word2vec-google-news-300

Frank Odom 8 Dec 26, 2022
Spooky Castle Project

Spooky Castle Project Here is a repository where I have placed a few workflow scripts that could be used to automate the blender to godot sprite pipel

3 Jan 17, 2022
This is a vscode extension with a Virtual Assistant that you can play with when you are bored or you need help..

VS Code Virtual Assistant This is a vscode extension with a Virtual Assistant that you can play with when you are bored or you need help. Its currentl

Soham Ghugare 6 Aug 22, 2021
Sentiment Based Product Recommendation System

Sentiment Based Product Recommendation System The e-commerce business is quite p

Sumit Sahay 2 Jan 15, 2022
🔩 Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library. Nothing like Michael Bolton.

Boltons boltons should be builtins. Boltons is a set of over 230 BSD-licensed, pure-Python utilities in the same spirit as — and yet conspicuously mis

Mahmoud Hashemi 6k Jan 06, 2023
A maubot plugin to invite users to Matrix rooms according to LDAP groups

LDAP Inviter Bot This is a maubot plugin that invites users to Matrix rooms according to their membership in LDAP groups.

David Mehren 14 Dec 09, 2022
Never get kicked for inactivity ever again!

FFXIV AFK Bot Tired of getting kicked from games due to inactivity? This Bot will make random movements in random intervals to prevent you from gettin

5 Jan 12, 2022
Simple tools for the Horse Reality webgame

Realtools (Web Tools for Horse Reality) These tools were made on request from a close friend of mine who plays this game. A live instance can be found

shay 0 Sep 06, 2022
Animation picker for Audodesk Maya 2017 (or higher)

Dreamwall Picker Animation picker for Audodesk Maya 2017 (or higher) Authors: Lionel Brouyère, Olivier Evers This tool is a fork of Hotbox Designer (L

DreamWall 93 Dec 21, 2022
An alternative site to emplea.do due to inconsistent service of the app.

feline a agile and fast alternative to emplea.do License: MIT Settings Moved to settings. Basic Commands Setting Up Your Users To create a normal user

Codetiger 8 Nov 10, 2021
This speeds up PyCharm's package index processes and avoids CPU & memory overloading

This speeds up PyCharm's package index processes and avoids CPU & memory overloading

1 Feb 09, 2022
Ikaros is a free financial library built in pure python that can be used to get information for single stocks, generate signals and build prortfolios

Ikaros is a free financial library built in pure python that can be used to get information for single stocks, generate signals and build prortfolios

Salma Saidane 64 Sep 28, 2022
A clock purely made with python(turtle)...

Clock A clock purely made with python(turtle)... Requirements Pythone3 IDE or any other IDE Installation Clone this repository Running Open this proje

Abhyush 1 Jan 11, 2022
A complete python calculator with 2 modes Float and Int numbers.

Python Calculator This program is made for learning purpose. Getting started This Program runs using python, install it via terminal or from thier ofi

Felix Sanchez 1 Jan 18, 2022
Make after-work Mending More flexible In Python

Mending Make after-work Mending More flexible In Python A Lite Package focuses on making project's after-post mending pythonic and flexible. Certainly

2 Jun 15, 2022
Tracking development of the Class Schedule Siri Shortcut, an iOS program that checks the type of school day and tells you class scheduling.

Class Schedule Shortcut Tracking development of the Class Schedule Siri Shortcut, an iOS program that checks the type of school day and tells you clas

3 Jun 28, 2022
A simple projects to help your seo optimizing has been written with python

python-seo-projects it is a very simple projects to help your seo optimizing has been written with python broken link checker with python(it will give

Amirmohammad Razmy 3 Dec 25, 2021
Sardana integration into the Jupyter ecosystem.

sardana-jupyter Sardana integration into the Jupyter ecosystem.

Marc Espín 1 Dec 23, 2021