Skip to content

Commit

Permalink
Merge pull request #40 from bartczak-pa/feature/technologies
Browse files Browse the repository at this point in the history
Feature/technologies
  • Loading branch information
bartczak-pa authored Sep 3, 2024
2 parents c50920e + 6bea86c commit 4fcc517
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions bartczak_tech/portfolio/admin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from django.contrib import admin

from .models import Hobby
from .models import Technology

admin.site.register(Hobby)
admin.site.register(Technology)
12 changes: 11 additions & 1 deletion bartczak_tech/portfolio/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,15 @@ class Hobby(models.Model):
class Meta:
verbose_name_plural = "Hobbies"

def __str__(self):
def __str__(self) -> str:
return self.name


class Technology(models.Model):
name = models.CharField(max_length=50, unique=True)

class Meta:
verbose_name_plural = "Technologies"

def __str__(self) -> str:
return self.name
4 changes: 4 additions & 0 deletions bartczak_tech/portfolio/urls.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Desc: URL configuration for the portfolio app


from django.urls import path

from .views import home

app_name = "portfolio"
urlpatterns = [
path("", home, name="home"),
]
2 changes: 1 addition & 1 deletion config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from rest_framework.authtoken.views import obtain_auth_token

urlpatterns = [
path("", include("bartczak_tech.portfolio.urls")),
path("", include("bartczak_tech.portfolio.urls", namespace="portfolio")),
path(
"about/",
TemplateView.as_view(template_name="pages/about.html"),
Expand Down

0 comments on commit 4fcc517

Please sign in to comment.