Answer the question
In order to leave comments, you need to log in
What is my level of django developer?
here is my repository:
https://github.com/zuberok/wts
The question is tormenting: Have I become a middle?
Answer the question
In order to leave comments, you need to log in
@property
def wall(self):
result = self.posts.all()
for friend in self.friends.all():
if not result:
result = friend.posts.all()
else:
result = result | friend.posts.all()
return result.order_by('-id')
ACCOUNT_SID = "**"
AUTH_TOKEN = "**"
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
SENDER = '+14694252378'
deposit_total = sum((x.total for x in _user.deposits.all()))
outlays_total = sum((x.total for x in _user.outlays.all()))
incomes_total = sum((x[0] for x in _user.tree_node1.cash_incomes)) if TN1.objects.filter(account__id=_user.id) else 0
cashes_total = sum((x.total for x in _user.cashes.all()))
income_transfers_total = sum((x.total for x in _user.income_transfers.all()))
outcome_trasfers_total = sum((x.total for x in _user.outcome_transfers.all()))
PARENT_PAYMENT = 50.0
GRANDPARENTS_PAYMENT = 100.0
LEVEL_REWARDS = (0.19, 0.17, 0.15, 0.13, 0.11, 0.09, 0.07, 0.05, 0.02, 0.01, 0.01)
No tests
Settings
and external dependencies for production and dev in one file
Code in country files without description and with code that should be in models
You are a good trainee
I would say no. From what I jumped at a cursory review of the code - absolute paths in settings, non-compliance with pep8 (terminal indent, length of lines. I myself do not think that 80 characters is a normal value, but a line of 146 characters is too much, at least 120). There is not a single test, imports are mixed, each method of the model with the property decorator (didn’t delve into the code very much, maybe it makes sense, but it’s unlikely in such an amount), don’t use CBV, although in some places it’s more appropriate, it’s not clear the meaning of creating the whole app for the sake of storing one function in 1 line of code, there is a clear misunderstanding of what and where is contained (Profile.objects.create(user=User.objects.get(id=request.user.id)), User.objects.get( id=request.user.id)), not understanding what requests are doing (sum([x.total for x in request.user.outlays.filter(type=2)])). I also didn’t see indexes anywhere, maybe they really aren’t needed (according to the code, basically, selections by PK and FK seem to be everywhere). There is no try\catch for the get block, although it may spit here DoesNotExists (kwargs['inviter'] = User.objects.get(id=data['inviter']))
In general, a lot of jambs.
In general, it is difficult to judge what level you are by such a code, since in principle there is nothing specific there, even those who do not know django will write such a google for a couple of days / hours.
I advise you to familiarize yourself with pep8 in more detail + install pep8 and / or pylint for yourself, read at least two scoops of django, practice writing tests, learn selenium. No offense, but for now I would not take you to the middle, as a lot would have to be explained and changed for you.
I just pierced the files, and most of them are empty blank files, apparently when generating applications with a helper, as in the tutorial :) A mountain of unnecessary imports in the simplest project/public/views.py. In general, it was no longer interesting to watch ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question