Collin Anderson writes:
> https://code.djangoproject.com/ticket/24453
For posterity: I should have been using a forms.MultipleHiddenInput
widget for the ManyToManyField, rather than a plain old
forms.HiddenInput.
> On Wednesday, March 4, 2015 at 12:40:40 AM UTC-5, Eric Abrahamsen
&
Hi,
I'm making some heavily customized model formsets, to encourage my users
to input data. Mostly that involves cutting down the number of huge
drop-down menus they have to go surfing through.
So I have a model like this:
class Work(models.Model):
authors = models.ManyToManyField(Author,blank
r across browsers?
>
> Yes.
>
>> Is it a dumb idea for reasons I haven't thought of?
>
> No.
Thank you very much!
> Cheers,
>
> Tom
>
> On Tuesday, 27 January 2015 03:26:52 UTC, Eric Abrahamsen wrote:
>
> As far as I can tell (testing with the Conkeror w
As far as I can tell (testing with the Conkeror web browser), it's
possible to read both GET and POST at once: if a user POSTs to a URL
containing GET parameters, you can get them both in the view.
Is this reliable behavior across browsers? Is it a dumb idea for reasons
I haven't thought of?
A bi
Kakar Nyori writes:
> When doing so, only the last pform is gets saved. And the other two
> pforms are ignored. How do I get to save all the three forms of photo
> (pforms) accordingly?
>
> Or is there any other way around? Your help will be much appreciated!
> Thank you.
James is right that a f
Eric Abrahamsen writes:
Apologies for the very stupid posting below! I did my homework, and
actually used the JQuery ajax function, like I was supposed to.
Incidentally, I also had the "async" keyword on the tag in the
head that loaded jquery, and that apparently killed the docu
I have a question about the django-hitcount app that I think is likely
csrf-related.
I recently upgraded a site from Django 1.4 all the way to 1.7. I've got
most everything working fine, except that the hitcount app I've been
using[1], stopped recording hits.
Nevermind the actual app, it works by
d be to fork the app, then experiment
with switching code in the app itself, rather than switching apps in my
Django project. Whether or not that will actually turn out to be simpler...
> On Tuesday, November 25, 2014 1:50:40 AM UTC-5, Eric Abrahamsen wrote:
>
> I'm messing around with
I'm messing around with testing many Github forks of the emencia
newsletter app, looking for one I like. In the meantime (and as I'm
likely to continue switching around for a while), I'd like not to have
to commit code that points at the different names of the different apps:
they all have the same
I'm using the emencia newsletter, and things are essentially fine,
except that I've run into a very strange permissions issue in the
admin
backend. I have my regular user login, and the superuser. I've given
my
regular user all permissions for all newsletter models, and yet some
of
the inter-modal
On Sat, Mar 05 2011, royy wrote:
> Hello.
>
> I can't create a superuser for an admin area, i type username and e-
> mail, then when I try to type password the keyboard freezes and
> doesn't respond so I need to use the Ctrl + break to quit server (I'm
> following the steps for writing my first D
>
>
> -Ursprüngliche Nachricht-
>
> Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im
> Auftrag von Eric Abrahamsen
> Gesendet: Freitag, 04. März 2011 10:46
> An: django-users@googlegroups.com
> Betreff: Re: parameter, but not in the URL
>
On Fri, Mar 04 2011, Szabo, Patrick (LNG-VIE) wrote:
> 127.0.0.1:800/93/1
>
>
>
> This would delete an object with the id 93.
>
> This is very unsecure and once the user notices how this works he
> could delete any object he wants.
>
>
>
> How can i make this more secure ?!
There's pretty muc
I'm using the emencia newsletter, and things are essentially fine,
except that I've run into a very strange permissions issue in the admin
backend. I have my regular user login, and the superuser. I've given my
regular user all permissions for all newsletter models, and yet some of
the inter-modal
It was only recently that I finally learned how Etags work in Emacs and
made myself a tags file for Django's source code -- now that I'm 4/5 of
the way to pure programming leisure I can't rest until the laziness is
complete.
That means making a programmatic map of django class/function import
path
On Tue, 2010-03-23 at 23:14 -0700, Daniel wrote:
> Hi,
>
> Are these statements equivalent? I want to say no, but I can't see
> why.
Nope. If the key 'foo' doesn't exist, request.POST.get('foo') will
return None, while request.POST['foo'] will blow up with a KeyError.
Using the get() method on d
On Feb 18, 2010, at 9:41 PM, Sander wrote:
Thanks!
Those guidelines are certeinly helpfull.
Hope these helps. If you need more specific answers please expand the
following paragraph:
My main project should have a couple of entities, like for example
an
'Employee', 'Manager', 'Question'. A
On Feb 8, 2010, at 7:56 AM, eaman wrote:
I'm up to code those two methods...
If some one is interested in this thread I managed to code
these two methods: get_next | get_prev
in order to get a previous or next item in a set right from my model:
- http://dpaste.com/155961/
Now that you've got
On Feb 7, 2010, at 8:54 PM, eaman wrote:
On Feb 7, 3:24 am, Eric Abrahamsen wrote:
Yup, if you have non-null date/datetime fields on your model, each
model will automatically get "get_next_by_FOO" and
"get_previous_by_FOO" methods, where FOO is the name of the dateti
Yup, if you have non-null date/datetime fields on your model, each
model will automatically get "get_next_by_FOO" and
"get_previous_by_FOO" methods, where FOO is the name of the datetime
field:
http://docs.djangoproject.com/en/1.1/ref/models/instances/#django.db.models.Model.get_next_by_FOO
Over the course of a year or two of manual database twiddling, I've
fairly well messed up my table indexes and whatnot. In particular, I'm
getting lots of "duplicate key names" when installing fixtures for
testing, and generic foreign keys that point at contenttypes that no
longer exist.
ou've already got a Content superclass going you could probably
do some metaclass jiggery-pokery to make this automatic for subclasses
�C on reflection it wouldn't be as simple as I blithely suggested in my
last response, but I think it could be done.
E
On Jan 30, 5:59 am, Eric Ab
I've got a "NewContent" model which is essentially a tumblelog – when
instances of certain models are created or saved, a NewContent
instance is created that keeps track of them, and NewContent querysets
are used to populate the index page, RSS feed, etc.
Up until now I've been doing this i
I've done this by including a python-only attribute on the models
themselves:
include_template = "content/post/include.html"
and in the template {% include content.include_template %}
Provided that "content" is a model instance.
You could even write a model mixin class that does this automat
On Jan 8, 2010, at 12:54 PM, Russell Keith-Magee wrote:
On Fri, Jan 8, 2010 at 12:50 PM, Eric Abrahamsen
wrote:
On Jan 8, 2010, at 12:28 PM, neridaj wrote:
Can anyone tell me why this less than symbol is causing this if
statement to fail?
{% if page_obj.number|add:&q
On Jan 8, 2010, at 12:28 PM, neridaj wrote:
Can anyone tell me why this less than symbol is causing this if
statement to fail?
{% if page_obj.number|add:"4" < paginator.count %}
{% endif %}
Because the if tag doesn't accept comparison operators. If you're
trying to make a m
On Dec 24, 2009, at 10:28 PM, brook wrote:
>
>
> On Dec 23, 5:13 am, Eric Abrahamsen wrote:
>>
>> I'm using memcached with the cache_page decorator, and it simply
>> wasn't caching
>> views.
>
>> CACHE_MIDDLEWARE_KEY_PREFIX = 'blah
On Dec 24, 2009, at 1:57 AM, Peter Rowell wrote:
>> CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
>
> I know this is a silly question, but have your tried this *as an
> anonymous user*? I ask because it's easy to forget you are logged in.
> When in doubt use something like Firefox's Web Developer Toolba
Hi,
I noticed a while ago that my cache wasn't doing anything – I'm using
memcached with the cache_page decorator, and it simply wasn't caching
views. I've verified that memcached is running, and my settings.py
file is pointed at the right address. Here are my relevant settings:
CACHE_MIDDL
On Nov 27, 11:50 am, Count László de Almásy wrote:
> ok, fair enough. does generic views have the machinery to replicate
> the admin interface?
Generic views take most of the pain out of CRUD, and also take care of
producing and validating forms. You can also steal some of the nice
javascript w
On Oct 8, 2009, at 8:20 PM, Joshua Partogi wrote:
>
>> even the developers who know what is happening shouldn't complain.
>>
>> I have a site that seems to get crawled by bots quite frequently. I
>> had a
>> feedback form that didn't have a honeypot originally. I got about
>> 3-4 pieces
>> o
I have a site with SEND_BROKEN_LINK_EMAILS = True in the settings,
which means I get both legitimate 404s and also probes where the bot
is being clever by putting the fake URL in the referer heading.
Today I got a series of 404 messages that were alarming because they
were probing legitimat
On Aug 17, 2009, at 9:33 AM, Mike Dewhirst wrote:
>
> There's something here I'm not seeing. If anyone can point out the
> docco
> which refers I would be most grateful ... I'm using py2.6 and Django
> from svn head.
>
> The template below displays the title correctly but claims "No meta
> dic
On Aug 10, 2009, at 1:56 PM, J0hnsmith wrote:
>
> Which should I use to match a slug made using slugify?
>
> (?P[a-zA-Z0-9-]+)
>
> or
>
> (?P[\w-]+)
They're not exactly the same. Most of the time \w is alphanumeric (ie
equivalent to your first regex) but Django compiles the
RegexURLPattern
On Aug 8, 2009, at 8:24 PM, justin jools wrote:
> ok well thanks for your reply:
>
> first I have free access and they have told me python is installed
> but it's not working as I ran a hello world test script which doesbt
> execute. That is the first of my problems.
>
> My second problem is
On Aug 8, 2009, at 5:14 PM, justin jools wrote:
> Yes Ive read these docs and I understand certain script changes are
> needed before running on the server but I want to know about:
>
> installing Django on the server, do i need to use telnet to do
> this? or can i upload already executed dj
On Jul 29, 2009, at 9:57 PM, Salvatore Leone wrote:
>
>
>> Given the way boolean tests go in Python, you should just be able to
>> test for the dictionary itself:
>>
>> if request.GET:
>>
>> else:
>>
>>
>> E
>>
>
> mmm I don't think so, I think request.GET is true even if the
> d
On Jul 29, 2009, at 6:06 PM, Salvatore Leone wrote:
>
> I answer my self:
>
> all I need is to test the length of the dictionary.
>
> if request.method == "GET" and len(request.GET) != 0:
Given the way boolean tests go in Python, you should just be able to
test for the dictionary itself:
if
On Jul 5, 2009, at 11:32 PM, Matthias Kestenholz wrote:
>
> Hi,
>
> On Sun, Jul 5, 2009 at 11:42 PM, Eric Abrahamsen
> wrote:
>>
>> I'm somehow failing to use modelformsets, this is the relevant view
>> and error traceback:
>>
>> http://dpas
I'm somehow failing to use modelformsets, this is the relevant view
and error traceback:
http://dpaste.org/evHq/
I'm validating a whole bunch of forms at the same time, but I don't
see how that could cause the formset failure. Sample is a model with a
ForeignKey to Author (though the Forei
On Jun 2, 2009, at 2:07 AM, Karen Tracey wrote:
> On Sun, May 31, 2009 at 11:40 PM, Eric Abrahamsen
> wrote:
>
> On May 31, 2009, at 11:45 PM, Karen Tracey wrote:
>
>> On Sun, May 31, 2009 at 10:13 AM, Eric Abrahamsen
>> wrote:
>>
>> Hi,
>>
>
On May 31, 2009, at 11:45 PM, Karen Tracey wrote:
> On Sun, May 31, 2009 at 10:13 AM, Eric Abrahamsen
> wrote:
>
> Hi,
>
> I've got two models, Author and Entry, with a foreignkey from Entry to
> Author. There are many Authors with no related entries, and until
&g
Hi,
I've got two models, Author and Entry, with a foreignkey from Entry to
Author. There are many Authors with no related entries, and until
recently I've been able to put this manager on the Author model to
only select Authors with Entries:
def contributors():
return self.exclude(entry__isnul
On May 29, 2009, at 5:40 AM, Kevin Fullerton wrote:
>
>
> On Thu, May 28, 2009 14:31, Eric Abrahamsen wrote:
>>
>> The default comment form does not include a next parameter, so if you
>> don't override the builtin comment templates you won't get any next
On May 28, 2009, at 3:17 PM, Kevin Fullerton wrote:
>
> On Thu, May 28, 2009 01:50, Eric Abrahamsen wrote:
>>
>> On May 28, 2009, at 4:02 AM, Kevin Fullerton wrote:
>>
>>>
>>> I'm working with django.contrib.comments at the moment, and so
On May 28, 2009, at 4:02 AM, Kevin Fullerton wrote:
>
> I'm working with django.contrib.comments at the moment, and so far
> most
> things are working as expected.
>
> I'm building the submission form using {% get_comment_form for
> object as
> form %} and have added the following as part of
On May 25, 2009, at 4:41 PM, Andy wrote:
>
>
>
> On May 24, 9:54 pm, Brian Neal wrote:
>> On May 24, 6:50 pm, Continuation wrote:
>>
>>> For example, I have a view edit_profile that edits a user's profile.
>>> Obviously I want to make sure that each user can edit his own
>>> profile
>>> only
On May 20, 2009, at 10:53 AM, Roberto Cea wrote:
>
> I have a large amount of optional components (with a model for each
> one) that will be freely inserted by my users, and it would be
> impractical to render each one in a single large template.
> I want to give each component a ".render()" met
On May 17, 2009, at 1:26 AM, Apple wrote:
>
> I write some code like following:
>
> #coding=utf8
> from django.shortcuts import render_to_response
> from django.http import *
, what system/django version are you running,
and how exactly are you running the development server.
Yours,
Eric
> Lisa
>
> On Fri, May 8, 2009 at 11:10 PM, Eric Abrahamsen
> wrote:
>
> On May 9, 2009, at 2:37 AM, lisa holper wrote:
>
>> Hi,
>>
>> Yes, I
-index
But you should probably back up and start with the tutorial:
http://docs.djangoproject.com/en/dev/intro/tutorial01/#intro-tutorial01
Eric
>
> Thanks, Lisa
>
> On Fri, May 8, 2009 at 5:57 AM, Eric Abrahamsen
> wrote:
>
>
> On May 8, 2009, at 4:35 PM, lisa h
On May 8, 2009, at 4:35 PM, lisa holper wrote:
> Hi,
>
> I created a website with django.
> My problem: When I insert all .html pages in my directory, I can see
> the website but without using the 'base' template.
Do you have {% extends 'base.html' %} at the top of all your
templates? You h
On Apr 18, 2009, at 6:03 PM, SoCow wrote:
>
> Hi there,
>
> I've implemented django.contrib.comments and activated the custom
> redirect option by including the following line in the comments form:
>
> value="{{ object.get_absolute_url }}" />
>
> This works great for redirecting back to the ori
I'm planning on migrating an existing (django.contrib) comments setup
into a custom comment app, and I'm wondering if anyone's got any
experience to impart in this regard. I have done cross-app data
migration before, and cocked it up horribly. These are the steps I'm
considering; if anyone
On Mar 28, 2009, at 8:04 PM, Paddy Joy wrote:
>
> I have a form that can be called from multiple places. What's the best
> way to redirect back to the original page after the form has been
> saved.
I think the standard way to do this is to include a hidden form
element (usually called "next")
atically
create url config lines for each model. The code lives in contrib/
admin/sites.py
Is that what you meant?
>
> On Mar 23, 12:13 pm, Eric Abrahamsen wrote:
>> On Mar 23, 2009, at 6:06 PM, Lyubomir Petrov wrote:
>>
>>
>>
>>> Just wondering are
On Mar 23, 2009, at 6:06 PM, Lyubomir Petrov wrote:
>
> Just wondering are there any docs/examples of design pattern with
> django for creating a "create/update" view.
These views are written for you! See the CRUD section of the Generic
Views page:
http://docs.djangoproject.com/en/dev/ref/ge
On Mar 10, 2009, at 12:43 AM, bax...@gretschpages.com wrote:
>
> I'm trying to build a combined feed, and not having much luck. Here's
> what I have:
>
> class CombinedFeed(Feed):
>title = site.name +" combined feed"
>link = "/"
>description = "Latest updates from all "+site.name +"
On Mar 5, 2009, at 11:14 AM, Alex Gaynor wrote:
>
> On 3/4/09, Eric Abrahamsen wrote:
>>
>>
>> On Mar 5, 2009, at 8:05 AM, Romain wrote:
>>
>>>
>>> Hello,
>>>
>>> On the same page I have 2 ModelForm that happen to have an attr
On Mar 5, 2009, at 8:05 AM, Romain wrote:
>
> Hello,
>
> On the same page I have 2 ModelForm that happen to have an attribute
> with the same name. Is it possible to choose the name of the HTML id
> generated by the form without having to change the real name of the
> model attribute?
A simple
On Mar 3, 2009, at 7:52 PM, Alfonso wrote:
>
> Thinking this should be easy but not sure of the correct path to
> success!
>
> Got a simple filter queryset that pulls order products from a db:
>
> order_list = CustomerBasket.objects.all()
> customer = UserProfile.objects.get(user=user).customer
On Feb 26, 2009, at 6:23 PM, marco sedda wrote:
>
> Hi,
> I want to select a "single" field from a table, i've read the
> QuerySet API reference but i can't find anything to solve my query.
>
> Just to explain:
>
> If i've a table like:
>
> User
> first_name = models.CharField(max_length=30)
On Feb 26, 2009, at 4:30 PM, tykun...@gmail.com wrote:
>
> Hi I am trying to pass an HTML table to a template and have it display
>
> Currently I have{{table1}} inside my template to mark the position
> I wish to display the table
>
> In my views.py I havereturn render_to_response('resul
On Feb 19, 2009, at 10:05 PM, Nalini wrote:
>
> While inputting an invalid username and password it should throw an
> alert message saying "invalid user". How to get this in django? Do i
> need to add something in views.py?
It's hard to know exactly what you're doing here, but I'm going to
gu
On Feb 17, 2009, at 5:17 AM, Carmelly wrote:
>
> My situation is this: I want to allow my users to upload multiple
> userpics and then choose between them. So I have a Profile model with
> an ImageField for the userpic. When users upload a file it is
> displayed around the site as usual. When th
On Feb 8, 2009, at 12:15 PM, Shantp wrote:
>
> Hi,
>
> I've got a custom comment form in my template using "get_comment_form"
> and I'd like email to not be required. From some searching I see that
> I need to subclass the CommentForm, but I don't know exactly how to go
> about this. Here's what
On 2月4日, 下午12时03分, Malcolm Tredinnick
wrote:
> On Tue, 2009-02-03 at 19:47 -0800, Eric Abrahamsen wrote:
>
> > On Feb 4, 11:25 am, Malcolm Tredinnick
> > wrote:
> > > On Tue, 2009-02-03 at 19:10 -0800, Eric Abrahamsen wrote:
> > > > Hi there,
>
On Feb 4, 11:25 am, Malcolm Tredinnick
wrote:
> On Tue, 2009-02-03 at 19:10 -0800, Eric Abrahamsen wrote:
> > Hi there,
>
> > I'm unable to do any testing -- my fixtures fail with a "Duplicate
> > Entry" error when loading. From what I've googled
Hi there,
I'm unable to do any testing -- my fixtures fail with a "Duplicate
Entry" error when loading. From what I've googled, this might have
something to do with a mismatch between my model definitions and the
sql table definition. This fails on a model that I've done a lot of
manual sql editi
On Jan 28, 2009, at 1:52 AM, phoebebright wrote:
>
> I have duplicated as best I can the processing for handling variables
> in custom template tags mentioned in an earlier post but it's not
> working for me as I need the value of the variable before I parse it.
> Is there another way of making
per into my urls.py and wrap the
appropriate function there. The syntax for the logging handler is a
bit of a PITA, but that's just how Python logging works...
Hope that helps,
Eric
> On Jan 27, 6:37 pm, Eric Abrahamsen wrote:
>> On Jan 27, 2009, at 9:28 PM, Thomas
On Jan 27, 2009, at 9:28 PM, Thomas Guettler wrote:
>
> Rama schrieb:
>> please look at the below logging.conf file.
>> ...
>> can any one guide me on how to avoid hardcoding of log file path ?
>>
>>
> Hi,
>
> I am not a logging expert, maybe there is a solution, but if you
> do your setup with
On Jan 25, 2009, at 1:54 PM, Theme Park Photo, LLC wrote:
>
> Also from reading the source, I don't see any mechanism by which it
> would pick up form.html from any other than the three directories
> enumerated there. Am I really supposed to edit and setup.py install
> the django framework to ch
Here's one way. There's likely a cleaner option somewhere else:
from django.core.urlresolvers import get_resolver
r = get_resolver('mysite.urls')
for pattern in r._get_url_patterns(): print pattern
That works, at any rate.
Yours,
Eric
On Jan 23, 2009, at 3:55 AM, NoviceSortOf wrote:
>
>
>
On Jan 19, 2009, at 4:17 PM, jazz wrote:
>
> c:\projects\mysite>python manage.py sql polls
> Traceback (most recent call last):
> File "manage.py", line 11, in
>execute_manager(settings)
> File "C:\Python25\Lib\site-packages\django\core\management
> \__init__.py", line 340, in execute_man
There's not really much needed to get captcha or recaptcha working
with django, mostly just a class or two. When I was using recaptcha I
found that this module:
http://code.google.com/p/recaptcha-django/
did most of what I needed. If you're shopping, however, I'd recommend
Akismet (http://ww
On Jan 16, 2009, at 5:10 PM, Gath wrote:
>
> Am building a Q&A page, sort of stackoverflow.com kinda page! Am
> having a bit of a problem trying to render the form. Am pasing 3
> objects to the template that renders the page i.e. Question object,
> Answers related to the question and Answer form
On Jan 15, 2009, at 2:42 AM, Bradley wrote:
>
> I'm new to Django and I'm trying to modify an existing django website
> for a local newspaper. They would like to have a polls on the their
> website. I just used the tutorial from the djangoproject website to
> create the polls module. It works
#x27;,remember_wrapper(comments.post_comment)),
(r'^comments/', include('django.contrib.comments.urls')),
...and more...
)
The views that display comment forms check for this cookie, and use
the information to populate the form. I suppose that could be done as
a context process
I've got a Topic model, which is a bit like a category. Then there are
TopicItem objects, which have a foreign key to a Topic, and a generic
foreign key to anything else in the website, so that I can attach
anything to a particular Topic. In my admin site, a few models have a
generic inlin
On Jan 9, 2009, at 10:19 PM, _Sebastian_ wrote:
>
> Hi all,
>
> I've been following the tutorial
> http://docs.djangoproject.com/en/dev/intro/tutorial01/#playing-with-the-api
> and working on a own test-project as well.
>
> so I tried to adapt from
>
> class Poll(models.Model):
>question =
On Jan 8, 2009, at 8:37 PM, Eki wrote:
>
> Hi guys,
>
> I'm implementing a view which sends a (nightly) status report email.
> The code works mostly fine. I can both receive the email and see the
> result rendered as I query the view. The HTML shown and emailed is
> gotten from the same response
On Jan 7, 2009, at 9:32 PM, dmishe wrote:
>
> Hey.
>
> I have FielField in my model for user to upload ZIP-archives. I want
> to unpack that zip, place some files in some dirs and delete it just
> after user uploaded it in admin.
>
> How can i do this? Model's save won't work because it gets cal
On Jan 6, 2009, at 6:41 AM, Aruna wrote:
>
> I'm trying to redirect a user on their first log in, to a special
> welcome page. Subsequent logins will go to a regular page. Is there a
> way to do that in the templates? Does Django have a way to check if
> it's a users first login?
User instances
On Jan 5, 2009, at 7:47 PM, Donn wrote:
>
> On Monday, 05 January 2009 00:51:03 Donn wrote:
>> I am stuck on the interface between a PIL Image and a
>> FilesystemStorage 'content' object.
>>
>> I can: img = Image.open(content)
>> But how do I pass 'img' back to Django for saving?
>
> I have some
On Jan 5, 2009, at 6:51 AM, Donn wrote:
>
> Hi,
> I am stuck on the interface between a PIL Image and a
> FilesystemStorage 'content' object.
>
> I can: img = Image.open(content)
> But how do I pass 'img' back to Django for saving?
>
> My short class is pasted at end. The problem reported stems
On Jan 5, 2009, at 6:51 AM, Donn wrote:
>
> Hi,
> I am stuck on the interface between a PIL Image and a
> FilesystemStorage 'content' object.
>
> I can: img = Image.open(content)
> But how do I pass 'img' back to Django for saving?
>
> My short class is pasted at end. The problem reported stems
DDLEWARE_CLASSES =
("django.contrib.sessions.middleware.SessionMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.doc.XViewMiddleware")
Give that a shot.
Eric
>
r.is_staff
>
> Exception Type: AttributeError at /admin/
> Exception Value: 'WSGIRequest' object has no attribute 'user'
> +++
>
> I'm new to Django and I'm reading "The Definitive Guide to Django"
> which seems to me too out dated...
ry posting the full traceback, and if that
doesn't jog my memory we'll just see if someone else can jump in...
E
> On Jan 4, 1:06 pm, Eric Abrahamsen wrote:
>> On Jan 4, 2009, at 4:58 PM, HB wrote:
>>
>>
>>
>>
>>
>>> Hey,
>&g
On Jan 4, 2009, at 4:58 PM, HB wrote:
>
> Hey,
> I'm trying to create Admin application for my Django project, here are
> some snippets:
> +++
> from django.contrib import admin
> admin.autodiscover()
>
> urlpatterns = patterns('',
> (r'^admin/(.*)', admin.site.root),
> )
>
> INSTALLED_APPS = (
Hi there,
I'm adding a "remember me" checkbox to comment forms, so that regular
commenters can avoid having to enter their personal information, if
they want. I was originally thinking of making this a function
attached to the comment_was_posted signal, but it will have to be
implemented
On Dec 26, 2008, at 10:56 AM, s4shre...@gmail.com wrote:
>
> Hi Guys,
> I am new to Django . My Django form HTML is rendered as TEXT . It
> does not display the HTML as such.
Are you maybe getting autoescaped?
http://docs.djangoproject.com/en/dev/topics/templates/#id2
Eric
>
>
> Please assi
On Dec 17, 2008, at 3:23 PM, oops wrote:
>
> def OrderPlacedView(request):
>form = OrderPlaceForm()
>try:
>print "try"
>print request.POST
>#brand = BrandName.objects.get(pk=request.POST['brand'])
>except:
>print"nothing"
>return render_to_resp
On Dec 10, 2008, at 1:30 AM, DULMANDAKH Sukhbaatar wrote:
>
>> File
>> "/usr/local/python2.5/lib/python2.5/site-packages/
>> MySQL_python-1.2.2-py2.5-linux-i686.egg/MySQLdb/__init__.py",
>> line 74, in Connect
>>
>> File
>> "/usr/local/python2.5/lib/python2.5/site-packages/
>> MySQL_python-1
On Dec 7, 2008, at 11:44 AM, Malcolm Tredinnick wrote:
>
>
> On Sun, 2008-12-07 at 14:42 +1100, Malcolm Tredinnick wrote:
> [...]
>
>> So have a look at the result of something like "curl -I http://...
>> " (or
>> equivalent tool if you don't have curl around). Basically, force a
>> HEAD
>> re
I've got a model with a URLField, with verify_exists set to True,
which has suddenly started barfing "broken link" on a certain URL. I'm
quite sure the URL exists, and can't figure out why it can't get past
validation. This is the link:
http://www.rochester.edu/College/translation/threeperc
On Dec 6, 2008, at 8:31 AM, Alfredo Alessandrini wrote:
>
> Hi,
>
> I've this variable in my template: {{ challenger.rating }}
>
> It'a a number...
>
> Can I calculate a sum like this:
>
> {{ challenger.rating }} + 200 ??
>
> I must write a custom tag?
There's already a filter for that:
http
On Dec 2, 2008, at 5:50 PM, Vicky wrote:
>
> I did as you said. Still its giving the same error :(
Do you have the correct permissions on the TEMPLATE_DIRS directories?
Have you written the paths with forward slashes? That's all I can
think of.
E
>
>
>
> On Dec 2, 11:38 am, Malcolm Tredin
On Dec 2, 2008, at 5:50 PM, Vicky wrote:
>
> I did as you said. Still its giving the same error :(
Are you using forward slashes instead of backslashes? The docs
indicate that's necessary...
>
>
>
>
>
> On Dec 2, 11:38 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
> wrote:
>> On Mon, 2008-12-0
1 - 100 of 252 matches
Mail list logo