Form input: "unlimited list," what does the backend look like?

2016-10-18 Thread Andrew Emory
I want to get user data where is use a ChoiceSelect field. And if the user selects an option another one pops up giving them the same choices again. I understand that I would do this with JavaScript on the front end. But, it is unclear to me what kind of architecture and model fields I should

Re: Model Field: field.editable

2016-10-07 Thread Andrew Emory
I figured it out. It would be a boolean field followed by (in my case) a CharField. You would get the conditionality w/ JS. On Friday, October 7, 2016 at 8:11:59 PM UTC-5, Andrew Emory wrote: > > I am having trouble finding out how this field renders. > > The behavior that I want

Re: Model Field: field.editable

2016-10-07 Thread Andrew Emory
NVM, that is a field option. Still though, can anyone suggest the model field to use? On Friday, October 7, 2016 at 8:11:59 PM UTC-5, Andrew Emory wrote: > > I am having trouble finding out how this field renders. > > The behavior that I want is basically if the user clicks a rad

Model Field: field.editable

2016-10-07 Thread Andrew Emory
I am having trouble finding out how this field renders. The behavior that I want is basically if the user clicks a radio button to true than a form field is displayed for more info, if they click false then nothing needs to happen. Is this the model field that I want? Or do I just need a boole

MIDDLEWARE vs MIDDLEWARE_CLASSES: 'WSGIRequest' object has no attribute 'user'

2016-08-17 Thread Andrew Emory
My settings.py file has the default MIDDLEWARE settings generated by django-admin startapp: MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.

What happened to my admin? AttributeError: 'WSGIRequest' object has no attribute 'user'

2016-08-14 Thread Andrew Emory
Django 1.9. Everything seems to be set up properly. I was having some issues with my templates but got them working. I didn't touch any admin or even any login stuff. Though my template does have a {% csrf_token %}. I can't imagine how this happened. >From Googling it seems like it was a

Re: forms.Form, models.Model, forms.ModelForm? (self.django)

2016-08-14 Thread Andrew Emory
opinion, but those are the broad strokes. > > On Sun, Aug 14, 2016 at 2:04 PM, Andrew Emory > wrote: > >> Would someone explain to me when you would choose one class over the >> other? Does forms.Form not create a database? Can't you just render >> models.Mode

forms.Form, models.Model, forms.ModelForm? (self.django)

2016-08-14 Thread Andrew Emory
Would someone explain to me when you would choose one class over the other? Does forms.Form not create a database? Can't you just render models.Model as a form? I understand forms.ModelForm is a helper class for creating a form from a model. But I still don't really understand why you would

Re: TemplateDoesNotExist at/

2016-08-13 Thread Andrew Emory
I figured it out. Of course, now the form isn't rendering... But at least Django isn't throwing that error anymore. for all those who are curious, I was one directory shallow on the template file's location. I was telling Django to look in static/templates when I needed to tell it to look in

Re: TemplateDoesNotExist at/

2016-08-13 Thread Andrew Emory
Actually, its Django 1.9. -- 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-

Re: How t o create more than one application

2016-08-13 Thread Andrew Emory
Just enter the command: python manage.py startapp app_name from your terminal window in the projects source directory. On Friday, August 12, 2016 at 7:37:10 PM UTC-5, Timothy Steele wrote: > > > > down votefavori >

TemplateDoesNotExist at/

2016-08-13 Thread Andrew Emory
I am having a problem figuring this out and I think there is something wrong with my TEMPLATES dictionary in settings.py. I have my templates in static/templates/app_name and static is in the same directory as my project source. So I have nested os.path.join and os.path.dirname as follows:

Re: Trying to set up a website using Django but something went wrong

2016-08-06 Thread Andrew Emory
Do you have Python installed? On Saturday, August 6, 2016 at 11:03:06 AM UTC-5, owen wrote: > > I downloaded Django recently and I have all the necessary files (Or at least > I think I do ) > > > However when I try to set up a project through this line of code: > > > $ django-admin startproject m

Re: deprecated urls as strings: problem adding second + urls to main urls.py file

2016-08-06 Thread Andrew Emory
don't like the > look of it, but that's Python. > > On Saturday, August 6, 2016 at 8:42:29 AM UTC-4, Andrew Emory wrote: >> >> I am having trouble with how I would intuitively get my url patterns to >> work, by listing the actual path to the view function

deprecated urls as strings: problem adding second + urls to main urls.py file

2016-08-06 Thread Andrew Emory
I am having trouble with how I would intuitively get my url patterns to work, by listing the actual path to the view function. So it needs to be a callable, ok. But I don't like having 15+ from appname import views as appname_view. I can add a url.py file in each app and use include(). But t