Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Maják
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Maják
Commits
222761b1
Commit
222761b1
authored
3 years ago
by
OndraRehounek
Committed by
jan.bednarik
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Refactor jekyll import to Class
parent
657e3a7c
No related branches found
No related tags found
2 merge requests
!442
Release
,
!432
Feature/majak imports
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
district/forms.py
+4
-3
4 additions, 3 deletions
district/forms.py
district/jekyll_import.py
+350
-309
350 additions, 309 deletions
district/jekyll_import.py
with
354 additions
and
312 deletions
district/forms.py
+
4
−
3
View file @
222761b1
...
...
@@ -3,7 +3,7 @@ from django.contrib.messages import ERROR, WARNING
from
wagtail.admin.forms
import
WagtailAdminPageForm
from
wagtail.core.models.collections
import
Collection
from
.jekyll_import
import
perform_i
mport
from
.jekyll_import
import
JekyllArticleI
mport
er
class
JekyllImportForm
(
WagtailAdminPageForm
):
...
...
@@ -72,13 +72,14 @@ class JekyllImportForm(WagtailAdminPageForm):
return
cleaned_data
def
handle_import
(
self
):
import_message_list
=
perform_i
mport
(
import_message_list
=
JekyllArticleI
mport
er
(
article_parent_page
=
self
.
instance
,
collection
=
self
.
cleaned_data
[
"
collection
"
],
url
=
self
.
cleaned_data
[
"
jekyll_repo_url
"
],
dry_run
=
self
.
cleaned_data
[
"
dry_run
"
],
use_git
=
self
.
cleaned_data
[
"
use_git
"
],
)
).
perform_import
()
self
.
instance
.
import_message_list
=
import_message_list
return
import_message_list
...
...
This diff is collapsed.
Click to expand it.
district/jekyll_import.py
+
350
−
309
View file @
222761b1
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment