Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix second argument on the command line to remove special character #25

Closed
rg3915 opened this issue Aug 31, 2021 · 2 comments
Closed

Fix second argument on the command line to remove special character #25

rg3915 opened this issue Aug 31, 2021 · 2 comments
Labels
good first issue Good for newcomers

Comments

@rg3915
Copy link
Contributor

rg3915 commented Aug 31, 2021

If type python manage.py dr_scaffold blog Article: title:char body:text

type : before or after model name

This generate

class Article:(models.Model):
    title = models.CharField(max_length=255, null=True, blank=True)
    body = models.TextField(null=True, blank=True)
    create_date = models.DateTimeField(auto_now_add=True)

    class Meta:
        verbose_name_plural = "Article:s"

Article with two points.

Suggestion

Address this in the argument on command line.

@yezz123 yezz123 added the good first issue Good for newcomers label Aug 31, 2021
@Abdenasser
Copy link
Owner

@rg3915 sorry, I'm a bit new to Python/Django world but why would you need to add a colon in the model name, is there any use case for that?

@rg3915
Copy link
Contributor Author

rg3915 commented Aug 31, 2021

@Abdenasser No. I meant that if the person types accidentally, this character should be removed.
I typed it accidentally and generated a lot of errors.

Suggestion: remove special characters or return a exception and message error.

@rg3915 rg3915 changed the title Fix second argument on the command line to fix error on special character Fix second argument on the command line to remove special character Aug 31, 2021
rg3915 added a commit to rg3915/dr_scaffold that referenced this issue Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants