-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from phedoreanu/master
update to django 4
- Loading branch information
Showing
10 changed files
with
73 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,22 @@ | ||
from django.utils.translation import ugettext_lazy as _ | ||
from django.urls import re_path | ||
from django.utils.translation import gettext_lazy as _ | ||
from oscar.core.application import OscarConfig | ||
|
||
|
||
class InvoicesConfig(OscarConfig): | ||
label = 'oscar_invoices' | ||
name = 'oscar_invoices' | ||
verbose_name = _('Invoices') | ||
|
||
default_permissions = ["is_staff"] | ||
|
||
def ready(self): | ||
from . import views | ||
self.invoice_view = views.InvoicePreviewView | ||
|
||
def get_urls(self): | ||
urlpatterns = [ | ||
re_path(r"invoice/(?P<pk>\d+)/", self.invoice_view.as_view(), | ||
name="invoice"), | ||
] | ||
return self.post_process_urls(urlpatterns) |
23 changes: 23 additions & 0 deletions
23
oscar_invoices/migrations/0005_legalentity_company_number_and_more.py
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,23 @@ | ||
# Generated by Django 4.2.11 on 2024-03-23 19:54 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('oscar_invoices', '0004_date_banking_details'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='legalentity', | ||
name='company_number', | ||
field=models.CharField(blank=True, max_length=20, null=True, verbose_name='Company identification number'), | ||
), | ||
migrations.AlterField( | ||
model_name='legalentity', | ||
name='vat_number', | ||
field=models.CharField(blank=True, max_length=20, null=True, verbose_name='VAT identification number'), | ||
), | ||
] |
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 was deleted.
Oops, something went wrong.
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
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,18 +1,16 @@ | ||
[tox] | ||
envlist = | ||
py{36,37}-django{22,31} | ||
py{37,38}-django{31} | ||
py{39}-django{42} | ||
|
||
[testenv] | ||
commands = pytest {posargs} | ||
setenv = | ||
PYTHONPATH=. | ||
deps = | ||
django22: django>=2.2,<2.3 | ||
django31: django>=3.1,<3.2 | ||
pytest >= 3.6.0 | ||
pytest-django | ||
django-webtest>=1.9.3 | ||
django42: django>=4.2.6 | ||
pytest >= 7.4.4 | ||
pytest-django >= 4.7.0 | ||
django-webtest>=1.9.11 | ||
sorl-thumbnail | ||
psycopg2-binary>=2.7 | ||
psycopg2-binary>=2.9.9 | ||
mock |