Skip to content

Commit 2d6c9a9

Browse files
authored
#P08: Resources page setup (#77)
1 parent 810f7e4 commit 2d6c9a9

18 files changed

Lines changed: 447 additions & 160 deletions

File tree

main/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"home",
3030
'accounts',
3131
"profiles",
32+
"resources",
3233
"crispy_forms",
3334
# M05 App "Hackathon" added
3435
"hackathon",

main/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
path("admin/", admin.site.urls),
77
path("accounts/", include("allauth.urls")),
88
path("profile/", include("profiles.urls")),
9+
path("resources/", include("resources.urls")),
910
path("hackathon/", include(("hackathon.urls", "hackathon"),
1011
namespace='hackathon')),
1112
]

resources/__init__.py

Whitespace-only changes.

resources/admin.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from django.contrib import admin
2+
from resources.models import Resource
3+
4+
5+
class ResourceAdmin(admin.ModelAdmin):
6+
list_display = (
7+
'name',
8+
'link',
9+
)
10+
11+
12+
admin.site.register(Resource, ResourceAdmin)

resources/apps.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.apps import AppConfig
2+
3+
4+
class ResourcesConfig(AppConfig):
5+
name = 'resources'

resources/fixtures/resources.json

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
[
2+
{
3+
"model": "resources.resource",
4+
"pk": 1,
5+
"fields": {
6+
"name": "Gitpod - Code Institute full template",
7+
"link": "https://github.com/Code-Institute-Org/gitpod-full-template",
8+
"description": "Full workspace template for GitPod. Provides extensions and tools for CI students."
9+
}
10+
},
11+
{
12+
"model": "resources.resource",
13+
"pk": 2,
14+
"fields": {
15+
"name": "GitHub 'Projects'",
16+
"link": "https://www.youtube.com/watch?v=C6MGKHkNtxU&t=0s",
17+
"description": "Projects are an issue management feature on GitHub which will help you organize Issues, Pull Requests, and notes into a Kanban-style board for better visualization and prioritization of work."
18+
}
19+
},
20+
{
21+
"model": "resources.resource",
22+
"pk": 3,
23+
"fields": {
24+
"name": "The Git Story",
25+
"link": "https://eventyret.github.io/the-git-story/",
26+
"description": "The story of Git. Get to know git commands!"
27+
}
28+
},
29+
{
30+
"model": "resources.resource",
31+
"pk": 4,
32+
"fields": {
33+
"name": "Git Team workflow",
34+
"link": "https://jameschambers.co/git-team-workflow-cheatsheet/",
35+
"description": "Using Git in a team cheatsheet."
36+
}
37+
},
38+
{
39+
"model": "resources.resource",
40+
"pk": 5,
41+
"fields": {
42+
"name": "Forking",
43+
"link": "https://www.youtube.com/watch?v=HbSjyU2vf6Y",
44+
"description": "Git & GitHub Tutorial for Beginners - Forking & Contributing: how to fork a repository to your own GitHub account."
45+
46+
}
47+
},
48+
{
49+
"model": "resources.resource",
50+
"pk": 6,
51+
"fields": {
52+
"name": "Branches",
53+
"link": "https://www.youtube.com/watch?v=QV0kVNvkMxc",
54+
"description": "Git & GitHub Tutorial for Beginners - Branches: introduction to branching and creating new branches to test out new features on."
55+
}
56+
},
57+
{
58+
"model": "resources.resource",
59+
"pk": 7,
60+
"fields": {
61+
"name": "Syncing",
62+
"link": "https://www.youtube.com/watch?v=-zvHQXnBO6c",
63+
"description": "Syncing Your GitHub Fork: what that means and how to do that video-tutorial."
64+
}
65+
},
66+
{
67+
"model": "resources.resource",
68+
"pk": 8,
69+
"fields": {
70+
"name": "Dealing with merge refusal error",
71+
"link": "https://github.community/t/how-to-deal-with-refusing-to-merge-unrelated-histories-error/1372/3#M5000",
72+
"description": "The solution to 'refusing to merge unrelated histories' error."
73+
74+
}
75+
},
76+
{
77+
"model": "resources.resource",
78+
"pk": 9,
79+
"fields": {
80+
"name": "Merge unrelated histories",
81+
"link": "https://www.youtube.com/watch?v=sdNyMmMSU34",
82+
"description": "Check out this video if git won't let you push due to the remote containing work that your local repository doesn't have, despite the fact that the remote repository is a new Git Hub repository and should have no history of its own."
83+
}
84+
},
85+
{
86+
"model": "resources.resource",
87+
"pk": 10,
88+
"fields": {
89+
"name": "Collaborate Issues/Pull Requests",
90+
"link": "https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests",
91+
"description": "GitHub docs: Collaborating with issues and pull requests. Use the GitHub flow to track and discuss changes in issues, then propose and review changes in pull requests."
92+
}
93+
}
94+
]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Generated by Django 3.1.1 on 2020-10-16 18:56
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
initial = True
9+
10+
dependencies = [
11+
]
12+
13+
operations = [
14+
migrations.CreateModel(
15+
name='Resource',
16+
fields=[
17+
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
18+
('name', models.CharField(max_length=254)),
19+
('link', models.URLField()),
20+
],
21+
),
22+
]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 3.1.1 on 2020-10-22 18:21
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('resources', '0001_initial'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='resource',
15+
name='description',
16+
field=models.TextField(blank=True, max_length=800, null=True),
17+
),
18+
]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 3.1.1 on 2020-10-22 20:10
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('resources', '0002_resource_description'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='resource',
15+
name='description',
16+
field=models.TextField(default='', max_length=400),
17+
),
18+
]

resources/migrations/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)