This is a simple Music Player web application built using Django, my very first Django project! π I referred to YouTube tutorials to learn and implement this.
- Upload and play music files
- Basic playback controls (Play, Pause, Next, Previous)
- Playlist support
- User-friendly interface
- Backend: Django
- Frontend: HTML, CSS, JavaScript
- Database: SQLite (default with Django)
-
Clone this repository:
git clone https://github.com/ethical0101/Music-Player.git cd Music-Player -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Apply migrations:
python manage.py migrate
-
Create a superuser to access the Django admin panel:
python manage.py createsuperuser
Follow the prompts to set up your admin account.
-
Run the development server:
python manage.py runserver
-
Open http://127.0.0.1:8000/ in your browser.
- Access the Django admin panel by navigating to http://127.0.0.1:8000/admin.
- Log in using the superuser credentials you created earlier.
- In the admin panel, youβll see a section for Songs (or the relevant model name).
- Click on Add Song and fill in the details:
- Title: Name of the song.
- Artist: Name of the artist.
- Audio File: Upload the music file.
- Lyrics: Add the lyrics (you can fetch them using
test.pyas explained below).
- Click Save to add the song to your music library.
- Run the
test.pyscript:python test.py
- When prompted, enter the name of the song you want to fetch lyrics for.
- The script will fetch the lyrics (if available) and display them in the terminal.
- Copy the lyrics and paste them into the Lyrics field when adding a song in the Django admin panel.
- Add user authentication
- Implement music streaming
- Enhance UI with modern design
This project is open-source. Feel free to modify and improve! π
π https://github.com/ethical0101/Music-Player
### Notes:
1. Ensure that your `test.py` script is functional and can fetch lyrics from a reliable source (e.g., an API or web scraping).
2. If your `test.py` script requires additional dependencies, mention them in the `requirements.txt` file.
3. If you have a specific structure for your models (e.g., `Song` model with fields like `title`, `artist`, `audio_file`, and `lyrics`), make sure it matches the instructions provided.
Let me know if you need further assistance! π