Yes, we can do that.
To clearly understand it, try to understand the below code:
def fn(x, y, z=0):
print('x =', x, 'y =', y, 'z =', z)
fn(1, 2) # Prints: x = 1 y = 2 z = 0
fn(1, 2, 3) # Prints: x = 1 y = 2 z = 3
fn(1, y=2) # Prints: x = 1 y = 2 z = 0
fn(1, y=2, z=3) # Prints: x = 1 y = 2 z = 3
fn(x=1, y=2) # Prints: x = 1 y = 2 z = 0
fn(x=1, y=2, z=3) # Prints: x = 1 y = 2 z = 3
fn(y=2, z=3, x=1) # Prints: x = 1 y = 2 z = 3
Now, have a look at the source code of ForeignKey. It looks something like this:
class ForeignKey(ForeignObject):
...
def __init__(
self, to, on_delete,
related_name=None, related_query_name=None,
limit_choices_to=None, parent_link=False,
to_field=None, db_constraint=True, **kwargs,
):
...
So, when we write:
content_type = models.ForeignKey(
ContentType,
models.CASCADE,
verbose_name=_('content type'),
)
The parameter to will be ContentType and the parameter on_delete will be models.CASCADE.
This is exactly same as writing:
content_type = models.ForeignKey(
on=ContentType,
on_delete=models.CASCADE,
verbose_name=_('content type'),
)