Skip to content

Pyg updates #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ruff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
name: "ruff"
steps:
- name: actions_python_ruff
uses: davidslusser/actions_python_ruff@v1.0.0
uses: davidslusser/actions_python_ruff@v1.0.2
with:
src: "src"
options: "-v"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/safety.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
name: "safety"
steps:
- uses: davidslusser/actions_python_safety@v1.0.1
- uses: davidslusser/actions_python_safety@v1.0.2
with:
options: ""
pip_install_command: "pip install -e .[dev]"
1 change: 1 addition & 0 deletions docs/source/version_history.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

| Release | Details |
|----------|--------|
| 0.0.9 | updates to support the latest pygwalker (0.4.9.8 at time of publishing) |
| 0.0.8 | updating styleguide; chaning default base template for detail pages |
| 0.0.7 | updates for latest pygwalker; adding handling for empty dataframe |
| 0.0.6 | adding query parameter filtering in PygWalkerView |
Expand Down
8 changes: 4 additions & 4 deletions src/djangoaddicts/pygwalker/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get(self, request):
if pd_data.empty:
context = {"no_data": f"no {self.queryset.model.__name__} data found", "title": self.title}
else:
context = {"pyg": pyg.walk(pd_data, return_html=True, dark=self.theme), "title": self.title}
context = {"pyg": pyg.to_html(pd_data, appearance=self.theme), "title": self.title}
return render(request, self.template_name, context)


Expand Down Expand Up @@ -87,7 +87,7 @@ class MyPygView(StaticCsvPygWalkerView):

def get(self, request):
pd_data = pd.read_csv(self.csv_file)
context = {"pyg": pyg.walk(pd_data, return_html=True, dark=self.theme), "title": self.title}
context = {"pyg": pyg.to_html(pd_data, appearance=self.theme), "title": self.title}
return render(request, self.template_name, context)


Expand Down Expand Up @@ -120,7 +120,7 @@ def post(self, request):
)
return render(request, self.template_name, context)
pd_data = pd.read_csv(csv_file)
context["pyg"] = pyg.walk(pd_data, return_html=True, dark=self.theme)
context["pyg"] = pyg.to_html(pd_data, appearance=self.theme)
context[
"title"
] = f"""Showing data from <span class="text-secondary">{csv_file.name.split("/")[-1]}</span>"""
Expand Down Expand Up @@ -163,7 +163,7 @@ def get(self, request, **kwargs):
if pd_data.empty:
context = {"no_data": f"no {self.queryset.model.__name__} data found", "title": title}
else:
context = {"pyg": pyg.walk(pd_data, return_html=True, dark=self.theme), "title": title}
context = {"pyg": pyg.to_html(pd_data, appearance=self.theme), "title": title}
return render(request, self.template_name, context)


Expand Down
Loading