then you can still define it in get_success_url() on the CreateView...you just can't use redirect(object) and expect it to direct to your object...you'd need to have get_success_url() return the actual URL you want
mecca4 has quit
xcesariox has quit
jarlopez has quit
sxn has quit
ryanisnan joined the channel
faldridge has quit
faldridg_ joined the channel
joelones
mmikeym: thanks for your help. i'm just not sure i follow.
What can I define it in get_success_url() on the CreateView?
mmikeym
joelones: instead of returningg redirect(object) you'd need to return the url path you want CreateView to go to on success...so '/path/to/where/I/want/to/go'
mgrouchy has quit
joelones
right, that i'm doing, just dont know how to return the object
mbrzuzy joined the channel
tolmun joined the channel
mmikeym
to get the previously added object you'd probably need to pass a kwarg with the object when you're doing the redirect...not too sure how you'd do that to be honest
joelones
k, appreciate the help
mmikeym
no prob
ethelward has quit
ethelward joined the channel
georgeirwin joined the channel
chrisramon has quit
naro has quit
edbaffei has quit
sxn joined the channel
mbrzuzy
Hi guys. I'm trying to loop through a result set, and when a certain field is true for the first time, I want to output something once and continue with the loop. I can't set a variable to use as a flag in the template. Any ideas how I could go about this?
Mechanimal has quit
georgeirwin has quit
citizen-stig has quit
joelones has quit
ryanisnan has quit
pabardina joined the channel
trewq
I have a category and subcategory drop down. I would like to change the subcategory dropdown list based on the category selected. What is the best way to do this?
dman777_alter joined the channel
subleq has quit
jhulten joined the channel
EcoGiko has quit
chrisco joined the channel
chrisco has quit
Sweetman_ joined the channel
kezabelle has quit
AlexBerdnikov
trewq, I think it's not really Django-specific question. However I'd say you should add JS onChange handler to your category dropdownbox and send AJAX request to your backend, then return subcategories in JSON or rendered HTML and replace your subcategory innerHTML with that.
Sweetman has quit
Sweetman_ is now known as Sweetman
thepeculiarform joined the channel
thepeculiarform has quit
nedbat joined the channel
MarbinDrakon has quit
synfin joined the channel
acmehandle
Is there a way to have urls be dynamic? For example if I had a url like: asite.com/chicken/soup and asite.com/beef/soup return a list of soups I would like asite.com/soup to return the list of soups for both chicken and beef and split_pea soups and any other soups.
uczekalla has quit
joelones joined the channel
mattmcc
You can use a middleware class to see if a part of the URL matches some list and short-circuit the urlconf.
joelones has quit
uczekalla joined the channel
linovia
I'm sorry, I probably missed yesterday's answers, but can anyone advice a user registration app esp. if I target a Django 1.7 / Python 3.4 project ?
dman777_alter has quit
zz_neruson is now known as neruson
hazzadous joined the channel
thepeculiarform joined the channel
thepeculiarform has quit
amikiri joined the channel
joelones joined the channel
tiktuk joined the channel
thepeculiarform joined the channel
joelones has quit
jhulten has quit
EyePulp joined the channel
kracekumar joined the channel
ctcg joined the channel
thepeculiarform has quit
kracekumar
I have field on model as first_name = models.CharField(max_length=100). Db backend is sqlite3. If a db record is created via django shell, first_name is set to empty string. Is this due to sqlite3?
mattmcc
What were you expecting to happen?
kracekumar
Throw an error which says field is required
hazzadous has quit
not form field, I mean
mattmcc
For historical reasons, model validation isn't enforced, you have to call it yourself.