Adding all last updates to repo
Please add and commit when you change someting!
This commit is contained in:
44
FETDjango/3_1_create_clone.md
Normal file
44
FETDjango/3_1_create_clone.md
Normal file
@@ -0,0 +1,44 @@
|
||||
title: 3.1 Erstellen einer eigenen Kopie
|
||||
|
||||
## 1. Öffnen
|
||||
Öffnen einer Enwicklungsumgebung
|
||||
|
||||
https://dev.2020.fet.at/#/srv/<username>
|
||||
|
||||
## 2. Clone Erstellen
|
||||
Terminal öffnen Terminal -> New Terminal
|
||||
|
||||
:::bash
|
||||
git clone https://git.fet.at/bofh/fet2020 .
|
||||
|
||||
## 3. Erstellen der Python Umgebung
|
||||
Erstellen und aktivieren der Python Umgebung
|
||||
|
||||
:::bash
|
||||
python3 -m venv .env
|
||||
activate
|
||||
pip install -r fet2020/requirements.txt
|
||||
pip install django-filter ##fehlt in dem requerements
|
||||
|
||||
ev. ist das Textfile im fet2020/fet2020 Ordner.
|
||||
|
||||
## 4. Datenbank migrieren
|
||||
|
||||
:::bash
|
||||
python3 fet2020/manage.py makemigrations
|
||||
python3 fet2020/manage.py migrate
|
||||
|
||||
## 5. Verlinken der gemeinsamen Templates
|
||||
:::bash
|
||||
./create_design_links
|
||||
|
||||
|
||||
python3 fet2020/manage.py runserver 0.0.0.0:8106
|
||||
|
||||
## 6. Git username und email für commits einstellen
|
||||
Da wir auf einem Benutzer arbeiten, müssen deine Credentials für git commits lokal eingestellt werden. Ersetze in folgenden Befehlen die Parameter `<user>` und `<email>` mit eigenen Werten:
|
||||
|
||||
:::bash
|
||||
git config --local user.name "<user>"
|
||||
git config --local user.email "<email>"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
title: 2. FET Django fixes
|
||||
title: 3. FET 2020 Template nutzen und erweitern
|
||||
template: page_plain.html
|
||||
|
||||
$subpages$
|
||||
@@ -14,7 +14,7 @@ Alternativ kannst du dich per ssh mit dem Server verbinden, dazu in deine ~/.ssh
|
||||
Wenn du kein Linux haben solltest google "Proxycommand Windows".
|
||||
|
||||
:::bash
|
||||
Host andisgeheimemaschine #ANDIS ich kenn die VM nicht
|
||||
Host 192.168.86.139 #vom Sputnik aus
|
||||
ProxyCommand ssh peter@sputnik.htu.tuwien.ac.at -W %h:%p
|
||||
|
||||
|
||||
|
||||
@@ -15,4 +15,6 @@ Aktivieren einer viruellen Python3 Umgebung.
|
||||
www@fetsite:/srv/test_1$ python3 -m venv .env
|
||||
www@fetsite:/srv/test_1$ activate
|
||||
(.env) www@fetsite:/srv/test_1$
|
||||
www@fetsite:/srv/test_1$ python3 -m pip install flask
|
||||
Ab jetzt sollte die Zeile im Terminal beginnen mit (.env).
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
title: 1.3 Hello World mit Flask
|
||||
Erstelle eine kleine Python Datei, zB test.py mit dem Inhalt:
|
||||
|
||||
:::bash
|
||||
vim test.py
|
||||
|
||||
:::python
|
||||
from flask import Flask
|
||||
app = Flask(__name__)
|
||||
|
||||
@@ -1 +1,28 @@
|
||||
title: "1.4 Git aktivieren"
|
||||
|
||||
## Erstellen eines gits
|
||||
|
||||
Erstelle ein git repository in deinem Ordner.
|
||||
|
||||
:::bash
|
||||
www@fetsite:/srv/pet1$ git init
|
||||
www@fetsite:/srv/pet1$ git config --global user.email "pet@fet.at"
|
||||
www@fetsite:/srv/pet1$ git config --global user.name "Peter"
|
||||
|
||||
## Erster commit
|
||||
|
||||
Mach einen commit, diese schritte wiederholen sich jedes mal wenn du einen commit machen willst.
|
||||
|
||||
:::bash
|
||||
www@fetsite:/srv/pet1$ git stage *
|
||||
www@fetsite:/srv/pet1$ git commit -m "first commit"
|
||||
|
||||
## Configuriere remote (optional)
|
||||
|
||||
Wenn du willst kannst du unter [git.fet.at](https://git.fet.at) ein remote repo erstellen und einrichten.
|
||||
|
||||
:::bash
|
||||
#Either specify the URL from the command-line or configure a remote repository using
|
||||
www@fetsite:/srv/pet1$ git remote add <name> <url>
|
||||
#and then push using the remote name
|
||||
www@fetsite:/srv/pet1$ git push <name>
|
||||
|
||||
43
Setup_FET_Template/2_1_setup_environment.md
Normal file
43
Setup_FET_Template/2_1_setup_environment.md
Normal file
@@ -0,0 +1,43 @@
|
||||
title: 2.1 Setup für Entwicklungsumgebung
|
||||
|
||||
|
||||
Den Anweisungen in Kapitel 1 dieser Dokumentation folgend eine Entwicklungsumgebung aktivieren.
|
||||
|
||||
* [Install](/HowToStart/1_1_setup_new_environment/)
|
||||
* [First Steps](/HowToStart/1_2_first_steps/)
|
||||
|
||||
|
||||
Wieder in das python environment einsteigen:
|
||||
|
||||
:::bash
|
||||
python3 -m venv .env
|
||||
activate
|
||||
|
||||
|
||||
## Django installieren und app initalisieren
|
||||
[Tutorial dem ich lose gefolgt bin](https://docs.djangoproject.com/en/3.0/intro/tutorial01/)
|
||||
|
||||
:::bash
|
||||
python3 -m pip install django
|
||||
django-admin startproject fet2020
|
||||
cd fet2020
|
||||
python manage.py startapp posts
|
||||
|
||||
|
||||
Git Initailisieren vor erstem individuellen
|
||||
|
||||
:::bash
|
||||
cd /srv/fet2020_app
|
||||
git init
|
||||
|
||||
Create .gitignore
|
||||
|
||||
:::bash
|
||||
.env/*
|
||||
*.pyc
|
||||
|
||||
Initial commit
|
||||
|
||||
:::bash
|
||||
git add fet2020/*
|
||||
git commit -m "Init commit"
|
||||
4
Setup_FET_Template/2_2_templates.md
Normal file
4
Setup_FET_Template/2_2_templates.md
Normal file
@@ -0,0 +1,4 @@
|
||||
title: 2.2 Templates und assets
|
||||
|
||||
|
||||
:::bash
|
||||
5
Setup_FET_Template/index.md
Normal file
5
Setup_FET_Template/index.md
Normal file
@@ -0,0 +1,5 @@
|
||||
title: 2. FET Template einrichten
|
||||
template: page_plain.html
|
||||
|
||||
Diese Section muss nicht mehr durchgearbeitet werden, soll aber alle Schritte zeigen mit denen das 2020 Template erstellt wurde.
|
||||
$subpages$
|
||||
29
index.md
29
index.md
@@ -13,11 +13,17 @@ image: Documentation-binders.jpg
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">andis/bofh</th>
|
||||
<td><a href="https://dev.2020.fet.at/#/srv/fet2020_app" target="_blank">Template / Master für FET 2020 </a></td>
|
||||
<td><a href="https://test.2020.fet.at/">test.2020.fet.at - DevPort 8100</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">andis</th>
|
||||
<td><a href="https://dev.2020.fet.at/#/srv/django_test/test1" target="_blank">Entwicklung: Django Versuch von Andi </a></td>
|
||||
<td><a href="https://andisdjango.2020.fet.at/">andisdjango.2020.fet.at - DevPort 8101</a> </td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">andis</th>
|
||||
<td><a href="https://dev.2020.fet.at/#/srv/test_1" target="_blank"> Design Test Foundation </a></td>
|
||||
@@ -35,9 +41,24 @@ image: Documentation-binders.jpg
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">pet_1</th>
|
||||
<th scope="row">pet</th>
|
||||
<td><a href="https://dev.2020.fet.at/#/srv/pet_1" target="_blank"> Test1 von peter </a></td>
|
||||
<td><a href="https://pet_1.2020.fet.at/">pet_1.2020.fet.at - DevPort 8105</a> </td>
|
||||
<td><a href="https://pet1.2020.fet.at/">pet1.2020.fet.at - DevPort 8105</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">andis</th>
|
||||
<td><a href="https://dev.2020.fet.at/#/srv/andis" target="_blank"> AndisDjango Projekt </a></td>
|
||||
<td><a href="https://andis.2020.fet.at/">andis.2020.fet.at - DevPort 8106</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">lacki</th>
|
||||
<td><a href="https://dev.2020.fet.at/#/srv/lacki" target="_blank"> Lacki s Projekt </a></td>
|
||||
<td><a href="https://lacki.2020.fet.at/">lacki.2020.fet.at - DevPort 8107</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">patrick</th>
|
||||
<td><a href="https://dev.2020.fet.at/#/srv/patrick" target="_blank"> Patrick s Projekt </a></td>
|
||||
<td><a href="https://patrick.2020.fet.at/">patrick.2020.fet.at - DevPort 8108</a> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user