Skip to main content
Code Review

Return to Question

Commonmark migration
Source Link
  1. Am I handling login sessions appropriately? Should I manually store cookies b64encoded in front of some more encryption?

    Am I handling login sessions appropriately? Should I manually store cookies b64encoded in front of some more encryption?

  2. My variable names are often quite long, and sometimes if / else ... statements become too long from multiple indents - how do I avoid that?

    My variable names are often quite long, and sometimes if / else ... statements become too long from multiple indents - how do I avoid that?

    My variable names get rather long just by themselves. An example could be gcaptchacheck.checkcaptcha or authentication.validateusername.

  3. I am simply storing user passwords as a SHA256 hash, along with a salt (securely!)... from what I know that's a good way to go, but are there better practices?

  4. My app sends asynchrnous requests using some JavaScript in the HTML such as /dodouble/?gamount=xxx and /getcoins/. Is there a better way that I can use?

  5. I am storing my files alongside each other in a folder. Is there a better way in terms of organisation or convention? I am considering something like gunicorn to enhance performance. Is there a better alternative? I am developing on Windows, after all.

    I control the stylesheets because otherwise when I feel like updating the stylesheets, I have to edit the HTML for all the files. This method gives me easy way to manage.

  6. At the end you will see except PermissionError, which is because deploying to Heroku will disallow you to bind to port 80, raising PermissionError. This method to automate this part seems to be relatively simple. Any better ways to do this? Heroku has an environment variable for Django apps to figure out whether they're in a development environment or deployment environment. Is it OK if I snatch that quick fix, or is there an unspoken "sin" in doing that?

My variable names get rather long just by themselves. An example could be gcaptchacheck.checkcaptcha or authentication.validateusername. 4. I am simply storing user passwords as a SHA256 hash, along with a salt (securely!)... from what I know that's a good way to go, but are there better practices? 5. My app sends asynchrnous requests using some JavaScript in the HTML such as /dodouble/?gamount=xxx and /getcoins/. Is there a better way that I can use? 6. I am storing my files alongside each other in a folder. Is there a better way in terms of organisation or convention? I am considering something like gunicorn to enhance performance. Is there a better alternative? I am developing on Windows, after all.

I control the stylesheets because otherwise when I feel like updating the stylesheets, I have to edit the HTML for all the files. This method gives me easy way to manage. 7. At the end you will see except PermissionError, which is because deploying to Heroku will disallow you to bind to port 80, raising PermissionError. This method to automate this part seems to be relatively simple. Any better ways to do this? Heroku has an environment variable for Django apps to figure out whether they're in a development environment or deployment environment. Is it OK if I snatch that quick fix, or is there an unspoken "sin" in doing that?

  1. Am I handling login sessions appropriately? Should I manually store cookies b64encoded in front of some more encryption?
  2. My variable names are often quite long, and sometimes if / else ... statements become too long from multiple indents - how do I avoid that?

My variable names get rather long just by themselves. An example could be gcaptchacheck.checkcaptcha or authentication.validateusername. 4. I am simply storing user passwords as a SHA256 hash, along with a salt (securely!)... from what I know that's a good way to go, but are there better practices? 5. My app sends asynchrnous requests using some JavaScript in the HTML such as /dodouble/?gamount=xxx and /getcoins/. Is there a better way that I can use? 6. I am storing my files alongside each other in a folder. Is there a better way in terms of organisation or convention? I am considering something like gunicorn to enhance performance. Is there a better alternative? I am developing on Windows, after all.

