Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

Commit 3018bc8

Browse files
Some changes made in the subway
1 parent c8ebcf4 commit 3018bc8

File tree

13 files changed

+171
-117
lines changed

13 files changed

+171
-117
lines changed
274 Bytes
Binary file not shown.
15 Bytes
Binary file not shown.

Profile/admin.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44
# Register your models here.
55
admin.site.register(Profile)
66
admin.site.register(Wallet)
7-
admin.site.register(Transaction)
7+
8+
class TransactionAdmin(admin.ModelAdmin):
9+
list_display = ['user', 'points', 'payment_method', 'completed']
10+
list_filter = ['completed']
11+
12+
admin.site.register(Transaction, TransactionAdmin)
13+
14+
815
admin.site.register(Referral)
916
admin.site.register(RecentEarnings)
1017
admin.site.register(ResetPassword)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Generated by Django 3.2.18 on 2023-06-26 08:29
2+
3+
import datetime
4+
from django.db import migrations, models
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('Profile', '0017_auto_20230625_1159'),
11+
]
12+
13+
operations = [
14+
migrations.AlterField(
15+
model_name='recentearnings',
16+
name='created_at',
17+
field=models.DateField(default=datetime.date(2023, 6, 26)),
18+
),
19+
migrations.AlterField(
20+
model_name='referral',
21+
name='signed_up_at',
22+
field=models.DateField(default=datetime.date(2023, 6, 26)),
23+
),
24+
migrations.AlterField(
25+
model_name='transaction',
26+
name='created_at',
27+
field=models.DateField(default=datetime.date(2023, 6, 26)),
28+
),
29+
]
Binary file not shown.

Profile/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ class RecentEarningsView(APIView):
573573

574574
def get(self, request):
575575
user = request.user
576-
recent_earnings = RecentEarnings.objects.filter(user=user).order_by('-created_at')[:10]
576+
recent_earnings = RecentEarnings.objects.filter(user=user).order_by('-created_at')[:10][::-1]
577577
serializer = RecentEarningsSerializer(recent_earnings, many=True)
578578
return Response(serializer.data)
579579

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

questions.json

