Coder Social home page Coder Social logo

weather-app's Introduction

Weather App ๐ŸŒค

Weather and Forecast Monitoring Web Application

Table of Contents

Used Technologies

Python / Django

Django was preferred because backend and view will be used together in this project. However, it may be more appropriate to use django-rest-framework for further development of the project.

SQLite

SQLite was used to make the project available quickly in different environments. Thus, there was no need to run a stand-alone database.


This project is backend based, but Bootstrap and JS are used to make frontend improvements fast.

Prerequisites

Weather App is written in Python with Django Framework. Other library requirements are listed in requirements.txt, to install with pip use following command:

pip3 install requirements.txt

Running

python3 manage.py runserver 8000

Then app will be available on http://127.0.0.1:8000 as shown:

Usage

  1. Select unit type
  2. Start typing the city name
  3. Click the view button next to the city name
  4. Enjoy!

Admin Panel

Default Django admin panel is available on http://127.0.0.1:8000/admin

You can create new superuser with following command:

python3 manage.py createsuperuser

Default Super User Credentials:

  • Username: weather_app_admin
  • Password: weather12345

Features

  • Instant Search
    User can search cities instantly on home page without seeking within pages.
  • Unit
    User can choose unit while searching cities.
  • Cookie for Last Viewed City
    When the user enters the page, the last viewed city information is kept and the weather for that city is displayed. If the city is changed, the cookie information is also updated. This method is also applied to unit data.
  • Import Cities Command
    User can import cities via Django command line interface with using
    python3 manage.py import_cities docs/city.list.json command.

Views / Endpoints

City Search

Parameter Required Method Type Description
search_query Yes GET string Minimum 2 char

Main View

Parameter Required Method Type Description
city_id Yes GET integer City #ID
unit No GET string Unit Type

Tests

Tests are available under WeatherApp/WeatherApp/tests directory. Django test base was used. You can simply run test using following command.

python3 manage.py test

Logs

Stored under WeatherApp/logs/ directory.

Repository

This project available at eminsafa/Weather-App

License

MIT

weather-app's People

Contributors

eminsafa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.