Skip to content

Commit 66a53a3

Browse files
committed
refactoring - moving more into apps, and using targ for the CLI
1 parent cae1a26 commit 66a53a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+198
-208
lines changed

docs/src/piccolo/authentication/baseuser.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Inherit from ``BaseUser`` to create your own User table.
77

88
.. code-block:: python
99
10-
from piccolo.extensions.user.tables import BaseUser
10+
from piccolo.apps.user.tables import BaseUser
1111
1212
1313
class User(BaseUser, tablename="custom_user"):

docs/src/piccolo/migrations/create.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The contents of an empty migration file looks like this:
2323

2424
.. code-block:: python
2525
26-
from piccolo.migrations.auto import MigrationManager
26+
from piccolo.apps.migrations.auto import MigrationManager
2727
2828
2929
ID = '2018-09-04T19:44:09'

docs/src/piccolo/projects_and_apps/piccolo_apps.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ customise how your app's settings.
6666
migrations_folder_path=os.path.join(CURRENT_DIRECTORY, 'piccolo_migrations'),
6767
table_classes=[Author, Post, Category, CategoryToPost],
6868
migration_dependencies=[],
69+
commands=[]
6970
)
7071
7172
table_classes
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import typing as t
55

66
import black
7-
import click
87
import jinja2
98

109

@@ -48,10 +47,11 @@ def new_app(app_name: str):
4847
pass
4948

5049

51-
@click.argument("app_name")
52-
@click.command()
5350
def new(app_name: str):
5451
"""
5552
Creates a new Piccolo app.
53+
54+
:param app_name:
55+
The name of the new app.
5656
"""
5757
new_app(app_name)
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import click
2-
3-
4-
@click.command(name="list")
5-
def list_apps():
1+
def show_all():
62
"""
73
Lists all registered Piccolo apps.
84
"""

piccolo/commands/app/templates/piccolo_app.py.jinja renamed to piccolo/apps/app/commands/templates/piccolo_app.py.jinja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ APP_CONFIG = AppConfig(
1616
migrations_folder_path=os.path.join(CURRENT_DIRECTORY, 'piccolo_migrations'),
1717
table_classes=[],
1818
migration_dependencies=[],
19+
commands=[]
1920
)
File renamed without changes.

0 commit comments

Comments
 (0)