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
cf25e9e8
Commit
cf25e9e8
authored
Dec 02, 2023
by
shadMod
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replaced for loop with GetNews().get_all_files_counter()
parent
8d3afb08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
uitwww/pages.py
uitwww/pages.py
+3
-2
No files found.
uitwww/pages.py
View file @
cf25e9e8
...
...
@@ -20,6 +20,7 @@ import toml
import
flask
from
uitwww
import
cache
from
.src.news.utils
import
GetNews
def
get_pages_list
(
app
,
base
=
None
,
level
=
0
):
...
...
@@ -79,8 +80,8 @@ def prepare_blueprint(app):
data_path
=
os
.
path
.
expanduser
(
os
.
path
.
abspath
(
"data"
))
def
list_news
():
n
ews_path
=
os
.
path
.
join
(
data_path
,
"news"
,
"2023"
)
_list_news
=
[
x
.
replace
(
'.md'
,
''
)
for
x
in
os
.
listdir
(
news_path
)[:
4
]]
n
w_cl
=
GetNews
(
os
.
path
.
join
(
app
.
instance_path
,
"news"
)
)
_list_news
=
nw_cl
.
get_all_files_counter
(
4
)
return
_list_news
def
list_distro
():
...
...
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