te
display rather than Hello World. It isn't finding my 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 y
#x27;index'),
url(r'^gallery', gallery, name='gallery'),
)
On Monday, February 23, 2015 at 10:01:53 AM UTC-5, Andréas Kühne wrote:
>
>
> 2015-02-23 15:30 GMT+01:00 Brad Rice >:
>
>> I'm using RedirectView and it is redirecting to my app, bu
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 b
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 modified
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:2
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 %}
Schneider wrote:
>
> It looks like you are passing the context an actual Answers 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, Se
ep in mind that only one 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.
>
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
f type Application 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 >:
>
>> I'm trying to write a try: except: to check
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 reference
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 Author(m
onse(self.get_context_data(formset=book_formset))
On Monday, 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 > wrote:
>>
>> I've pre
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 subs
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, 20
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 long
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 stu
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
hlov
>
> On Tue, Jan 6, 2015 at 3:49 PM, Brad Rice
> > 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 prevalent. I
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 d
>
> Hi Brad,
>
> At the 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
>
&
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
> ht
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 = self.reque
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
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 t
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
plication_id}))
On Wednesday, 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 addre
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 I
pen on 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 for
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')
app_type
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 ALLOWED_HOSTS
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 unsu
32 matches
Mail list logo