Skip to content

Real-time collaborative editing for Django admin with WebSockets

License

Notifications You must be signed in to change notification settings

Leer20/django-admin-collaborator

Repository files navigation

🛠️ Django Admin Collaborator: Real-Time Collaborative Editing

Welcome to the Django Admin Collaborator repository! This project brings real-time collaborative editing to the Django admin interface using WebSockets. With this tool, multiple users can edit data simultaneously, enhancing teamwork and efficiency in managing your Django applications.

Download Releases

Table of Contents

Features

  • Real-Time Collaboration: Edit records in real-time with other users.
  • Exclusive Locking: Prevent conflicts with exclusive locks on records.
  • Presence Indicators: See who is currently editing which records.
  • Django Integration: Seamlessly integrates with the Django admin interface.
  • WebSocket Support: Utilizes WebSockets for instant updates.
  • Redis Backend: Leverages Redis for efficient message handling.

Installation

To get started, follow these steps to install the Django Admin Collaborator:

  1. Clone the Repository:

    git clone https://github.com/Leer20/django-admin-collaborator.git
    cd django-admin-collaborator
  2. Install Requirements: Make sure you have Python and pip installed. Then, install the required packages:

    pip install -r requirements.txt
  3. Set Up Redis: Ensure that you have Redis installed and running. You can download Redis from the official site.

  4. Migrate Database: Run the following command to apply database migrations:

    python manage.py migrate
  5. Run the Server: Start your Django development server:

    python manage.py runserver

Now, you can access the Django admin interface at http://127.0.0.1:8000/admin.

Usage

Once you have the application running, follow these steps to use the collaborative editing feature:

  1. Log in to the Django Admin: Use your admin credentials to log in.
  2. Navigate to a Model: Choose a model you want to edit.
  3. Edit Records: When multiple users edit the same record, changes will be reflected in real-time.

You can check the presence indicators to see who else is editing the same record.

Configuration

You can customize the behavior of the Django Admin Collaborator through the settings. Here are some key configurations:

  • WebSocket URL: Specify the WebSocket URL for your application.
  • Redis Settings: Adjust Redis connection settings as needed.
  • Lock Duration: Set how long a record remains locked during editing.

Example Configuration

In your settings.py, add the following:

# WebSocket configuration
WEBSOCKET_URL = 'ws://localhost:8000/ws/admin/'

# Redis configuration
REDIS_URL = 'redis://localhost:6379/0'

# Lock duration in seconds
LOCK_DURATION = 300

Contributing

We welcome contributions! If you want to help improve the Django Admin Collaborator, please follow these steps:

  1. Fork the Repository: Click on the "Fork" button at the top right of this page.
  2. Create a Branch: Create a new branch for your feature or bug fix.
    git checkout -b feature/my-feature
  3. Make Changes: Implement your changes and commit them.
    git commit -m "Add my feature"
  4. Push Changes: Push your changes to your forked repository.
    git push origin feature/my-feature
  5. Create a Pull Request: Go to the original repository and submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For questions or support, please reach out:

Feel free to visit the Releases section for the latest updates and downloads.

Thank you for checking out Django Admin Collaborator! We hope it enhances your Django admin experience.