Skip to main content

ai on zfl

Project description

zfl-ai

PyPI - Version PyPI - Python Version


目次

詳細

djangoプロジェクトでインストールできるDjangoアプリです。

使用方法は以下からご覧ください。

インストール

実行環境は「Python3.7」、「Django2.2.5」です。

Djangoアプリはpipでインストールします。

$ pip install zfl-ai

GitHubからインストールする場合。

$ pip github+

Djangoプロジェクトを作成

$ django-admin startproject myproject .

言語を設定します。

myproject/settings.py

# Internationalization
# https://docs.djangoproject.com/en/4.2/topics/i18n/

LANGUAGE_CODE = 'ja'

TIME_ZONE = 'Asia/Tokyo'

USE_I18N = True

USE_TZ = True

Djangoプロジェクトに設定(テスト)

「templates/base.html」を作成します。

$ mkdir templates && touch templates/base.html

base.htmlの内容

{% load static %}
<html lang="ja" prefix="og: http://ogp.me/ns#">
  <head>

    <!-- BootStrap CSS Link -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">


    <!-- StaticFiles CSS -->
    {% block ai-style %}{% endblock %}

  </head>
  <body>

    <!-- Djangoテンプレートタグ -->

    {% block content %}
    {% endblock %}

    <!-- BootStrap jQuery -->
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

  </body>
</html>

Djangoアプリを設定します。

myproject/settings.py

INSTALLED_APPS = [
    ...,
    "ai",
]

プロジェクト直下のtemplatesを読み込むように設定。

TEMPLATES = [
    {
        ...
        'DIRS': [os.path.join(BASE_DIR, 'templates')],
        ...
    },
]

myproject/urls.py

...
from django.urls import path, include

urlpatterns = [
    ...,
    path('', include('ai.urls')),
]

サーバーを起動します。

$ python3 manage.py runserver

License

zfl-ai is distributed under the terms of the MIT license.

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

zfl_ai-0.0.2.tar.gz (30.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zfl_ai-0.0.2-py3-none-any.whl (30.2 MB view details)

Uploaded Python 3

File details

Details for the file zfl_ai-0.0.2.tar.gz.

File metadata

  • Download URL: zfl_ai-0.0.2.tar.gz
  • Upload date:
  • Size: 30.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.1

File hashes

Hashes for zfl_ai-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e51a9038ea3b5ea442a69546ac04e66e9f4826d4a03acd1970f97c3c7708605b
MD5 b5118a5b96a3b2638f984c0956e6f1ce
BLAKE2b-256 256594dc4a953ed46a8a3afcfbab8f50295f77521c22f2827336cbe6f44b5f56

See more details on using hashes here.

File details

Details for the file zfl_ai-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: zfl_ai-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 30.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.1

File hashes

Hashes for zfl_ai-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a046f8922b5178675522f64f56b36339563d15abf5a15b2a1ee2165d7e3926e5
MD5 19a2eba40adf1783291d31c14576d502
BLAKE2b-256 05477eedd99b1e77f37ad5fef47757e49b5c10e15810ab18f22e9f857b8ba9c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page