---
# System prepended metadata

title: 'Hackathon Group I: TSMC OneStop'

---

# Hackathon Group I: TSMC OneStop

An integrated website for newcomers with helpful information and communication channels. This one-stop platform makes it easy to transition into TSMC.

[TOC]


## PPT Link
https://1drv.ms/p/s!Al2nSmflJlCTtEhGdcxZJ86ZwD9-?e=MdwpVc


## Features
### Helpful Info
* Timeline
* Mentor Contact
* HR Representative Contact
* Dorm Registration - form link. Submit to whom. Deadline.
* Traffic Info - general example
* List of things required

### Chat with Mentor/HR
(personal profile page)

Boru、林荃

### Homepage
(Helpful Info dropdown list)
晉豪、彥昀(html)

### Document Upload
### Event Calendar
皓凱、國珅

## Presentation Structure
為什麼（痛點、user story
tech. detail 
video demo
homepage
chat
calendar
summary + future work

## Deadline
8/09 程式完成
8/10 PPT完成
8/11 下午四點Rehearsal
8/12 報告

## Resources
1. [Django official tutorial](https://docs.djangoproject.com/en/3.2/intro/tutorial01/)
2. [Bootstrap](https://getbootstrap.com/docs/5.0/getting-started/introduction/)
3. [Homepage](https://github.com/nikolak/django-template)
4. [Chat](https://github.com/narrowfail/django-channels-chat)
5. [Calendar](https://github.com/llazzaro/django-scheduler)


## Development Guide

1. Redis Server (Windows)
    >   Note: 各 OS 都會有些差異，大家可能要自己上網查一下
    
    下載、安裝 (我是載`Redis-x64-3.2.100.msi`這個)
    [Release Page](https://github.com/microsoftarchive/redis/releases)
    
    這個可以勾一下，比較好做事
    ![](https://i.imgur.com/yzakpA7.png)
    
    裝完之後在 cmd 打 `redis-cli info` 應該會看到一些東西
    ![](https://i.imgur.com/cHkhc59.png)
    
    啟動 redis-server
    到 redis 的 directory 點擊 `redis-server.exe`
    (e.g., C:\Program Files\Redis)
    
    
    看到這個就成功了
    ![](https://i.imgur.com/jlZ1iH6.png)

2. dev. env. setting
    啟一個 virtual environment
    `python -m venv .env`
    
    進入 venv (windows)
    `.env\Scripts\activate`
    
    更新 pip
    `python -m pip install --upgrade pip`
    
    下載 project
    [Here](https://github.com/calvinlclee3/tsmc_hackathon)，照大家習慣的方式下載
    
    進入 project folder
    `cd tsmc_hackathon`
    
    安裝 dependency
    `pip install -r requirements.txt`

3. 啟動 django
    先遷移一下資料
    `python manage.py migrate`
    
    啟服務
    `python manage.py runserver`
    
    接著就可以在 127.0.0.1:8000 看到網站
    

> 以上是第一次搞環境要做的事，之後開發的時候基本上只要
> 1. 啟 redis-server `redis-server.exe`
> 2. 進入 virtual env. `.env\Scripts\activate`
> 3. 啟 django 服務 `python manage.py runserver`


## Useful command

1. 如果有改 model (database)


    Change your models (in `models.py`).
    Run `python manage.py makemigrations` to create migrations for those changes
    Run `python manage.py migrate` to apply those changes to the database.
    
2. 創建 superuser
    `python manage.py createsuperuser`
    目前已有一組 (account: admin, password: admin) 可以用，不用另外創
    
3. 進入後台
    127.0.0.1:8000/admin
    這邊可以管理 DB，也可以更改用戶的權限

4. 創建一般 user
    進入後台之後，AUTHENTICATION AND AUTHORIZATION > Users > ADD USER
     
5. 啟一個新的 application
    `python manage.py startapp [app_name]`
    > 目前的 config
    > project name: chat (改有點麻煩，再請大家擔待)
    > app name：
    > > home - 處理 首頁
    > > core - 處理 chat room
