Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jali/flask-urlshortener
Python flask URL shortener with i18n support
https://github.com/jali/flask-urlshortener
app base60 flask full-stack fullstack i18n psql python python-flask shortener translation url url-shortener urlshortener
Last synced: 9 days ago
JSON representation
Python flask URL shortener with i18n support
- Host: GitHub
- URL: https://github.com/jali/flask-urlshortener
- Owner: jali
- License: mit
- Created: 2015-04-05T22:07:05.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2025-01-08T20:36:32.000Z (about 1 month ago)
- Last Synced: 2025-02-01T02:04:22.169Z (21 days ago)
- Topics: app, base60, flask, full-stack, fullstack, i18n, psql, python, python-flask, shortener, translation, url, url-shortener, urlshortener
- Language: Python
- Homepage:
- Size: 1.3 MB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# URL Shortener
----------------
Travis CI Status [](https://travis-ci.org/jali/flask-urlshortener)This is a service that takes long URL and squeezes it into short characters to make a link that is easier to share, tweet, or email to friends.
The app is using python flask, bootstrap and postgresql database.
This service supports internationalization (i18n) such as English, German (Deutsch) and Arabic (عربي)
Installation:
-------------
Create your postgres database.
As per config.py setting the database name is: urls$ su - postgres
$ psql
$ CREATE DATABASE urls;Follow the steps below:
$ git clone https://github.com/jali/flask-urlshortener
$ cd flask-urlshortener
$ workon
$ export APP_SETTINGS="config.DevelopmentConfig"Add your psql to your machine's path
*Example for psql on Mac OS X*
export PATH=/Applications/Postgres.app/Contents/Versions/9.4/bin:$PATH
Continue by executing the folowing commands:$ pip install -r requirements.txt
$ python db_create.pyRun the tests:
--------------
$ python manage.py test
To run the app:
---------------
$ python web.pyGoto: [http://localhost:8081](http://localhost:8081)
OR you can use runserver like this:
$ python manage.py runserver
Then goto: [http://localhost:5000](http://localhost:5000)Update translation:
-------------------
If you change text or values, you need to run the following inside your vitrual env.
$ pybabel update -i messages.pot -d coreapp/translations
$ pybabel compile -d coreapp/translations