Skip to content

feat:add faq and quickguide #4

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

feat:add faq and quickguide #4

wants to merge 3 commits into from

Conversation

SVyusti
Copy link

@SVyusti SVyusti commented Jun 8, 2023

No description provided.

@SVyusti SVyusti requested a review from mrstark14 August 23, 2023 05:33
models/faq.py Outdated
from formula_one.models.base import Model
from formula_one.utils.upload_to import UploadTo

class faq(models.Model):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

follow proper naming convention with first character in upper case

models/faq.py Outdated
)

class Meta(object):
verbose_name_plural='faqs'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a blank line at the end

from formula_one.models.base import Model
from formula_one.utils.upload_to import UploadTo

class quickguide(models.Model):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

upload_to=UploadTo('helpcentre','quickguide'),
blank=False,
null=False,
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line at end

from rest_framework.serializers import ModelSerializer
from helpcentre.models import faq

class faq_serializer(ModelSerializer):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

follow pascal case

from rest_framework.serializers import ModelSerializer
from helpcentre.models import quickguide

class quickguide_serializer(ModelSerializer):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://peps.python.org/pep-0008/#class-names
name convention should be done according to this

Person=swapper.load_model('kernel','Person')
Maintainer=swapper.load_model('kernel','Maintainer')

class faq_view(ModelViewSet):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for here

},
status=status.HTTP_403_FORBIDDEN,
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a blank line at end

'Error':'You cannot perform this action'
},
status=status.HTTP_403_FORBIDDEN,
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add blank line at end

Person=swapper.load_model('kernel','Person')
Maintainer=swapper.load_model('kernel','Maintainer')

class quickguide_view(ModelViewSet):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

follow proper naming conventions, read previous codes and then do naming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants