Héllo Amimo,
2013/12/13 Amimo Benja <amimobenj...@gmail.com> > simple_prototype_of_online_voting_system > ================================== > The name must be shorter. «voting_system» is good for instance > I am new to Django/Python. After a few tutorial, I have tried to develop > this app. > > > However, I need some constructive criticism as the app needs to be made > better and improved. > > Please view it and highlight the problem/issues cause I know it has a lot > of issues and then recommend > the necessary changes and how to implement those changes. > > Access the app at http://amimobenja.pythonanywhere.com/voting_system/ > It seems like I can vote several time. I'not sure because I see nowhere the number of vote casted. The code can be accessed at > https://github.com/amimobenja/simple_prototype_of_online_voting_system > - The repository is missing the link to the website (first link) - Which version of Python/Django do you use? Code review: The overal is not bad, need improvement but the app is small so there is little to comment actually so what follows is mostly *remarks* not big mistakes - use render<https://docs.djangoproject.com/en/dev/topics/http/shortcuts/#render>instead of render_to_response - here<https://github.com/amimobenja/simple_prototype_of_online_voting_system/blob/master/online_voting_system/voting_system/views.py#L22>, you are already doing rendering in the view, it's not good, you should use a filter in a template, also - in the same function, you defined two times context_dict - here<https://github.com/amimobenja/simple_prototype_of_online_voting_system/blob/master/online_voting_system/voting_system/views.py#L37>, try/except is too big, you must only wrap the statment that raise the exception except if you know what you do... - Also, you seem to simply return if there is an error. This is a mistake. - here<https://github.com/amimobenja/simple_prototype_of_online_voting_system/blob/master/online_voting_system/voting_system/views.py#L60>, there is not type checking on the identifier and existence checking, you must return 404 or 5xx depending on the error. - «vq_chc.final_count += final_count» works well. - about function is useless, just use a generic template view for that no need to have a view. - Also enforce pep8, 4spaces instead of 8, no short names like «abt» instead of «about». It's useless cognitive load for the reader. HTH Thanks. > > I will gladly appreciate > Amirouche -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAL7_Mo-8pvPZ2_XWa4DwraGnZxBQJzVf4mqRqkCy_v%3DMfrNQXg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.