Skip to content

Django-phase-1 - #2

Open
MJamalian wants to merge 16 commits into
mainfrom
development
Open

Django-phase-1#2
MJamalian wants to merge 16 commits into
mainfrom
development

Conversation

@MJamalian

Copy link
Copy Markdown
Owner

No description provided.

Comment thread Yektanet/advertiser_management/views.py Outdated
try:
advertiser = Advertiser.objects.get(pk=advertiser_id)

except ObjectDoesNotExist:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You can used Advertiser.DoesNotExists

Comment thread Yektanet/advertiser_management/views.py Outdated

def get(self, request, *args, **kwargs):
for ad in Ad.objects.all():
if(ad.approved):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remove parentheses

Comment thread Yektanet/advertiser_management/views.py Outdated
def get(self, request, *args, **kwargs):
for ad in Ad.objects.all():
if(ad.approved):
ad.view_set.create(user_ip=request.user_ip)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Make it bulk create

@MrMohammadY

Copy link
Copy Markdown

Move .gitignore in your Yektanet directory

@MrMohammadY

Copy link
Copy Markdown

Don't push .idea

@MrMohammadY

Copy link
Copy Markdown

Set your root directory to Yektanet and change git

@MrMohammadY

Copy link
Copy Markdown

You forgot to implement the reporting section of your training.

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