Re: Newbie question - data structure for game
You'll probably need jQuery. Bear in mind "size" is not absolute as it will depend on font family and font height. On Sunday, 30 October 2016 01:27:59 UTC+2, Ken Albright wrote: > > Sounds good. Thanks for the advice. Now if I could only figure out how to > get forms to expand and contract to match the size of the quote... > > Thanks. > > On Friday, October 28, 2016 at 5:00:14 PM UTC-7, Ken Albright wrote: >> >> I'm just learning Python and Django so please be gentle... >> >> I've written a quote decryption game (like you see in the newspaper) in >> Python. I'd like to put it on a web page with Django. However, I'm not sure >> of the best way to structure the data. The original quote and the encrypted >> quote need to have a one-to-one relationship at the letter level. So it >> could be two strings on the same row (same id) or a set of tuples, a >> dictionary, or ??? >> >> How to set up the database and models.py? >> >> Thanks >> > -- 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/600aea7e-54fc-4856-9c71-fc56469d3712%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Newbie question - data structure for game
K -- 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/fd2efe41-c1dc-455d-9597-a931186c6382%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Newbie question - data structure for game
Sounds good. Thanks for the advice. Now if I could only figure out how to get forms to expand and contract to match the size of the quote... Thanks. On Friday, October 28, 2016 at 5:00:14 PM UTC-7, Ken Albright wrote: > > I'm just learning Python and Django so please be gentle... > > I've written a quote decryption game (like you see in the newspaper) in > Python. I'd like to put it on a web page with Django. However, I'm not sure > of the best way to structure the data. The original quote and the encrypted > quote need to have a one-to-one relationship at the letter level. So it > could be two strings on the same row (same id) or a set of tuples, a > dictionary, or ??? > > How to set up the database and models.py? > > Thanks > -- 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d97d972b-ec64-483a-8aaf-e69482a4050e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Newbie question - data structure for game
I am also quite new to django, but I will go with something like this; class Quote(models.Model): quote= models.CharField(max_length=100) class EncryptedQuote(models.Model) quote = models.ForeignKey(Quote, on_delete=models.CASCADE) encrypted_quote = models.CharField(max_length=100) So, you can have multiple encryptions of any quote. On Saturday, October 29, 2016 at 3:00:14 AM UTC+3, Ken Albright wrote: > > I'm just learning Python and Django so please be gentle... > > I've written a quote decryption game (like you see in the newspaper) in > Python. I'd like to put it on a web page with Django. However, I'm not sure > of the best way to structure the data. The original quote and the encrypted > quote need to have a one-to-one relationship at the letter level. So it > could be two strings on the same row (same id) or a set of tuples, a > dictionary, or ??? > > How to set up the database and models.py? > > Thanks > -- 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/dc31d02e-8345-4467-99df-0e4688a76a48%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Newbie question - data structure for game
On Oct 28, 2016 7:59 PM, "Ken Albright" wrote: > > I'm just learning Python and Django so please be gentle... > > I've written a quote decryption game (like you see in the newspaper) in Python. I'd like to put it on a web page with Django. However, I'm not sure of the best way to structure the data. The original quote and the encrypted quote need to have a one-to-one relationship at the letter level. So it could be two strings on the same row (same id) That is the simplest, and I see no need for anything more complex. or a set of tuples, a dictionary, or ??? > > How to set up the database What do you mean? and models.py? class Quote: plain= Models.CharField() crypt = Models.CharField() > Thanks > > -- > 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 https://groups.google.com/group/django-users. > To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b37833bf-e474-4b15-844d-4ef8d8e854b6%40googlegroups.com . > For more options, visit https://groups.google.com/d/optout. -- 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAP1rxO7uhPGRD8MdDaZxPM9ZWpViMMoFdy0_dBfb5ahuZiEB4w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Newbie question - data structure for game
I'm just learning Python and Django so please be gentle... I've written a quote decryption game (like you see in the newspaper) in Python. I'd like to put it on a web page with Django. However, I'm not sure of the best way to structure the data. The original quote and the encrypted quote need to have a one-to-one relationship at the letter level. So it could be two strings on the same row (same id) or a set of tuples, a dictionary, or ??? How to set up the database and models.py? Thanks -- 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b37833bf-e474-4b15-844d-4ef8d8e854b6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.