Skip to content

AhmedBedeir/django-blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Semicolon

Semicolon

Full-Featured blog built-in by Django and Bootstrap.

python django license

OverviewFoldersKey FeaturesRun LocallyUrls & ViewsTODOAuthor

Overview

This is a project which was developed for the CS50 web course final project. The application contained within is a CMS-style blog site where developers can publish their blog articles and comment on other developers' articles in addition to other options.

Here is the Demo 🙌.

login

What’s contained in each folder

  • accounts:
    • this app is manage users' accounts (login - logout - register - etc.)
    • Django authentication system was used to implement it.
    • (TODO) modify user profile.
  • blog:
    • this app responsible for creating the articles and handling CRUD operations on them.

Key Features

  • User Registration.
  • User Login & Logout.
  • Create, Read, Update & Delete Articles.
  • Save an article with Markdown preview.
  • Comments
  • Search for articles on any pages
  • Customized admin panel
  • Categories
  • Bookmarks
  • Vote system

Run Locally

  • Create Virtual Environment

    $ pip install virtualenv
    $ virtualenv environment_name
    

    On Windows, run:

    $ environment_name\Scripts\activate.bat
    

    On Unix or MacOS, run:

    $ source environment_name\Scripts\activate
    
  • clone this repository

    $ git clone https://github.com/AhmedBedeir/django-blog.git
    $ cd django-blog
    
  • install dependencies

    $ pip install -r requirements.txt
    
  • finally, You can run the project 🎉

    $ python manage.py runserver
    

    Open http://localhost:8000 to view it in the browser.

Urls and Views

some base URL

  • / (All articles)

    • view : blog/views.py#index

    • template : blog/templates/index.html

      • every article card show :
        • title.
        • when created.
        • description.
        • tags.
        • saved or unsaved button.
        • vote button.
        • if the user owner this article:
          • number of votes show not vote button.
          • can delete and update.
      • all
  • /add

    login required

    • view : blog/views.py#add

    • template : blog/templates/add.html

      • user can write article according to the condition
      • add
  • /articles/<str:id> (Article view)

    • view : blog/views.py#singleArt

    • template : blog/templates/singleArt.html

      • Show all details about this article.
      • user can add comment in this page.
      • view
  • /categories

    • view : blog/views.py#categories

    • template : blog/templates/categories.html

      • Show all categories.
      • each category has some articles belong it.
      • categories
  • /update/<str:id>

    login required owner required

    • view : blog/views.py#update

    • template : blog/templates/add.html

      • Depending on the request user can add a new article or update an existing article
      • update
  • /accounts

    • /login

      • login page
    • /logout

      • logout page
    • /register

      • sign up page
    • accounts

TODO (Future Implementations)

  • Toggle between dark and light mode.
  • User profile (update information).
  • Follow and Unfollow system.
  • Enhance article view.
  • Forget password.
  • paginator.
  • ...

    Please star the repo and feel free to make pull requests ⭐🙌.

Author

Bedeir

If you have any feedback, feel free to message me.

About

Full Featured blog built in by Django and Bootstrap.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published