I control the stylesheets because otherwise when I feel like updating the stylesheets, I have to edit the HTML for all the files. This method gives me easy way to manage. 7. At the end you will see except PermissionError, which is because deploying to Heroku will disallow you to bind to port 80, raising PermissionError. This method to automate this part seems to be relatively simple. Any better ways to do this? Heroku has an environment variable for Django apps to figure out whether they're in a development environment or deployment environment. Is it OK if I snatch that quick fix, or is there an unspoken "sin" in doing that?

  1. Am I handling login sessions appropriately? Should I manually store cookies b64encoded in front of some more encryption?

  2. My variable names are often quite long, and sometimes if / else ... statements become too long from multiple indents - how do I avoid that?

    My variable names get rather long just by themselves. An example could be gcaptchacheck.checkcaptcha or authentication.validateusername.

  3. I am simply storing user passwords as a SHA256 hash, along with a salt (securely!)... from what I know that's a good way to go, but are there better practices?

  4. My app sends asynchrnous requests using some JavaScript in the HTML such as /dodouble/?gamount=xxx and /getcoins/. Is there a better way that I can use?

  5. I am storing my files alongside each other in a folder. Is there a better way in terms of organisation or convention? I am considering something like gunicorn to enhance performance. Is there a better alternative? I am developing on Windows, after all.

    I control the stylesheets because otherwise when I feel like updating the stylesheets, I have to edit the HTML for all the files. This method gives me easy way to manage.

  6. At the end you will see except PermissionError, which is because deploying to Heroku will disallow you to bind to port 80, raising PermissionError. This method to automate this part seems to be relatively simple. Any better ways to do this? Heroku has an environment variable for Django apps to figure out whether they're in a development environment or deployment environment. Is it OK if I snatch that quick fix, or is there an unspoken "sin" in doing that?

Tweeted twitter.com/StackCodeReview/status/920622894958432256
added 44 characters in body
Source Link
Luke
  • 501
  • 5
  • 15

Edit: Sorry, the link has been deprecated.

Edit: Sorry, the link has been deprecated.

Backticks are not for emphasis, only for code
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

With the latest of my projects, I started using Visual Studio Code, which allows for Python linting and also checking for poor practices, such as using over 100 characters in a single line. As you will see, my variable names sometimes get long, because I want to maintain readable variable names. Just for information, I also handle logins and sessions with a flask sessionFlask session cookie. Below are the various files. Also worth mentioning is that I use a local Redis server for Windows to test the application.

Python version3.5.2 32 bit: 3.5.2 32 bit

Am I handling login sessions appropriately? Should I manually store cookies b64encoded in front of some more encryption?

My variable names are often quite long, and sometimes if / else ... statements become too long from multiple indents - how do I avoid that?

  1. Am I handling login sessions appropriately? Should I manually store cookies b64encoded in front of some more encryption?
  2. My variable names are often quite long, and sometimes if / else ... statements become too long from multiple indents - how do I avoid that?

My variable names get rather long just by themselves. An example could be gcaptchacheck.checkcaptcha or authentication.validateusername.

4. I am simply storing user passwords as a sha256SHA256 hash, along with a salt (securely!)... from what I know that's a good way to go, but are there better practices?

5. My app sends asynchrnous requests using some javascriptJavaScript in the HTMLHTML such as /dodouble/?gamount=xxx and /getcoins/. Is there a better way that I can use?

6. I am storing my files alongside eachothereach other in a folder, is. Is there a better way in terms of organisation or convention?

I am considering something like gunicorngunicorn to enhance performance. Is there a better alternative? I am developing on Windows, after all.

I control they stylesheets because otherwise when I feel like updating the stylesheets, I have to edit the html for all the files. This method gives me easy way to manage.

I control the stylesheets because otherwise when I feel like updating the stylesheets, I have to edit the HTML for all the files. This method gives me easy way to manage. 7. At the end you will see except PermissionError, which is because deploying to HerokuHeroku will dissalowdisallow you to bind to port 80, raising PermissionError. This method to automate this part seems to be relatively simple. Any better ways to do this? HerokuHeroku has an environment variable for djangoDjango apps to figure out whether they're in a development environment or deployment environment. Is it OK if I snatch that quick fix, or is there an unspoken "sin" in doing that?

I'm not great at Python, further recommendations would be appreciated!

EDIT:I'm not great at Python, so further recommendations would be appreciated!

SeemsIt also seems like nobody is interested or there is too much information to digest. This link to the website should help people interpret what I'm doing a bit better.

