Coder Social home page Coder Social logo

lazycatcoder / django-news-app Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.2 MB

This Django project is an News website

License: GNU General Public License v3.0

Python 3.11% HTML 4.42% CSS 64.02% JavaScript 28.45%
css django djangonews html information javascript news newsfeed newsportal python

django-news-app's Introduction

Django News App

This project is a News website developed using Django that allows users to view and read news in different categories. The site supports news categories, tags, search, number of views, comments and authors.

This project effectively showcases typical features and structures involved in creating similar services.

Key Features:

  • View list of news articles with pagination
  • Filtering news by categories and tags
  • Detailed reading of the news on a separate page
  • Commenting on news with the possibility of moderation
  • Search articles by keywords
  • Display of popular news
  • Ability to view articles separately by category
  • Show latest articles in slider





Settings

✨ To use it, you need to complete the following steps:


  1. Clone this repository

       git clone https://github.com/lazycatcoder/django-news-app.git
    
  2. Open a terminal and navigate to the project 'django-news-app' folder

       cd path/.../django-news-app
    
  3. Create a virtual environment in the 'django-news-app' folder

       python -m venv venv
    
  4. Activate the virtual environment

       source venv/bin/activate   # MacOS/Linux 
    
       venv\Scripts\activate      # Windows
    
  5. Install the following dependencies

       pip install -r requirements.txt 
    
  6. Use the console to navigate to the 'django-news-app\news_app' folder

       cd news_app
    
  7. Make migration

       python manage.py makemigrations
       python manage.py migrate
    
  8. Сollect static files

       python manage.py collectstatic
    
  9. Navigate to folder 'django-news-app\news_app\news_app' and open the settings.py file.

    The next step is to fill in some data in settings.py:

  • Generating a new SECRET_KEY in Django

       python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'
    

    This command will execute a Python script that imports the get_random_secret_key() function and calls it to generate a new key. The result will be printed in the terminal.

    When you get the new key, copy it and paste it into settings.py instead of SECRET_KEY = ' ''

  1. Use the console to navigate to the 'django-news-app\news_app' folder and run the server
   python manage.py runserver
  1. Open a browser and enter the following address to launch the project http://127.0.0.1:8000/ 🚀



🔴 to add, delete or edit: news, tags, categories, comments, you can use the Django admin panel (login: admin, password: admin) http://127.0.0.1:8000/admin/ or you can create a new superuser for this use the console to navigate to the 'django-news-app\news_app'

   python manage.py createsuperuser

django-news-app's People

Contributors

lazycatcoder 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.