A website where you can create collections on smiles and use it on other sites
Project description
A website where you can create collections on smiles and use it on other sites.
Quick start
Install Smilepack from PyPI:
pip3 install smilepack
Create administrator account:
smilepack createsuperuser
It also creates database.sqlite3 in current directory.
Run HTTP server:
smilepack runserver
Now website is available at http://localhost:5000/ and ready for use, but uploading of icons and smiles is recommended:
Open http://localhost:5000/login/ and login as administrator. Open http://localhost:5000/admin/, click “Other actions” -> “Icon management” and upload at least one icon (don’t forget to configure uploader if you wish upload icon from computer). Tick uploaded icon to publish it, and refresh the page. Now you can create categories of collection and upload smiles here.
For production you can use gunicorn (or another WSGI server):
gunicorn -w 4 ‘smilepack.application:create_app()’
Configuration
You can change default settings by .py file containing configuration class. Example in examples/settings.py. Save it as local_settings.py and load using environment variable:
export SMILEPACK_SETTINGS=local_settings.Production
You can specify any Python object. Be sure that local_settings.py must be available in PYTHONPATH.
For development you can inherit class smilepack.settings.Development, for production use smilepack.settings.Config.
Database
DATABASE_ENGINE и DATABASE are [Pony ORM connection settings](http://doc.ponyorm.com/database.html#database-providers). examples/settings.py has example for MySQL. Default database is sqlite3.
Smiles
Smiles need to be stored somewhere. Use UPLOAD_METHOD:
None (default) — don’t save. All smiles should be uploaded to some hosting in advance.
‘imgur’ — upload to Imgur. For this, set IMGUR_ID of API application. You need to install Flask-Imgur.
‘directory’ — upload to SMILES_DIRECTORY.
ICON_UPLOAD_METHOD setting is similar.
If upload method is set, you can disable custom urls of smiles by ALLOW_CUSTOM_URLS = True. Then all links of user will reuploaded.
SMILE_URL — template for links of smiles stored in SMILES_DIRECTORY. Default /smiles/images/{filename}; if you use another url (CDN for example), you can set another template here. ICON_URL setting is similar.
Utilites
smilepack status — partly verifies the operability of configuration and database;
smilepack shell — runs interactive console with application.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file smilepack-0.2.1.tar.gz
.
File metadata
- Download URL: smilepack-0.2.1.tar.gz
- Upload date:
- Size: 68.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32d1908d4ca54665b55d91c5a9cd10adb3b6cbc43a2b2a9cfd12c1425916e37b |
|
MD5 | b66499b565af5dff48de36932216075f |
|
BLAKE2b-256 | cf0eb8ac1ce78501ee3c1eb4ca81a3782d797aa898253e739a399ec2d3605698 |
File details
Details for the file smilepack-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: smilepack-0.2.1-py3-none-any.whl
- Upload date:
- Size: 434.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 518fcc6f8116e232b226f49ae7b6db9b124a1ee7108892b585f25d79e46e5382 |
|
MD5 | ffb78ec100b8d9e8540d0aa36a7009bd |
|
BLAKE2b-256 | 307dcde1934f214f6e10f1f45dc4d83d3e640be8381cb12e2c9f768b25bb46d5 |