This might be overkill, but you could use middleware and parse for the
version number in request.path:
from django.conf import settings
from django.http import HttpResponseRedirect
from mysite import settings as local_settings
class DetectSiteVersion(object):
def __init__(self):
sel
Yeah, you want to assign that user_id value in the view, when you're
saving the instance:
mydocument.author_id = request.user.id
mydocument.save()
Are you trying to solve for a case where you want the current *admin*
user to be the author_id for the record? You can also add a save
metho
You need a save_model() method in your corresponding admin class:
def save_model(self, request, obj, form, change):
obj.user = request.user
obj.save()
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#modeladmin-methods
--~--~-~--~~~---~--~
If you do decide to split up the text, it would be worthwhile getting
to know some of the built-in template filters:
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#truncatewords
Playing around with filters like truncatewords, wordcount, and
wordwrap might give you some ideas.
--~-
Ah, thank you - admindocs is probably all I need, if not I'll take a
look at epydoc. :)
On Oct 15, 4:25 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Wed, Oct 15, 2008 at 4:52 PM, barbara shaurette <[EMAIL PROTECTED]> wrote:
> > I could swear that, pre
I could swear that, pre 1.0 release, I came across a page on auto-
generating documentation from docstrings, but I can't find it in the
Django documentation anymore.
Did a module that did that ever exist? Or am I crazy? Wait, don't
answer that.
I've also seen some old references to docstrings
:) Thanks for this - it does seem simple in retrospect, but I've been
banging my head against the same problem too.
On Sep 17, 11:53 am, intrepidweb <[EMAIL PROTECTED]> wrote:
> FYI, I answered my own question. It's pretty simple, actually. If you
> want process_view() to override the view_func()
*bump*
Seriously - anyone have any ideas?
On Oct 8, 11:46 am, barbara shaurette <[EMAIL PROTECTED]> wrote:
> Actually, that's been suggested ... and considered. The problem is
> that these two initial projects aren't going to be the only ones.
> There will be more
atabase is, alas, just not scalable.
On Oct 8, 11:21 am, Carl Meyer <[EMAIL PROTECTED]> wrote:
> On Oct 8, 12:47 pm, barbara shaurette <[EMAIL PROTECTED]> wrote:
>
> > We're building a couple of different projects - one social network-y
> > site, and one that
We're building a couple of different projects - one social network-y
site, and one that's bloglike. So each has its own unique database,
but they do share one common set of content.
I've created a third "common" project to hold the base models, at
least - the model inheritance seems to be workin
Question 1: What are you using in your template to display the errors?
Question 2: Did you start working on this app on Talk Like a Pirate
Day?
On Sep 23, 3:13 am, Donn <[EMAIL PROTECTED]> wrote:
> On Tuesday, 23 September 2008 11:42:19 Daniel Roseman wrote:> The __all__
> error messages are a
Try logging out your SQL and look for any suspicious INSERTs - I've
run across this error a few times, under different circumstances,
always because my code is trying to insert a string when the column is
expecting an integer.
--~--~-~--~~~---~--~~
You received this
Yep, you'll have some overlap, but I think it makes sense to create a
separate app wherever the data model/views could logically stand
alone. So, user registration would be one app. I'm working on a
project that does a lot with demographic data based on user profiles,
so profiles is another sep
13 matches
Mail list logo