The flatpages view is not provided the context which includes 'posts'.
IMO you are correct with the {% load posts %} technique because it is
entirely as result of the template you are using that requires you display
that information -- if that makes sense.
In other words it's not because of the
It's not redirecting because the following statement never evaluates to
True:
if accept is not None and accept.is_active:
You are using auth.authenticate (see below) but I don't think that's what
you want in this case. auth is the built in django auth system which your
code isn't using.
acce
return render_to_response('home/about.html', data,
'context_instance=RequestContext(request)')
Change that to:
return render_to_response('home/about.html', data,
context_instance=RequestContext(request))
The context_instance is an optional keyword argument. Right now you're
passing it as a po
I never knew this existed. I do hope someone continues development...
On Thursday, March 7, 2013 8:39:56 AM UTC-8, Daniele Procida wrote:
>
> I like and use Django Form Designer, <
> https://github.com/philomat/django-form-designer>, but it hasn't been
> updated for a while and needs some work.
I'd just like to chime in as another "develop on windows, deploy to linux"
guys. It's worked fine for me for years. Like people have said, sometimes
it's hard to get certain libraries for Windows installed but it's usually
not to hard to find a packaged solution if you google (and in simple
pro
Does apache have write permissions on the DB folder(s).
I know you'll get errors if you don't have permission for the db file
itself AND the folder containing it.
On Saturday, June 8, 2013 10:16:46 AM UTC-7, Brian Lee wrote:
>
> Very good guess... but I looked and in both manage.py and mysite/
I'm having trouble wrapping my head around how to use generic class based
views properly when it comes to creating objects associated with already
created objects.
The concept here is adding File objects to a Case object.
The url pattern would be something like:
url(r'^case/(?P\d+)/add/$', Add
:38:09 PM UTC-7, Jason Arnst-Goodrich wrote:
>
> I'm having trouble wrapping my head around how to use generic class based
> views properly when it comes to creating objects associated with already
> created objects.
>
> The concept here is adding File objects to a Cas
That reassures me then.
In the past I stayed away from the generic class based views and in my
current project I'm using nothing but them.
Everything is working but it's not clear by looking at it *why* it works.
There might be a little too much magic happening for my liking but I'm
going to s
I should also clarify just in case anyone else runs into the same problem
in the future:
My form_valid() was not working correctly because I had my form definition
excluding a (required) field so it would NEVER be able to save my model
under any circumstance.
def form_valid(self, form):
This is a common problem to run into.
def form_valid(self, form):
customer = form.save(commit=False)
customer.store = self.request.user.active_profile.store
customer.save()
return super(CustomerInformationView, self).save(form)
super(CustomerInformationView, self).save(form)doesn't really
If you want to update the initially selected value (but still allow the
user to select a different site)I think you're on the right track with
ModelAdmin.get_form
If you want to completely restrict them to their current session's site
you'll want to use a combination of ModelAdmin.get_form (to
As a former PHP programmer who's switched to Django -
Trying to modify the administration app can be hard. It's something I still
stay away from because I feel once you start adding functionality that
doesn't come working out of the box, you're better off building your own
admin app. I don't t
I just stumbled on this and it looks absolutely amazing. I do have one
request though: can we get a sample project up that uses Google's
authenticator (or anything else).
This looks like the best solution for two factor authentication for Django
but I don't think many people will know where to
Nobody's ever switched FROM Django TO PHP as far as I know :)
But like others have already said - there's plenty of good frameworks that
accomplish the same things Django does in PHP. Unless you truly love PHP
I'd take the time to learn Django instead. :P
On Friday, June 28, 2013 10:17:50 AM UT
eate a TOTP or HOTP device (usually the former), encode the key with
> base32, build a URI as documented, and render a QR code for the user to
> scan. Alternatively, the user can also type the base32-encoded key in
> manually.
>
>
> [1] http://code.google.com/p/google-aut
xists? Or allow some parameter
controlling the save on the method? Or maybe provide a separate class
method?
On Monday, July 1, 2013 10:14:35 PM UTC-7, Jason Arnst-Goodrich wrote:
>
> I'm glad you saw my message - if nothing else just so you know this
> project is appreciated.
>
Another tip is to check out Bitnami. I've used them a couple times now
(both VMs and stack installs). They do a pretty good job of getting a stack
you want on Windows real fast.
http://bitnami.com/stack/django/installer
(note it comes with MySQL and Postgres)
--
You received this message beca
een the decorated-view pattern and the
> view-as-class pattern. In any case, I expanded the otp_required decorator
> to take an if_configured argument. New versions of django-otp and
> django-otp-agents are available.
>
> Thanks so much for your feedback. Do keep in touch
I thought about that and I didn't like that it logged them in if they
failed the OTP token. I'll probably use it for now.
The only reason being I want them to do it in a single "attempt session".
If they login half way and leave for a couples minutes I want them to
supply the regular login cred
You might want to look into class based views:
https://docs.djangoproject.com/en/dev/topics/class-based-views/
These are then extended to create "generic views" that handle a lot of
these common patterns.
there's something called an "UpdateView" that handles this exact pattern:
https://docs.dja
>
> Problem is that usually databases aren't very fast to search NULL values
> so if you have to for example produce often list of products that you can
> buy "infinite amount", you would like to consider using value(s) that don't
> conflict from valid set of values.
I'm pretty sure that's no
inen wrote:
>
> On Mon, 19 Aug 2013 11:14:54 -0700 (PDT)
> Jason Arnst-Goodrich > wrote:
>
> >
> > >
> > > Problem is that usually databases aren't very fast to search NULL
> values
> > > so if you have to for example produce often list of p
I don't think that will work because the default value is unrelated to a
specific instance of a model and you want it to depend on the instance if
I'm not mistaken. Once the instance exists, we're past the point where a
default value will be used.
I think you'll have to handle this in a view.
Try:
expiry_date = forms.DateField(widget=CalendarWidget())
On Tuesday, November 12, 2013 5:41:27 PM UTC-8, Lachlan Musicman wrote:
>
> Hola,
>
> I've set up a CalendarWidget as per the docs
> https://docs.djangoproject.com/en/1.6/topics/forms/media/ and can see
> correct results in the shell:
7;datepicker'}))
On Wednesday, November 13, 2013 1:31:40 PM UTC-8, Lachlan Musicman wrote:
>
> Nothing, unfortunately.
>
> On 14 November 2013 07:37, Jason Arnst-Goodrich
> >
> wrote:
> > Try:
> >
> > expiry_date = forms.DateField(widget=Ca
Without knowing much about your specifics, I would suggest looking into
MongoDB. You'll have some of the issues in #2 and you obviously won't have
a generic app that people without Mongo can use but I'd at least look into
it before you go any further.
On Tuesday, March 11, 2014 8:42:24 AM UTC-7
You're passing two different dictionary parameters there. Try something
like this:
ctx = { 'customers':customers, 'form': form }
return render_to_response('index.html', ctx)
On Wednesday, May 14, 2014 3:22:22 PM UTC-7, G Z wrote:
>
> def index(request):
> form = SignUpFo
28 matches
Mail list logo