Django框架URL缩短程序
立即下载
资源介绍:
Django框架,这是一个关于URL缩短器的高级项目,可以将任何给定的URL缩短为您选择的URL。缩短的URL可以作为指向所需网站的重定向链接。
该系统的后端完全基于Django框架构建,前端则采用HTML和CSS。它具有与流行的Bit.ly或adf.ly URL缩短器类似的功能,可以执行所有任务,如将URL缩短代码自定义为您选择的代码,也可以对其进行编程,为缩短的URL生成随机slug。
该应用程序还提供了一个管理面板,通过该面板可以控制所有缩短的网址及其重定向链接。这是一个具有高级功能的高级项目。
管理账户:
用户名:admin
密码:admin
# URL Shortener App
A Django URL Shortener App created with Django 3.0 and Python 3.8 to shorten any URL given. This project is made to learn Django.
**Live Site running on Heroku**: https://myurlshortener1.herokuapp.com/
## Demostration
![Shortening a URL](http://g.recordit.co/NtR9A0S6N9.gif)
## How to Setup in Localhost
1. Clone this repository.
2. Open the cloned repository.
3. Install dependencies using ``pip install -r requirements.txt``
**OR**
Install ``pipenv`` using ``pip install pipenv`` and initialise a Virtual Machine using ``pipenv install`` in the directory.
4. Set environment variables like `SECRET_KEY`, `DEBUG_VALUE`.
5. Run the Django Server using ``python manage.py runserver`` and then goto ``localhost:8000`` or ``127.0.0.1:8000`` and see the server running.
### Environment Variables:
`SECRET_KEY`: Django secret key which can be any long hexadecimal value. Django recommends *atleast* **50 characters** to make it secure.
`DEBUG_VALUE`: Set it as **"True"** for Debug environment and **"False"** for Production.
## How to Setup for Production
Refer on how to deploy Python apps in Heroku [here](https://devcenter.heroku.com/articles/deploying-python) and Django app configuration [here](https://devcenter.heroku.com/articles/django-app-configuration).
## Features
- Can shorten any url.
- Can see all the shortened urls created with it.
- Can choose any custom value to shorten the url.
### Features to add
- Improve the CSS of the site.
- Add a User Authentication system.
- Add a process to delete any redirects not used within 7 days.
*More features can be suggested in Issues.*
#### Known Issues:
No issues detected till now.
*Please make a GitHub issue if any other bugs are found.*
## Notes
This project was created on **Ubuntu-20.04 LTS** and tested under **Windows 10** and **Ubuntu**, and is expected to work fully in other systems too.
This project is still under development. Parts of the source codes may not be well documented. Also suitable prompts may not be available for the user at the moment.
More features and fixes are yet to come. Meanwhile suggestions, ideas, bug reports are welcomed.
资源文件列表:
URL_Shortener_Using_Django_Framework.zip 大约有104个文件