{"id":13472839,"url":"https://github.com/zhu327/forum","last_synced_at":"2025-07-23T13:33:50.181Z","repository":{"id":25530856,"uuid":"28963296","full_name":"zhu327/forum","owner":"zhu327","description":"Django forum clone from F2E.im support SAE","archived":false,"fork":false,"pushed_at":"2018-06-06T09:18:22.000Z","size":3834,"stargazers_count":252,"open_issues_count":1,"forks_count":128,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-05-20T10:03:20.125Z","etag":null,"topics":["django","forum","python"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhu327.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-08T11:38:29.000Z","updated_at":"2024-12-10T06:19:04.000Z","dependencies_parsed_at":"2022-08-06T06:15:28.332Z","dependency_job_id":null,"html_url":"https://github.com/zhu327/forum","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zhu327/forum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhu327%2Fforum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhu327%2Fforum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhu327%2Fforum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhu327%2Fforum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhu327","download_url":"https://codeload.github.com/zhu327/forum/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhu327%2Fforum/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266689230,"owners_count":23969140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","forum","python"],"created_at":"2024-07-31T16:00:58.385Z","updated_at":"2025-07-23T13:33:50.125Z","avatar_url":"https://github.com/zhu327.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"### Django forum\n\n***\n\nDjango forum是使用Django实现的轻型现代论坛程序,是fork自[F2E.im](https://github.com/PaulGuo/F2E.im)的Django版本.  \n相对于原版的主要区别在于使用Django admin实现了一个简单的后台管理.\n\nDjango forum有2个分支,master分支用于主机上部署,SAE分支是适配Sina App Engine的版本\n\n#### 安装部署\n\n主机版:\n\n依赖MySQL数据库,以及memcached\n\n1. 获取代码\n2. 安装依赖\n3. 导入数据库文件\n4. 修改配置文件\n5. 运行服务\n\n```shell\nshell\u003e git clone git@github.com:zhu327/forum.git\n\nshell\u003e cd forum\nshell\u003e pip install -r requirements.txt\n\nshell\u003e mysql -u YOURUSERNAME -p\n\nmysql\u003e create database forum;\nmysql\u003e exit\n\nshell\u003e mysql -u YOURUSERNAME -p --database=forum \u003c forum.sql\n```\n\n修改`xp/settings.py`\n\n```python\n# 修改数据库配置\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.\n        'NAME': 'forum',                      # Or path to database file if using sqlite3.\n        # The following settings are not used with sqlite3:\n        'USER': 'root',\n        'PASSWORD': '',\n        'HOST': '127.0.0.1',                      # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.\n        'PORT': '3306',                      # Set to empty string for default.\n    }\n}\n\n# 修改memcached配置,如果没有memcahed请删除这些与cache相关的内容\nCACHES = { # memcached缓存设置\n    'default': {\n        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',\n        'LOCATION': '127.0.0.1:11211',\n    }\n}\n\nSESSION_ENGINE = 'django.contrib.sessions.backends.cache' # 使用memcached存储session\n\n# 配置邮件发送\nEMAIL_HOST = 'smtp.qq.com'\nEMAIL_PORT = 25\nEMAIL_HOST_USER= '*********'\nEMAIL_HOST_PASSWORD= '******'\nDEFAULT_FROM_EMAIL = '*********@qq.com'\n```\n\n运行服务\n\n```shell\npython manage.py runserver\n```\n\n默认超级用户`admin@forum.com`,密码`123456`,后台`/manage/admin/`\n\n生产环境下推荐使用gunicorn.\n\nSAE版\n\nSAE版本依赖已打包到site-packages.zip,头像存储使用七牛,所以还需要申请七牛云.\n\n1. SAE上创建python应用,激活MySQL,memcached,创建应用版本\n2. 获取代码\n3. SAE MySQL后台导入forum.sql文件\n4. 修改配置文件\n5. 上传代码\n6. 登录后台设置\n\n```shell\nshell\u003e git clone -b sae git@github.com:zhu327/forum.git\n\nshell\u003e cd forum\n```\n\n登录SAE进入MySQL在线管理导入forum.sql\n\n修改`xp/settings.py`\n\n```python\n# 邮件发送设置\nEMAIL_HOST = 'smtp.qq.com'\nEMAIL_PORT = 25\nEMAIL_HOST_USER= '*********'\nEMAIL_HOST_PASSWORD= '******'\nDEFAULT_FROM_EMAIL = '*********@qq.com'\n\n# 七牛云存储设置\nQINIU_ACCESS_KEY = '******'\nQINIU_SECRET_KEY = '******'\nQINIU_BUCKET_NAME = '******'\nQINIU_BUCKET_DOMAIN = '******'\n```\n\n修改`config.yaml`\n\n```yaml\nname: way2go // 这里改为你自己的SAE应用名\nversion: 1\n```\n\nSVN上传即可.\n\n#### 更新\n\nSAE 版本新增功能,可使用`SAE kvdb`做缓存,缓存后端使用`xp.cache.SaekvdbCache`,减少云豆消耗.  \nSAE激活kvdb并关闭`memcached`功能,修改`xp/settings.py`,`SAE kvdb`会比`memcached`慢一点,但是会便宜很多\n\n```python\nCACHES = { # memcached缓存设置\n    'default': {\n        # 'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache', # SAE使用pylibmc\n        'BACKEND': 'xp.cache.SaekvdbCache', # 可选用SAE kvdb做缓存，消耗云豆更少\n        'LOCATION': '127.0.0.1:11211',\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhu327%2Fforum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhu327%2Fforum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhu327%2Fforum/lists"}