This project is an online code editor built with Django and CodeMirror. It allows users to write, compile, and execute code in various programming languages through a web interface. The editor is styled using Bootstrap and relies on a Compiler API to handle code execution.
- Interactive Code Editing: Utilize CodeMirror for a robust code editing experience with syntax highlighting, code completion, and more.
- Support for Multiple Languages: Compile and run code in Python, Java, C++, C#, and C .
- User-Friendly Interface: A clean, responsive design built with Bootstrap.
- Real-Time Code Execution: Execute code and fetch results dynamically using the Compiler API.
- Python: Server-side logic and backend processing using Django.
- Django: Web framework for routing, request handling, and backend logic.
- HTML/CSS: Structure and style of web pages.
- Bootstrap: Framework for responsive design and UI components.
- CodeMirror: JavaScript library for a feature-rich code editor.
- Compiler API: API for compiling and running code in different programming languages.
- JavaScript: Manages client-side interactions and API calls.
- JSON: Data format used for communication between the client and server.
- Python 3.x
- Django
- Requests library
-
Clone the Repository:
git clone https://github.com/ArunBhalla26/Online-Code-Editor-Using-CodeMirror-Django-and-Compiler-API.git
-
Add a 'Static' folder containing 'CodeMirror' Library :
Require CodeMirror version 5 or more.
-
Start a virtual environment : Add requirements.txt file
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
**Install Required Packges **:
pip install -r requirements.txt
5.Take Your API Key & Token :
I have used Rapid API for the API Key and Token , you can consider that.
6.** Start Django Server** :
python manage.py runserver