mirror of
https://github.com/creyD/asiimov.git
synced 2026-06-11 16:42:23 +02:00
Improved Commenting
This commit is contained in:
@@ -1,17 +1,5 @@
|
||||
"""asiimov URL Configuration
|
||||
|
||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
||||
https://docs.djangoproject.com/en/3.0/topics/http/urls/
|
||||
Examples:
|
||||
Function views
|
||||
1. Add an import: from my_app import views
|
||||
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
||||
Class-based views
|
||||
1. Add an import: from other_app.views import Home
|
||||
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
||||
Including another URLconf
|
||||
1. Import the include() function: from django.urls import include, path
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
asiimov URL Configuration
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
# Import forms for creating custom template forms
|
||||
from django import forms
|
||||
# Import models for creating modelforms
|
||||
from .models import Gamer, Offer
|
||||
|
||||
|
||||
# Form for adding own trade url
|
||||
class ChangeTradeUrl(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Gamer
|
||||
fields = ['tradeurl']
|
||||
|
||||
|
||||
# Form for creating offers
|
||||
class CreateOffer(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Offer
|
||||
|
||||
@@ -6,10 +6,12 @@ from django.conf import settings
|
||||
from .models import Gamer, ItemType, ItemInstance
|
||||
from django.shortcuts import get_object_or_404
|
||||
|
||||
# Official Steam Servers
|
||||
STEAM_SERVER = 'https://api.steampowered.com/'
|
||||
USER_METHOD = 'ISteamUser/GetPlayerSummaries/v2'
|
||||
INVENTORY_SERVER = 'https://steamcommunity.com/inventory/'
|
||||
|
||||
# CSGOFloats API Server (https://csgofloat.com)
|
||||
FLOAT_SERVER = 'https://api.csgofloat.com/?url='
|
||||
|
||||
|
||||
|
||||
@@ -4,24 +4,32 @@ from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.dashboard, name='home'),
|
||||
|
||||
# Core Functionality
|
||||
path('offers/', views.offer_overview, name='offer_overview'),
|
||||
path('offers/<int:offerID>', views.offer, name='offer'),
|
||||
path('offers/<int:offerID>/refresh', views.offer_refresh, name='offer_refresh'),
|
||||
path('offers/<int:offerID>', views.offer_delete, name='offer_delete'),
|
||||
path('offers/create', views.offer_create, name='offer_create'),
|
||||
path('search/<str:filter>', views.search, name='search'),
|
||||
|
||||
# Profile Area
|
||||
path('profile/<int:steamID>', views.profile, name='profile'),
|
||||
path('profile/<int:steamID>/update', views.profile_update, name='profile_update'),
|
||||
path('profile/<int:steamID>/inventory', views.profile_inventory, name='profile_inventory'),
|
||||
path('profile/<int:steamID>/inventory/update', views.profile_inventory_update, name='profile_inventory_update'),
|
||||
|
||||
# Redirects for the me area
|
||||
path('me', views.me, name='me'),
|
||||
path('me/settings', views.me_settings, name='me_settings'),
|
||||
path('me/inventory', views.me_inventory, name='me_inventory'),
|
||||
|
||||
# Static Pages
|
||||
path('help', views.help, name='help'),
|
||||
path('imprint', views.imprint, name='imprint'),
|
||||
path('about', views.about, name='about'),
|
||||
|
||||
# OpenID Redirects
|
||||
path('signup', views.signup, name='signup'),
|
||||
path('signup_confirm', views.signup_confirm)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user