-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: contribution doc and fix use_latest template tag (#293)
* add: contribution doc and fix use_latest template tag fix * chore: add doc_string for use_latest filter --------- Co-authored-by: Harsh Shah <[email protected]>
- Loading branch information
1 parent
c68ebca
commit b3fd638
Showing
2 changed files
with
163 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
# Contribution Guide for Zango | ||
|
||
## Table of Contents | ||
|
||
1. [How to Contribute](#how-to-contribute) | ||
- [Reporting Issues](#reporting-issues) | ||
- [Contributing to Zango](#contributing-to-zango) | ||
2. [Contributing to Zango backend](#contributing-to-zango-backend) | ||
3. [Contributing to Zango frontend](#contributing-to-zango-frontend) | ||
4. [Contributing to documentation](#contributing-to-documentation) | ||
5. [Community](#community) | ||
|
||
## How to Contribute | ||
|
||
### Reporting Issues | ||
|
||
If you find a bug or have a feature request, please create an issue in our [issue tracker](https://github.com/Healthlane-Technologies/Zango/issues). When reporting an issue, please include as much detail as possible, including steps to reproduce the problem, your environment, and any relevant log output. | ||
|
||
## Contributing to Zango | ||
|
||
This section describes the general practices for contributing to zango, you can check the next sections which describe how to contribute to [frontend](#contributing-to-zango-frontend), [backend](#contributing-to-zango-backend) and [documentation](#contributing-to-documentation) | ||
|
||
### Getting Started | ||
|
||
1. **Fork the Repository**: Fork the [Zango repository](https://github.com/Healthlane-Technologies/Zango) to your GitHub account. | ||
2. **Clone the Repository**: Clone your forked repository to your local machine. | ||
3. Set Up Environment: Follow the setup instructions in Setup.md to configure your development environment. | ||
|
||
### Development Workflow | ||
|
||
1. Create a Branch: Create a new branch for your feature or bugfix | ||
|
||
```bash | ||
git checkout -b feature/your-feature-name | ||
``` | ||
|
||
2. Implement Changes: Make your changes, ensuring to follow the coding standards and best practices. | ||
3. Commit Changes: Commit your changes with a meaningful commit message. | ||
|
||
```bash | ||
git add . | ||
git commit -m "Add feature <feature_name>" | ||
``` | ||
|
||
### Submitting Changes | ||
|
||
1. Push to GitHub: Push your changes to your forked repository. | ||
|
||
```bash | ||
git push origin feature/your-feature-name | ||
``` | ||
|
||
2. Create a Pull Request: Open a pull request from your branch to the main branch of the original repository. Provide a clear description of your changes and link any related issues. | ||
|
||
### Code Review | ||
|
||
1. Respond to Feedback: Be prepared to make changes based on feedback from code reviewers. | ||
2. Update PR: Push any updates to your branch to reflect the feedback received. | ||
|
||
## Contributing to Zango backend | ||
|
||
### Steps to contribute to Zango backend | ||
|
||
1. Clone the zango repository | ||
2. Create a new virtual environment | ||
3. From the `zango/backend` directory run the following command | ||
|
||
```bash | ||
pip install -e . | ||
``` | ||
|
||
4. Perform the steps to setup a new project as described in the docs [here](https://www.zango.dev/docs/core/getting-started/installing-zelthy/manual#zango-the-zango-cli) | ||
5. Start your project | ||
6. Lanuch a new app | ||
7. Make changes to Zango and view the changes through your project. | ||
|
||
**Running Migrations:** You can run all the Zango migrations using the command `python manage.py migrate_schemas`, this is for the zango | ||
core migrations only, you can create and run app specific migrations as described [here](https://www.zango.dev/docs/core/ddms/migrating-ddms) | ||
**Static Files:** To add static files that you have added to Zango, you can use the command `python manage.py collectstatic` | ||
|
||
## Contributing to Zango frontend | ||
|
||
1. Go to the frontend directory of the repository and install the dependencies | ||
|
||
```bash | ||
cd frontend | ||
yarn install | ||
``` | ||
|
||
2. Start the application with mock service worker | ||
|
||
```bash | ||
yarn mock | ||
``` | ||
|
||
3. Generating and Using frontend build in Zango | ||
To test your frontend app with the Zango framework, follow these steps: | ||
|
||
Run the build command: | ||
|
||
```bash | ||
yarn build | ||
``` | ||
|
||
This command generates the build and places it inside the `backend/src/zango/assets/app_panel/js` directory of Zango. | ||
|
||
The generated build will include the latest timestamp in its filename (`build.<timestamp>.min.js`). By default, the most recent build will be served. If you need to use a different build, you can update the filename in the ``backend/src/zango/apps/shared/tenancy/templates/app_panel.html`` file. | ||
|
||
|
||
4. Collecting Static Build for Your Project | ||
|
||
Before testing the build, collect the static files for your project. Ensure your project is already created and your environment is activated. | ||
|
||
Change directory to your project: | ||
|
||
```bash | ||
cd <project_name> | ||
``` | ||
|
||
Collect the static build: | ||
|
||
```bash | ||
python manage.py collectstatic | ||
``` | ||
|
||
## Contributing to Documentation | ||
|
||
We use docusaurus for maintaining Zango's documentation | ||
|
||
1. Go to the docs directory of the repository and install the dependencies | ||
|
||
```bash | ||
cd zango/docs | ||
yarn install | ||
``` | ||
|
||
2. Start the application | ||
|
||
```bash | ||
yarn start | ||
``` | ||
|
||
## Community | ||
|
||
If you face any issues or need any help you can use our [discord](https://discord.com/invite/WHvVjU23e7) to connect with other contributors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters