mod_wsgi picking up wrong settings

2019-05-14 Thread Brad Rice
I have multiple websites setup on a linode cloud. I am using Virtual Host containers with WSGI paths and Virtual Envs for each app. When I set any of the apps to Debug = False, they throw 500 errors. It appears they are using the same wsgi environment settings because the error is

change display value of filter in admin

2016-05-31 Thread Brad Rice
I have a field that has two values set "S" or "E". I use it to filter records in the admin. I would like the values in the filter to be spelled out as "Signature" and "Emerging". How do I have it show like that in Admin? This is my filter: list_filter = ('app_complete', 'app_type')

Setting a crispy form label from a db model field

2016-01-15 Thread Brad Rice
I'm using Crispy forms for an app that I created. I want to have the labels for the form come from a db entry. Is there a way, and how would you set the label using a model-view variable? -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Index(View) rendering template instead of view

2015-02-24 Thread Brad Rice
So I have a RedirectView.as_view() going to a page in an app called web. In the app web this is my view: class Index(View): def get(self, request, *args, **kwargs): return HttpResponse('Hello, World!') However, instead of showing that, when I get redirected to the app it shows my

Re: RedirectView()

2015-02-23 Thread Brad Rice
AM UTC-5, Andréas Kühne wrote: > > > 2015-02-23 15:30 GMT+01:00 Brad Rice <brad...@gmail.com >: > >> I'm using RedirectView and it is redirecting to my app, but is not >> rendering the view in the app I am pointing to. >> >> I want to redirect my roo

RedirectView()

2015-02-23 Thread Brad Rice
Index(View) class for some reason. Can anybody explain to me how this should work? -- Brad Rice bradri...@gmail.com -- To succeed in life, you need two things: ignorance and confidence. -Mark Twain -- You received this message because you are subscribed to the Google Groups "Django users&q

Re: Class Based Views tutorials

2015-01-06 Thread Brad Rice
hlov > > On Tue, Jan 6, 2015 at 3:49 PM, Brad Rice <brad...@gmail.com > > wrote: > >> Does anyone have a recommendation for intermediate reading to understand >> Class Based Views? It seems most of the Django books were written when >> function based views were

Class Based Views tutorials

2015-01-06 Thread Brad Rice
Does anyone have a recommendation for intermediate reading to understand Class Based Views? It seems most of the Django books were written when function based views were prevalent. I'm still having trouble understanding what the differences are between CreateView and UpdateView and what Meta is

Re: Recommendations for hosting service?

2015-01-06 Thread Brad Rice
I like webfaction, too. I think they would have all the stuff you list as well as more. On Tuesday, January 6, 2015 6:30:18 AM UTC-5, Bobby Mozumder wrote: > > Anyone have recommendations for hosting services that can do Django, > Node.js, Postgreqsl, python3, as well as PHP/MySQL for legacy

Re: ANN: Django website redesign launched

2014-12-16 Thread Brad Rice
I noticed today when I went in to look something up. I like it. On Tuesday, December 16, 2014 11:12:54 AM UTC-5, Jannis Leidel wrote: > > Hi everyone, > > We're incredibly proud to share with you the new design of the Django > website, the documentation and the issue tracker. > > This is a

Re: control attributes on form fields in formset

2014-12-16 Thread Brad Rice
Ah, found it on the django read the docs site. This is what I did in my inline formset factory BookFormset = inlineformset_factory(Author, Book, extra=3, max_num=3, widgets={'name': forms.TextInput(attrs={'class':'u-full-width'})}) On Tuesday, December 16, 2014 8:34:25 AM UTC-5, Brad Rice

control attributes on form fields in formset

2014-12-16 Thread Brad Rice
When I do a model form I can control the fields with attributes using name = forms.CharField(widget=forms.TextInput(attrs={'class':'u-full-width'})) How do I do something like that in an inline formset? I don't see where I can set attributes. -- You received this message because you are

Re: CBV with inline formset

2014-12-15 Thread Brad Rice
, December 15, 2014 4:09:29 PM UTC-5, Vijay Khemlani wrote: > > Try changing the name of the parameter in the url from author_id to pk > > On Mon, Dec 15, 2014 at 5:39 PM, Brad Rice <brad...@gmail.com > > wrote: >> >> I've pretty much butchered the code for 3 days

CBV with inline formset

2014-12-15 Thread Brad Rice
I've pretty much butchered the code for 3 days now and cannot figure out how to insert an inline formset. Can anybody help me? I've tried to pare everything down to use two simple Models just to try to get an insert. I'm using django Author - Book relationship to keep it simple. class

modelformst save

2014-12-05 Thread Brad Rice
For the life of me I can't figure out how to use a modelformset with class view. I get it to display but it won't save. Also, when it goes into form_invalid, it doesn't display the 3 formsets. Can anyone shed a little light? I'm using crispy forms with this in my template: {% crispy

Re: try, except problem

2014-09-06 Thread Brad Rice
ion in the database. > > 2. See above :) > > Med vänliga hälsningar, > > Andréas Kühne > Software Development Manager > Suitopia Scandinavia AB > > > 2014-09-06 18:38 GMT+02:00 Brad Rice <brad...@gmail.com >: > >> I'm trying to write a try: except: to check

try, except problem

2014-09-06 Thread Brad Rice
I'm trying to write a try: except: to check for three things. First I want to check if an application has already been filled out, thus, check for existence. Second if it has been filled out a flag that is is complete is set to true. Then the else would be neither of those things, they need to

Re: crispy forms two forms and context

2014-09-02 Thread Brad Rice
of > the forms will be submitted (assuming each has it's own set of > tags). If you need to combine them and submit info for both, you may need > to roll a single custom form class that can handle all of the data, or > possibly look into Django formsets. > > -James > > >

Re: crispy forms two forms and context

2014-09-01 Thread Brad Rice
nswers object, not a > Form or ModelForm object that will add/update an Answers object, hence > the reason the trace back complains about a lack of 'fields'. > > -James > > On Monday, September 1, 2014, Brad Rice <brad...@gmail.com > > wrote: > >> This docum

crispy forms two forms and context

2014-09-01 Thread Brad Rice
This document seems to indicate I can have two forms inside one set of form tags: http://django-crispy-forms.readthedocs.org/en/latest/crispy_tag_forms.html#rendering-several-forms-with-helpers I cannot figure out how to set the context to be able to iterate over both forms. {% crispy form %}

Re: update a field of a related table on form save

2014-07-30 Thread Brad Rice
Thank you both for those suggestions. I got Tundebazby's to work as it was closest to what I was doing. I'll have to study the post_save some more. On Wednesday, July 30, 2014 2:33:57 AM UTC-4, Tundebabzy wrote: > > Hi Brad, my response is inline > > On 30 Jul 2014 02:26, "

update a field of a related table on form save

2014-07-29 Thread Brad Rice
I have three tables. The first one is application which has a flag for if an app has been submitted as well as created date and modified date. The other two tables relate to the application table. I have two forms that get update those tables. What I want to do is update the application

Re: validate answers from a detail view

2014-04-14 Thread Brad Rice
n this exact feature > > https://code.djangoproject.com/ticket/21644 > > > > Em sábado, 12 de abril de 2014 14h28min01s UTC-3, Brad Rice escreveu: > >> I'm using a Class based Generic Detail View to show end users their >> answers to previous mulit-page forms. How ca

validate answers from a detail view

2014-04-12 Thread Brad Rice
I'm using a Class based Generic Detail View to show end users their answers to previous mulit-page forms. How can I use that final detail view to validate the answers? Should I not be using a Detail view or can I somehow do a conditional get to the next view based upon those answers? Right now

Re: Save to User table first_name and last_name from a page with a different form

2014-01-22 Thread Brad Rice
, January 22, 2014 9:48:27 AM UTC-5, Brad Rice wrote: > > I have a registration and login page that only takes username and > password. After they register or login, they are taken to a profile form > where they can provide additional information such as address and phone > numbers. I'

Save to User table first_name and last_name from a page with a different form

2014-01-22 Thread Brad Rice
I have a registration and login page that only takes username and password. After they register or login, they are taken to a profile form where they can provide additional information such as address and phone numbers. I'm using a Model Form CreateView there. On that page I want the First Name

Re: NoReverseMatch error on redirect

2014-01-14 Thread Brad Rice
I figured it out. I had a namespaced url so it needed: return HttpResponseRedirect(reverse('requestform:registrant_add', kwargs={'app_id': obj.id})) On Monday, January 13, 2014 12:22:59 PM UTC-5, Brad Rice wrote: > > I have a mulit-page form I am building. I get the start page to

NoReverseMatch error on redirect

2014-01-13 Thread Brad Rice
I have a mulit-page form I am building. I get the start page to enter the data for the application, validate and save. When I try using reverse to move to the next page I get this error: NoReverseMatch at /requestform/start/Reverse for 'registrant_add' with arguments '()' and keyword arguments

using success_url

2014-01-10 Thread Brad Rice
I can't seem to find success using success_url If I try this in my urls.py file url(r'^step2/', AnswersCreate.as_view(success_url='/requestform/success'), name='answers'), and then in my view: def form_valid(self, form): obj = form.save(commit=False) obj.created_by =

Re: How to edit a model with an inline formset

2014-01-10 Thread Brad Rice
I'm following that blog entry, too, and getting an error when I try to save: [u'ManagementForm data is missing or has been tampered with'] On Thursday, January 9, 2014 11:57:37 AM UTC-5, Cody Scott wrote: > > I am trying to create a model with an inline formset. I followed the guide > here >

Re: saving to two models from one class view

2014-01-10 Thread Brad Rice
moment, two models do not have any relationship. I think you made > an error in Line 3: > > created_by = models.ForeignKey(User, unique=True) > > I think you meant "Applicant" instead of User. > > Regards, > Arun > > On Friday, January 10, 2014 3:13:42

saving to two models from one class view

2014-01-09 Thread Brad Rice
I have been banging around trying to write to two models from one view for a couple days and just cannot figure it out. I am using a CreateView. I want to write to a model with just the created_by user and a default value of False in app_complete to. I'm getting this error: [u'ManagementForm