With the latest of my projects, I started using Visual Studio Code, which allows for Python linting and also checking for poor practices, such as using over 100 characters in a single line. As you will see, my variable names sometimes get long, because I want to maintain readable variable names. Just for information, I also handle logins and sessions with a flask session cookie. Below are the various files. Also worth mentioning is that I use a local Redis server for Windows to test the application.

Python version3.5.2 32 bit

Am I handling login sessions appropriately? Should I manually store cookies b64encoded in front of some more encryption?

My variable names are often quite long, and sometimes if / else ... statements become too long from multiple indents - how do I avoid that?

My variable names get rather long just by themselves. An example could be gcaptchacheck.checkcaptcha or authentication.validateusername.

I am simply storing user passwords as a sha256 hash, along with a salt (securely!)... from what I know that's a good way to go, but are there better practices?

My app sends asynchrnous requests using some javascript in the HTML such as /dodouble/?gamount=xxx and /getcoins/. Is there a better way that I can use?

I am storing my files alongside eachother in a folder, is there a better way in terms of organisation or convention?

I am considering something like gunicorn to enhance performance. Is there a better alternative? I am developing on Windows, after all.

I control they stylesheets because otherwise when I feel like updating the stylesheets, I have to edit the html for all the files. This method gives me easy way to manage.

At the end you will see except PermissionError, which is because deploying to Heroku will dissalow you to bind to port 80, raising PermissionError. This method to automate this part seems to be relatively simple. Any better ways to do this? Heroku has an environment variable for django apps to figure out whether they're in a development environment or deployment environment. Is it OK if I snatch that quick fix, or is there an unspoken "sin" in doing that?

I'm not great at Python, further recommendations would be appreciated!

EDIT:

Seems like nobody is interested or there is too much information to digest. This link to the website should help people interpret what I'm doing a bit better.

With the latest of my projects, I started using Visual Studio Code, which allows for Python linting and also checking for poor practices, such as using over 100 characters in a single line. As you will see, my variable names sometimes get long, because I want to maintain readable variable names. Just for information, I also handle logins and sessions with a Flask session cookie. Below are the various files. Also worth mentioning is that I use a local Redis server for Windows to test the application.

Python version: 3.5.2 32 bit

  1. Am I handling login sessions appropriately? Should I manually store cookies b64encoded in front of some more encryption?
  2. My variable names are often quite long, and sometimes if / else ... statements become too long from multiple indents - how do I avoid that?

My variable names get rather long just by themselves. An example could be gcaptchacheck.checkcaptcha or authentication.validateusername. 4. I am simply storing user passwords as a SHA256 hash, along with a salt (securely!)... from what I know that's a good way to go, but are there better practices? 5. My app sends asynchrnous requests using some JavaScript in the HTML such as /dodouble/?gamount=xxx and /getcoins/. Is there a better way that I can use? 6. I am storing my files alongside each other in a folder. Is there a better way in terms of organisation or convention? I am considering something like gunicorn to enhance performance. Is there a better alternative? I am developing on Windows, after all.

I control the stylesheets because otherwise when I feel like updating the stylesheets, I have to edit the HTML for all the files. This method gives me easy way to manage. 7. At the end you will see except PermissionError, which is because deploying to Heroku will disallow you to bind to port 80, raising PermissionError. This method to automate this part seems to be relatively simple. Any better ways to do this? Heroku has an environment variable for Django apps to figure out whether they're in a development environment or deployment environment. Is it OK if I snatch that quick fix, or is there an unspoken "sin" in doing that?

I'm not great at Python, so further recommendations would be appreciated!

It also seems like nobody is interested or there is too much information to digest. This link to the website should help people interpret what I'm doing a bit better.

added 226 characters in body
Source Link
Luke
  • 501
  • 5
  • 15
Loading
Source Link
Luke
  • 501
  • 5
  • 15
Loading
lang-py

AltStyle によって変換されたページ (->オリジナル) /