Skip to content

EMEEEEMMMM/FamilyWebsite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Family Website


Introduction

This is a simple family website based on Django.


Installation

There is no specific version of python, I used python 3.11.9. Of course, you can also create a virtual environment.

git clone https://github.com/EMEMEMEMEMEMEMEMEMEM/FamilyPhotoAlbum.git
pip install django
pip install mysqlclient

Makesure that your server has mysql on it

sudo apt update
sudo apt install mysql-server
mysql --version
    e.g.: mysql  Ver 8.0.42-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))

And then create your database for you photos

mysql -u root -p
create database YOUR_DATABASE DEFAULT CHARSET utf8 COLLATE utf8_general_ci;

Change the configuration in FamilyPhotoAlbum/settings.py

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'YOUR_DATABASE_NAME',#Change it Here
        'USER': 'root',
        'PASSWORD': 'YOUR_PASSWORD',#Change it Here
        'HOST': '127.0.0.1',#default
        'PORT': 3306,#default
    }
}

The last thing before booting up the server

python manage.py migrate
python manage.py makemigrations

After a lot of configuration, boot up the server

python manage.py runserver 0.0.0.0:8000

Store your photos in /PhotoAlbum/static/media/XXXX/YYYY-MM-DD (I had written a python script which can sort photos into folders by the order of time,but I can't find it anywhere in my laptop, just use any AI to help you save some time.)

Access http://YOURSERVER_IP:8000/mml/ Enter the absolute path of your photos in the /static/media/XXX/ and click the button.

Your photos will be shown in http://YOURSERVER_IP:8000/album2017/

Replace the photos in /static/images/XXXXX with your family members'photos.And change the things in /static/templates/home.html

For example: <img src="/static/images/male 001.JPG"> There is a corresponding one above and below. Remember to change them all.


OpenWebUI (optional)

In the settings.py, you can change the default settings your openwebui_url OPENWEBUI_URL = "http://localhost:8080" And change the settings in the openwebui_embed.html

<iframe id="openwebui-frame"
        src="http://YOUROPENWEBUI:8080"
        allow="clipboard-write; microphone">
</iframe>

A wrong.html is prepared.


Boinc (optional)

https://boinc.berkeley.edu/ BOINC lets you help cutting-edge science research using your computer. The BOINC app, running on your computer, downloads scientific computing jobs and runs them invisibly in the background. It's easy and safe.

Grade 9 2025/06/25

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published