-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
204 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
from django import forms | ||
from models import UpFile | ||
|
||
from .models import UpFile | ||
|
||
|
||
class UploadModelFileForm(forms.ModelForm): | ||
class Meta: | ||
model = UpFile | ||
exclude = ('pub', 'plist', 'status', 'up_date', 'from_ip') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Generated by Django 3.0.11 on 2020-12-17 09:16 | ||
|
||
from django.db import migrations, models | ||
import ipapub.contenttyperestrictedfilefield | ||
import ipapub.models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='UpFile', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('path', models.CharField(max_length=200)), | ||
('file', ipapub.contenttyperestrictedfilefield.ContentTypeRestrictedFileField(blank=True, null=True, upload_to=ipapub.models.PathAndRename2('upload'))), | ||
('icons', ipapub.contenttyperestrictedfilefield.ContentTypeRestrictedFileField(upload_to=ipapub.models.PathAndRename('package'))), | ||
('iconb', ipapub.contenttyperestrictedfilefield.ContentTypeRestrictedFileField(upload_to=ipapub.models.PathAndRename('package'))), | ||
('plist', models.FileField(upload_to='package')), | ||
('pub', models.FileField(upload_to='package')), | ||
('signed', ipapub.contenttyperestrictedfilefield.ContentTypeRestrictedFileField(blank=True, null=True, upload_to=ipapub.models.PathAndRename('package'))), | ||
('status', models.CharField(blank=True, max_length=10)), | ||
('user', models.CharField(max_length=10)), | ||
('label', models.CharField(blank=True, max_length=200)), | ||
('up_date', models.DateTimeField(auto_now_add=True, verbose_name='upload date')), | ||
('from_ip', models.GenericIPAddressField(blank=True, null=True)), | ||
], | ||
), | ||
] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{% load progress_bar %} | ||
{% load staticfiles %} | ||
{% load static %} | ||
|
||
<!DOCTYPE html> | ||
<html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
from django.conf.urls import patterns, include, url | ||
from django.urls import path | ||
from django.views.generic import FormView | ||
from views import upload, AllView, OneView | ||
from forms import UploadModelFileForm | ||
from .views import upload, AllView, OneView | ||
from .forms import UploadModelFileForm | ||
|
||
urlpatterns = patterns('', | ||
url(r'^$', upload, name='upload'), | ||
url(r'^all', AllView.as_view(), name='all'), | ||
url(r'^(?P<path>.*)$', OneView.as_view(), name='one'), | ||
) | ||
|
||
urlpatterns = [ | ||
path('', upload, name='upload'), | ||
path('all', AllView.as_view(), name='all'), | ||
path('<path>', OneView.as_view(), name='one'), | ||
] |
Oops, something went wrong.