Lines changed: 120 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,123 @@
11
[
22
{
3-
"subject": "Chemistry",
4-
"question": "What is the chemical symbol for gold?",
5-
"choices": [
6-
"Go",
7-
"Au",
8-
"Ag",
9-
"Gl"
10-
],
11-
"correct_answer": "Au"
12-
},
13-
{
14-
"subject": "Chemistry",
15-
"question": "What is the pH value of a neutral substance?",
16-
"choices": [
17-
"1",
18-
"7",
19-
"14",
20-
"0"
21-
],
22-
"correct_answer": "7"
23-
},
24-
{
25-
"subject": "Chemistry",
26-
"question": "What is the lightest element on the periodic table?",
27-
"choices": [
28-
"Oxygen",
29-
"Carbon",
30-
"Hydrogen",
31-
"Helium"
32-
],
33-
"correct_answer": "Hydrogen"
34-
},
35-
{
36-
"subject": "Chemistry",
37-
"question": "What is the chemical formula for water?",
38-
"choices": [
39-
"H2O2",
40-
"CO2",
41-
"H2SO4",
42-
"H2O"
43-
],
44-
"correct_answer": "H2O"
45-
},
46-
{
47-
"subject": "Chemistry",
48-
"question": "Which gas is most abundant in Earth's atmosphere?",
49-
"choices": [
50-
"Oxygen",
51-
"Carbon dioxide",
52-
"Nitrogen",
53-
"Hydrogen"
54-
],
55-
"correct_answer": "Nitrogen"
56-
},
57-
{
58-
"subject": "Chemistry",
59-
"question": "What is the process of converting a solid directly into a gas called?",
60-
"choices": [
61-
"Condensation",
62-
"Sublimation",
63-
"Evaporation",
64-
"Melting"
65-
],
66-
"correct_answer": "Sublimation"
67-
},
68-
{
69-
"subject": "Chemistry",
70-
"question": "Which element is essential for human respiration?",
71-
"choices": [
72-
"Carbon",
73-
"Oxygen",
74-
"Nitrogen",
75-
"Hydrogen"
76-
],
77-
"correct_answer": "Oxygen"
78-
},
79-
{
80-
"subject": "Chemistry",
81-
"question": "What is the chemical symbol for iron?",
82-
"choices": [
83-
"Ir",
84-
"Fe",
85-
"Au",
86-
"Ag"
87-
],
88-
"correct_answer": "Fe"
89-
},
90-
{
91-
"subject": "Chemistry",
92-
"question": "What is the state of matter with the least amount of energy?",
93-
"choices": [
94-
"Solid",
95-
"Liquid",
96-
"Gas",
97-
"Plasma"
98-
],
99-
"correct_answer": "Gas"
100-
},
101-
{
102-
"subject": "Chemistry",
103-
"question": "What is the process of combining two or more elements to form a new substance called?",
104-
"choices": [
105-
"Decomposition",
106-
"Combustion",
107-
"Ionization",
108-
"Chemical reaction"
109-
],
110-
"correct_answer": "Chemical reaction"
3+
"subject": "Sports",
4+
"question": "Which country won the FIFA World Cup in 2018?",
5+
"choices": ["Germany", "Brazil", "France", "Argentina"],
6+
"correct_answer": "France"
7+
},
8+
{
9+
"subject": "Sports",
10+
"question": "In which sport is the term 'birdie' used?",
11+
"choices": ["Tennis", "Golf", "Cricket", "Basketball"],
12+
"correct_answer": "Golf"
13+
},
14+
{
15+
"subject": "Sports",
16+
"question": "Who holds the record for the most home runs in Major League Baseball?",
17+
"choices": ["Babe Ruth", "Hank Aaron", "Barry Bonds", "Alex Rodriguez"],
18+
"correct_answer": "Barry Bonds"
19+
},
20+
{
21+
"subject": "Sports",
22+
"question": "Which tennis player has won the most Grand Slam titles in singles?",
23+
"choices": ["Roger Federer", "Rafael Nadal", "Novak Djokovic", "Serena Williams"],
24+
"correct_answer": "Roger Federer"
25+
},
26+
{
27+
"subject": "Sports",
28+
"question": "Which country has won the most Olympic gold medals in the history of the Summer Olympics?",
29+
"choices": ["United States", "China", "Soviet Union", "Germany"],
30+
"correct_answer": "United States"
31+
},
32+
{
33+
"subject": "Sports",
34+
"question": "In which city are the headquarters of the International Olympic Committee (IOC) located?",
35+
"choices": ["Paris", "Lausanne", "Geneva", "London"],
36+
"correct_answer": "Lausanne"
37+
},
38+
{
39+
"subject": "Sports",
40+
"question": "Which country has won the most FIFA World Cup titles?",
41+
"choices": ["Brazil", "Germany", "Italy", "Argentina"],
42+
"correct_answer": "Brazil"
43+
},
44+
{
45+
"subject": "Sports",
46+
"question": "Who is the all-time leading scorer in NBA history?",
47+
"choices": ["LeBron James", "Kareem Abdul-Jabbar", "Michael Jordan", "Kobe Bryant"],
48+
"correct_answer": "Kareem Abdul-Jabbar"
49+
},
50+
{
51+
"subject": "Sports",
52+
"question": "Which sport uses a shuttlecock?",
53+
"choices": ["Badminton", "Table tennis", "Volleyball", "Squash"],
54+
"correct_answer": "Badminton"
55+
},
56+
{
57+
"subject": "Sports",
58+
"question": "Which athlete has the most Olympic gold medals of all time?",
59+
"choices": ["Usain Bolt", "Michael Phelps", "Carl Lewis", "Jesse Owens"],
60+
"correct_answer": "Michael Phelps"
61+
},
62+
{
63+
"subject": "Sports",
64+
"question": "Which team has won the most Super Bowl titles in NFL history?",
65+
"choices": ["New England Patriots", "Pittsburgh Steelers", "San Francisco 49ers", "Dallas Cowboys"],
66+
"correct_answer": "New England Patriots"
67+
},
68+
{
69+
"subject": "Sports",
70+
"question": "Which country has won the most UEFA European Championship titles?",
71+
"choices": ["Germany", "Spain", "France", "Italy"],
72+
"correct_answer": "Germany"
73+
},
74+
{
75+
"subject": "Sports",
76+
"question": "Who is the most decorated Olympian of all time?",
77+
"choices": ["Usain Bolt", "Michael Phelps", "Carl Lewis", "Jesse Owens"],
78+
"correct_answer": "Michael Phelps"
79+
},
80+
{
81+
"subject": "Sports",
82+
"question": "Which team has won the most NBA championships?",
83+
"choices": ["Los Angeles Lakers", "Boston Celtics", "Chicago Bulls", "Golden State Warriors"],
84+
"correct_answer": "Boston Celtics"
85+
},
86+
{
87+
"subject": "Sports",
88+
"question": "Which country has won the most Rugby World Cup titles?",
89+
"choices": ["New Zealand", "Australia", "England", "South Africa"],
90+
"correct_answer": "New Zealand"
91+
},
92+
{
93+
"subject": "Sports",
94+
"question": "Which athlete holds the record for the fastest 100-meter sprint in history?",
95+
"choices": ["Usain Bolt", "Carl Lewis", "Tyson Gay", "Justin Gatlin"],
96+
"correct_answer": "Usain Bolt"
97+
},
98+
{
99+
"subject": "Sports",
100+
"question": "Which team has won the most UEFA Champions League titles?",
101+
"choices": ["Real Madrid", "Barcelona", "Bayern Munich", "Liverpool"],
102+
"correct_answer": "Real Madrid"
103+
},
104+
{
105+
"subject": "Sports",
106+
"question": "Which sport is known as the 'gentleman's game'?",
107+
"choices": ["Golf", "Cricket", "Tennis", "Polo"],
108+
"correct_answer": "Cricket"
109+
},
110+
{
111+
"subject": "Sports",
112+
"question": "Who is the all-time leading goal scorer in international soccer?",
113+
"choices": ["Lionel Messi", "Cristiano Ronaldo", "Pelé", "Miroslav Klose"],
114+
"correct_answer": "Ali Daei"
115+
},
116+
{
117+
"subject": "Sports",
118+
"question": "Which country has won the most Olympic gold medals in the history of the Winter Olympics?",
119+
"choices": ["United States", "Norway", "Soviet Union", "Germany"],
120+
"correct_answer": "Norway"
111121
}
112-
]
122+
]
123+
97 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)