Added forms.py check for proper variable names #7

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@jaywhy13

Just added a check in the forms.py to ensure that no weird characters like spaces are used in variable names. The only thing allowed is (A-Z, a-z, 0-9, _).

Checked to make sure that the variable name chosen doesn't have chara…
…cters outside of (A-Z, 0-9, _). Memcache complains bitterly about this
@jqb

This comment has been minimized.

Show comment Hide comment
@jqb

jqb Jan 30, 2013

Owner

Thank you very much for contribution :)
However could you please explain to me why you think limiting variables names to just A-Z,a-z,0-9 words is better?

Owner

jqb commented Jan 30, 2013

Thank you very much for contribution :)
However could you please explain to me why you think limiting variables names to just A-Z,a-z,0-9 words is better?

@jaywhy13

This comment has been minimized.

Show comment Hide comment
@jaywhy13

jaywhy13 Jan 30, 2013

Oh, I didn't get to run some more tests and pinpoint exactly what the problem was. I was in a bit of a rush. I had set up my cache backend to use Memcache. Memcache complained about the keys with spaces in them though, which I found to be a bit strange. When I try to create a key with spaces from the admin I got an error.

Oh, I didn't get to run some more tests and pinpoint exactly what the problem was. I was in a bit of a rush. I had set up my cache backend to use Memcache. Memcache complained about the keys with spaces in them though, which I found to be a bit strange. When I try to create a key with spaces from the admin I got an error.

@jqb

This comment has been minimized.

Show comment Hide comment
@jqb

jqb Jan 30, 2013

Owner

Oh.... you are right! But one little thing - I found it really common to use ":" (colon) and "-" (minus) as a separator for "namespaces" in memcache key names. Please add the possibility to use them.

And don't forget to add your self to "contributor" section as well! :)

Owner

jqb commented Jan 30, 2013

Oh.... you are right! But one little thing - I found it really common to use ":" (colon) and "-" (minus) as a separator for "namespaces" in memcache key names. Please add the possibility to use them.

And don't forget to add your self to "contributor" section as well! :)

@jaywhy13

This comment has been minimized.

Show comment Hide comment
@jaywhy13

jaywhy13 Jan 30, 2013

Huh? Could you explain a little more. By the way, this is my first ever pull request :) so baby steps :D

Huh? Could you explain a little more. By the way, this is my first ever pull request :) so baby steps :D

@jqb

This comment has been minimized.

Show comment Hide comment
@jqb

jqb Jan 30, 2013

Owner

Ok. It's really common to use memcache keys like: "global:my_setting_1", or "more-concrete-options:setting_2". Also it would be nice to be able to use "-" in key names (like "my-fancy-memcache-key").
So please add both ":" and "-" signs as a possible characters in key names.

And the other thing is: add yourself to README "contributor" section - you can find some other people there - so just and yourself there in the same way.

Owner

jqb commented Jan 30, 2013

Ok. It's really common to use memcache keys like: "global:my_setting_1", or "more-concrete-options:setting_2". Also it would be nice to be able to use "-" in key names (like "my-fancy-memcache-key").
So please add both ":" and "-" signs as a possible characters in key names.

And the other thing is: add yourself to README "contributor" section - you can find some other people there - so just and yourself there in the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment