Git Product home page Git Product logo

blog's Introduction

DSC-IEM Blog ๐Ÿ“ฐ

logo

Blogs for tech and beyond from DSC-IEM community. With the help of this project we hope to provide the students of this community a platform to share, showcase and help each other in their exciting journey of learning and building amazing things.

home

About the codebase ๐Ÿ“

We are using Python ๐Ÿ and Django for our blog server

home1

How to start working on the server code โš’

Create a virtualenv ๐ŸŒŽ

virtualenv blogenv

Activate our python virtual environment โœˆ

blogenv\Scripts\activate

Install all required packages ๐Ÿ“ฆ

pip install -r requirements.txt

After making changes to static files

python manage.py collectstatic

After modifying database models, generate necessary migration code ๐Ÿ’พ

python manage.py makemigrations dscblog

Apply any database migration ๐Ÿ’ฟ

python manage.py migrate --run-syncdb

Run server in dev mode ๐Ÿƒโ€โ™€๏ธ

python manage.py runserver 0.0.0.0:8000

Run server in production mode ๐Ÿ

(This will only work on linux)

gunicorn -b 0.0.0.0:80 dscblog.wsgi

Env variables for django โš™

For local setup, you can also use settings_dev.py file

  • DJ_SECRET_KEY: Django secret key
  • BASE_URL: Root url of the server. eg: https://example.com
  • DATABASE_URL: eg: postgres://user:password@localhost/dbname

Be a super user ๐Ÿ˜Ž

To be abe to access the admin page /admin you need a super user account.

python manage.py createsuperuser

On first run ๐Ÿƒโ€โ™€๏ธ

A few features needs to be configured first before they can be used

Sign In with Google ๐Ÿ“ง

  • In Django Admin page /admin go to SITES make sure you have the domain name set properly. For local environment use Domain name and Display name as http://localhost:8000

  • In Django Admin page /admin go to SOCIAL ACCOUNTS > Social applications Choose google as the provider and fill up the required info. Keep key field blank. Follow the docs for more info.

Featured blogs ๐Ÿ“ข

Once you have written some blogs, its time to feature some of them in the home page. To feature a blog, go to Django Admin page /admin, now go to DSCBLOG > Featureds use ADD FEATURED button and fill up the form, you can keep Info field blank. Note that your blog post must be public to actually show up in the featured section.

blog's People

Contributors

asrient avatar riken-shah avatar antsthebul avatar o3661606 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.