Commit d859b617 authored by Behr, Svenja's avatar Behr, Svenja
Browse files

- Readme erweitert

parent ff9b7c18
# Django_Blog # Django_Blog
## Description
This is a simple blog, written in Python and Django. As CSS framework, bootstrap 4
is used.
We have a customizable start page and a flexible blog system. In the admin surface,
all blog contents can be edited. Some of them are fixed and needed to be there
to work properly. These are:
* start-page: The start-page, of course :) Change content to something nice
* impress: Fill with impress data
* contact: Contact information of the page owner
* 404: Error page content
There are also some sample-article, which only exist to demonstration purposes.
## Blog fields explained
### Identifier
This unique key is used to identify your article quick and is also used for fixed
content (see above). It is filled with a hash by default.
### Title
This Title will be shown at the browser tab, the top of an article and, if shown there,
in the title of the card tab.
### Description
Content of the blog, filled with an WYSIWYG editor.
### Dates
Creation and edit date. You usually don't need to change them.
### Image
This image is the teaser of your article. It is shown above the article content
and the card element. If none, the area will be without image. However, you can add
more images by the WYSIWYG editor.
### Status
This is a binary combined field to set the states of the blog. You can sum them up to
add several states:
* 0 = Normal Article
* 1 = Article is hidden in overview
* 2 = Article can have comments
Setting the state to 3 would hide the article, but allow comments to it.
### Slug
This is where you can reach your article by. For example, if you wrote "example-1",
you can call http://127.0.0.1:8000/sample-1 to see the details view of it.
If you call a slug which does not exist, you will receive a 404 error message.
## Setup
### Prepare system
Load these requirements by
`pip install [REQ_NAME]`
* asgiref==3.2.7
* beautifulsoup4==4.9.1
* Django==3.0.7
* django-bootstrap4==2.0.1
* importlib-metadata==1.6.1
* Pillow==7.1.2
* pytz==2020.1
* soupsieve==2.0.1
* sqlparse==0.3.1
* zipp==3.1.0
* django-ckeditor==5.9.0
**Hint**: We installed the basic project enviorment by PyCharm using a Django project as default.
After that, only these components needs to be loaded:
* django-bootstrap4==2.0.1
* Pillow==7.1.2
* django-ckeditor==5.9.0
### Prepare Database
Run the following commands to create the database:
`manage.py migrate`
`manage.py loaddata blog`
Afterwards, you need to setup your database user:
`manage.py createsuperuser`
We used admin/blog1234 as default.
### Start your application
To start the application, run
`manage.py runserver --insecure`
The `--insecure` statement is necessary to provide static content and our nicer 404 page for error cases.
Otherwise, an external web server would be necessary.
### Check if it worked
Open the link http://127.0.0.1:8000/ and check, if the page opens up and shows some content like author.
**Note!** If you see a message, telling you to perform manage.py commands, something went wrong, as the
start page content could not be found. Try to redo the steps above, please.
# AB HIER NOCH SAUBER MACHEN
### Django Befehle ### Django Befehle
#### Neues Module (App) #### Neues Module (App)
`manage.py startapp *appname*` `manage.py startapp *appname*`
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment