Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
Nuovo sito
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
Nuovo sito
Commits
9041fd8f
Commit
9041fd8f
authored
Nov 29, 2023
by
shadMod
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cp tree path from 'assets/news' to 'data/news'
parent
23641322
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
uitwww/__init__.py
uitwww/__init__.py
+7
-1
No files found.
uitwww/__init__.py
View file @
9041fd8f
...
...
@@ -16,8 +16,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
os
import
flask
import
shutil
from
.
import
actions
from
.
import
auth
...
...
@@ -29,6 +29,7 @@ from . import pages
from
.
import
redirects
from
.
import
utils
from
.src.news
import
news
from
.constants
import
BASE_DIR
def
create_app
(
data_path
,
debug
=
False
):
...
...
@@ -92,6 +93,11 @@ def init_data_directory(data_path: str):
for
_dir
in
dirs
:
os
.
makedirs
(
os
.
path
.
join
(
data_path
,
_dir
),
exist_ok
=
True
)
# Copy news tree dirs and file
ROOT_NEWS
=
os
.
path
.
join
(
BASE_DIR
,
"assets/news"
)
NEWS_PATH
=
os
.
path
.
join
(
data_path
,
"news"
)
shutil
.
copytree
(
ROOT_NEWS
,
NEWS_PATH
,
dirs_exist_ok
=
True
)
# Initialize the cache
static_dirs
=
{
"static"
:
"+assets"
}
for
src
,
dest
in
static_dirs
.
items
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment