Skip to content

Commit

Permalink
feat: add tutorial page for downloading JSON data from Instagram
Browse files Browse the repository at this point in the history
  • Loading branch information
ridwaanhall committed Feb 7, 2025
1 parent e46564d commit 0fd88d8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
29 changes: 29 additions & 0 deletions analytics/templates/analytics/tutorial.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{% extends 'base.html' %}

{% block title %}Tutorial: Get JSON Data{% endblock %}

{% block content %}
<section class="section">
<div class="container">
<h1 class="title has-text-centered">Tutorial to Get JSON Data of Following and Followers</h1>

<div class="content">
<ol>
<li>Go to your Instagram profile.</li>
<li>Click the top-right icon with three horizontal lines.</li>
<li>Click "Account Center".</li>
<li>In account settings, select "Your Information and Permissions".</li>
<li>Click "Download Your Information".</li>
<li>Click "Download or Transfer Information".</li>
<li>Select your account.</li>
<li>Select "Some of your information".</li>
<li>In the "Connections" section, select "Followers and Following".</li>
<li>Download to your device.</li>
<li>Set the date range to "All time" and format to "JSON".</li>
<li>Click the "Create Files" button.</li>
<li>After a few minutes, navigate to "Download Your Information".</li>
</ol>
</div>
</div>
</section>
{% endblock %}
5 changes: 3 additions & 2 deletions analytics/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.urls import path
from .views import UploadFileView
from . import views

urlpatterns = [
path('', UploadFileView.as_view(), name='upload_file'),
path('', views.UploadFileView.as_view(), name='upload_file'),
path('tutorial/', views.TutorialView.as_view(template_name='analytics/tutorial.html'), name='tutorial'),
]
6 changes: 5 additions & 1 deletion analytics/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from django.views.generic.edit import FormView
from .forms import UploadFileForm
import json
from django.views.generic.base import TemplateView

class UploadFileView(FormView):
template_name = 'analytics/upload.html'
Expand Down Expand Up @@ -67,4 +68,7 @@ def show_results_from_text(self, following_text, followers_text):
'list_non_follow_back': list(following_set - followers_set),
'list_not_following_back': list(followers_set - following_set),
}
return render(self.request, 'analytics/results.html', context)
return render(self.request, 'analytics/results.html', context)

class TutorialView(TemplateView):
template_name = 'analytics/tutorial.html'

0 comments on commit 0fd88d8

Please sign in to comment.