Skip to content

Commit

Permalink
Merge pull request #31 from StackTipsLab/main
Browse files Browse the repository at this point in the history
Rebase develop
  • Loading branch information
nilandev authored Nov 24, 2023
2 parents 4372c9d + 4e5198d commit cfc8746
Show file tree
Hide file tree
Showing 269 changed files with 6,901 additions and 9,616 deletions.
Binary file added .DS_Store
Binary file not shown.
23 changes: 19 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# Secret Key hash
SITE_URL=https://stacktips.com
SECRET_KEY=
DEBUG=True
ALLOWED_HOSTS=127.0.0.1,localhost
DEVELOPMENT_MODE=False

# Website details
SITE_URL=SITE URL
SITE_TITLE=SITE TITLE
SITE_TAGLINE=SITE TAGLINE
SITE_DESCRIPTION=YOUR SITE DESCRIPTION
ASSETS_DOMAIN=YOUR ASSETS DOMAIN
SITE_LOGO=YOUR SITE LOGO URL

# Your database configruation details
DB_NAME=bloggify
DB_NAME=bloggy
DB_USER=root
DB_PASSWORD=
DB_HOST=127.0.0.1
Expand Down Expand Up @@ -34,4 +40,13 @@ EMAIL_PORT=587
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
EMAIL_USE_TLS=True
DEFAULT_FROM_EMAIL=
DEFAULT_FROM_EMAIL=

POST_TYPE_CHOICES=article:Article,quiz:Quiz,lesson:Lesson
SHOW_EMTPY_CATEGORIES=False


#ads.txt file content
LOAD_GOOGLE_TAG_MANAGER=True
LOAD_GOOGLE_ADS=True
MY_ADS_TXT_CONTENT=
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: [nilandev]
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: waiting for triage
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[New Feature] "
labels: waiting for triage
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
24 changes: 24 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Pylint

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pylint
- name: Analysing the code with pylint
run: |
pylint -d C0114,C0115,C0116,C0301,E1101,R0903,R0901,W0613 $(git ls-files '*.py') --fail-under=9
25 changes: 7 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
.env
.env.production

/venv/*
/venv
/bloggy/frontend/node_modules/
/site-content/uploads/
/.idea/
/venv/
/env/
__pycache__/*
/bloggy_api/__pycache__/*
/bloggy/__pycache__/*
Expand Down Expand Up @@ -65,18 +61,11 @@ coverage.xml

# Sphinx documentation
docs/_build/
/frontend/node_modules/
/bloggy_frontend/node_modules/
/bloggy/static/
/bloggy/static
/bloggy/static/debug_toolbar
/bloggy/static/hitcount
/bloggy/static/media
/bloggy/static/rest_framework
/bloggy/static/summernote
/bloggy/static/colorfield
/bloggy/static/admin/
media/uploads/default_avatar.png
media/uploads/articles/*
media/uploads/categories/*
media/uploads/course/*
media/uploads/quiz/*
media/uploads/user/*
media/uploads/*
media/uploads/

# Virtual Environments Ignore
.venv
2 changes: 2 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[MASTER]
ignore=migrations
47 changes: 47 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Djanog:Run",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"python": "${workspaceRoot}/venv/bin/python3",
"program": "${workspaceFolder}/manage.py",
"args": [
"runserver"
],
"django": false,
"justMyCode": true,
"autoReload": {
"enable": true
}
},
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
},
{
"name": "Djanog:Debug",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"python": "${workspaceRoot}/venv/bin/python3",
"program": "${workspaceFolder}/manage.py",
"args": [
"runserver"
],
"django": true,
"justMyCode": true
},
],
"compounds": []
}
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"editor.wordWrapColumn": 120,
"python.analysis.typeCheckingMode": "basic",
"python.formatting.provider": "autopep8",
"editor.formatOnSave": false,
"python.linting.enabled": true,
"python.linting.lintOnSave": true,
// "editor.fontFamily": "Dank Mono, JetBrains Mono NL, Fira Code, Menlo, Monaco, 'Courier New', monospace",
// "editor.fontSize": 14,
}
131 changes: 131 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or advances of
any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Project Maintainers are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Project Maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported (this can be done anonymously) to the Project Maintainers responsible for enforcement at https://stacktips.com/contact.
All complaints will be reviewed and investigated promptly and fairly.

All Project Maintainers are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Project Maintainers will follow these Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from Project Maintainers, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][mozilla coc].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[mozilla coc]: https://github.com/mozilla/diversity
[faq]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
42 changes: 42 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Contributing Guide

## Creating an Issue
Before **creating** an Issue for `features`/`bugs`/`improvements` please follow these steps:
1. Search existing Issues before creating a new issue (has someone raised this already)
1. If it doesn't exist create a new issue giving as much context as possible
1. All issues are automatically given the label `status: waiting for triage` and are automatically locked so no comments can be made
1. If you wish to work on the Issue once it has been triaged and label changed to `status: ready for dev`, please include this in your Issue description

## Working on an Issue (get it assigned to you)

Before working on an existing Issue please follow these steps:

1. Only ask to be assigned 1 **open** issue at a time
1. Look out for the Issue label `status: ready for dev`
1. Comment asking for the issue to be assigned to you.
1. After the Issue is assigned to you, you can start working on it
1. **Only** start working on this Issue (and open a Pull Request) when it has been assigned to you - this will prevent confusion, multiple people working on the same issue, and work not being used
1. reference the Issue in your Pull Request (for example `closes #123`)

### Notes:
- check the `Assignees` box at the top of the page to see if the issue has been assigned to someone else before requesting this be assigned to you
- if an Issue is unclear, ask questions to get more clarity before asking to have the Issue assigned to you
- only request to be assigned an Issue if you know how to work on it
- an Issue can be assigned to multiple people if you all agree to collaborate on the issue (the Pull Request can contain commits from different collaborators)
- any Issues that have no activity after 2 weeks will be unassigned and re-assigned to someone else

## Reviewing Pull Requests

We welcome everyone to review Pull Requests, it is a great way to learn, network, and support each other.

### DOs

- be kind and respectful
- use inline comments to explain your suggestions
- use inline suggestions to propose changes

### DON'Ts

- do not be rude, disrespectful, or aggressive
- do not repeat feedback, this creates more noise than value (check the existing conversation), use GitHub reactions if you agree/disagree with a comment
- do not blindly approve pull requests to improve your GitHub contributor's graph
Loading

0 comments on commit cfc8746

Please sign in to comment.