Re: WOrking with checkbox Multiple Select FIeld - Django Admin

2016-10-29 Thread M Hashmi
Form ModelForm if you need to check a single field then you set it as BooleanField in your models.py but if you need to use kind of condition that requires multiple checkboxes to be True. Then its better to define condition in your view like models.py a = models.BooleanField(default=False) b =

Re: Newbie question - data structure for game

2016-10-29 Thread Stephanie Statsmann
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.

Re: Newbie question - data structure for game

2016-10-29 Thread Ken Albright
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

WOrking with checkbox Multiple Select FIeld - Django Admin

2016-10-29 Thread Bernardo Garcia
HI, friends. Someone know how to work with a field that allow perform a multiple selection in a field?, like a checkbox. In django admin, Thanks :) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Django 1.10 "Cannot force an update in save() with no primary key", using model with composite primary key (unique_together)

2016-10-29 Thread Tim Graham
Try bisecting to find the commit in Django where the behavior changed: https://docs.djangoproject.com/en/dev/internals/contributing/triaging-tickets/#bisecting-a-regression On Saturday, October 29, 2016 at 9:57:53 AM UTC-4, in...@lucasvandijk.nl wrote: > > Hi all, > > I have a simple model

Re: Newbie question - data structure for game

2016-10-29 Thread Yaşar Arabacı
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)

Migrating custom mysql application to django orm

2016-10-29 Thread Yaşar Arabacı
Hi, I am trying to migrate my mysql application into django orm. I need help converting my sql statements into it. Here are my models class SearchableText(models.Model): searchable_text = models.TextField() class SearchTerm(models.Model): searchabletext =

Re: Newbie question - data structure for game

2016-10-29 Thread Bob Gailer
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

Re: Convert PostgreSQL tables to django

2016-10-29 Thread Rich Shepard
On Sat, 29 Oct 2016, m1chael wrote: https://docs.djangoproject.com/en/1.10/howto/legacy-databases/ I missed seeing that. Thanks very much. Rich

Re: Convert PostgreSQL tables to django

2016-10-29 Thread m1chael
https://docs.djangoproject.com/en/1.10/howto/legacy-databases/ On Sat, Oct 29, 2016 at 1:02 PM, Rich Shepard wrote: > Is there a tool to convert postgres DDL to django model syntax? It would > sure save a lot of time and effort if there is a converter. > > Rich > --

Convert PostgreSQL tables to django

2016-10-29 Thread Rich Shepard
Is there a tool to convert postgres DDL to django model syntax? It would sure save a lot of time and effort if there is a converter. Rich

Re: question about returning file (pdf,image,zip...) in a request that made from temporary URL

2016-10-29 Thread Stefano Probst
Hello, you can use X-Accel-Redirect. See django-downloadview and "Nginx, Django, and X-Accel-Redirects". Best regards Am Freitag, 28. Oktober 2016 16:59:53

Django 1.10 "Cannot force an update in save() with no primary key", using model with composite primary key (unique_together)

2016-10-29 Thread info
Hi all, I have a simple model whichs acts as custom many-to-many association table with additional data. ``` class NetworkLinkAssociation(models.Model): """ We use our own many-to-many association table, because we want to keep track which links are added, and which links are

Re: Adding view permission by default to auth_permission

2016-10-29 Thread Olivier Dalang
Indeed I just have to squash the commits then it can be merged. I'm out of office until next week but will do so when back. Bests On 27 Oct 2016 23:23, "Luis Zárate" wrote: > This is alive in > > https://github.com/django/django/pull/6734 > > The other PR was close because