I have a comments model that is setup to do threaded replies. I am
having trouble figuring out how to display the comments in a threaded
manner, i.e. tree.
My model looks like this:
class Comment(models.Model):
post = models.ForeignKey(Post, null=True, blank=True)
user =
Hi, Community
I'm looking for a hack to change default value of field inherited from
abstract model class. Example:
class StuffBase(models.Model):
access_level = models.IntegerField(default=0)
class Meta:
abstract = True
class StuffA(StuffBase):
data = models.XMLField()
This app worked under 1.1 most recently and works under the dev server
in 1.2.
I got it set up the last way it ran under 1.2 and the the app all
seems to work fine, but the admin won't even come up at all; just
hangs the server.
The apache logs show nothing about the /admin request at all which
This app worked under 1.1 most recently and works under the dev server
in 1.2.
I got it set up the last way it ran under 1.2 and the the app all
seems to work fine, but the admin won't even come up at all; just
hangs the server.
The apache logs show nothing about the /admin request at all which
On Feb 10, 9:14 am, WC wrote:
> According to this bug report, select_related is supposed to return the
> data, but it doesn't. Also, if I can't get the foreign key, is there
> a way around this? All I really need is the id of the foreignKey
> object. Any help would be much
Hi All,
I am looking for a relatively secure way to allow a logged in user
(currently auth via ldap to AD) to use their AD credentials to search
AD.
I have plenty of code for how to search AD but no way that I can see
of running that code as the user.
Any ideas?
--
You received this message
Im not trying to change the verbose name for the model class, but for
individual fields in the model, by the way.
On Mar 1, 2:45 pm, Adam Yee wrote:
> When in doubt, always refer to the docs
> -http://docs.djangoproject.com/en/dev/ref/models/options/
> There may be something
No matter what I do, the verbose name for the fields do not change
what appears on the admin view.
On Mar 1, 2:45 pm, Adam Yee wrote:
> When in doubt, always refer to the docs
> -http://docs.djangoproject.com/en/dev/ref/models/options/
> There may be something small
I don't understand why my template_object_name is empty in a generic
object_list view. I'm trying to grab all the category names and urls
from my Category model but it's turning up empty, at least
{{ category_list|length }} yields 0. I'm trying to add this info to
the sidebar of a generic
Q: How many Django developers does it take to change a light bulb?
A: *NONE.* (There's an application for that that comes standard with any
Django installation.)
--
→ Jonathan Hayward, a Senior Web Developer who cares deeply about usability
→ www.linkedin.com/in/jonathanhayward •
Firstly, sorry for leaving the thread abandoned so long.
On Sat, Feb 27, 2010 at 12:52 AM, James Bennett wrote:
> 2010/2/26 Matías Iturburu :
> > Hi guys, Sorry to bring such an off topic, but I've notice that I'm
> banned
> > on the django irc channel
Hi, I'm trying out python+django 1.1.1 on Windows 7 and I have trouble
getting django-registration working.
After logging in, request.user is AnonymousUser on Windows. And it
works fine when I run it in Linux (request.user ends up as the one I
logged in as).
I use RequestContext. And I start it
Hello,
When working with photo API's such as twitpic, what is the best way of
storing the password?
Since the password needs to be sent in its natural form, hashing is
not an option. I read recently heard that a company was held
accountable (sued) for not encrypting their user's API passwords and
I've been tracking trunk on 1.2 and recently started getting this
error when get_profile() is invoked:
TypeError at /item/9/
object.__new__(ellipsis) is not safe, use ellipsis.__new__()
Request Method: GET
Request URL:http://127.0.0.1:8000/item/9/
Django Version: 1.2 beta 1
Hello there!
>From time to time I meet something like that:
ManyToManyField(blank=True, null=True)
Is there any need to set null argument? I guess it isn't, but I want to be sure.
Thank you.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
In this page:
http://trovascuola.comune.forli.fc.it/
put "saffi" and "48" respectively (as an example).
Click on "Nidi d'infanzia ..."
and then came back with back button of Internet explorer.
It says Page expired also If I put cache private.
Is there a way to avoid this? I need Explorer to
On Feb 26, 2:35 pm, "ge...@aquarianhouse.com"
wrote:
> maybe like this?:
>
> def up(model, **kw):
> m.objects.filter(pk=model.pk).update(**kw)
too kewt. .update only works on a recordset-in-progress, and
so .update saves the record in one line.
But... it can't
> customising templates. I am wondering if there is an easy way to
> spice up certain things, such as tables, in a similar way to the admin
> interface does. Specifically I'd like sortable/filterable columns at
> this time, perhaps with the option to add checkboxes/custom buttons to
> each row
I am relatively new to Django and am comfortable creating views and
customising templates. I am wondering if there is an easy way to
spice up certain things, such as tables, in a similar way to the admin
interface does. Specifically I'd like sortable/filterable columns at
this time, perhaps with
I did the middleware to do this, but I figured that making the admin
encrypted would be a common enough task that it should be a builtin
option in the admin. So anyway, +1 for that.
On Mar 1, 5:21 pm, Malcolm Box wrote:
> You could, but doing it on the front-end webserver
When in doubt, always refer to the docs -
http://docs.djangoproject.com/en/dev/ref/models/options/
There may be something small overlooked.
You shouldn't have to re-sync the database to use verbose_name. It's
just a hook to be used for example, in the model's meta options. Give
us more detail
On Mar 1, 2010, at 11:49 AM, ozgurv wrote:
Didn't anyone experience this problem?
This is universal. You can reduce the overhead somewhat; I have a
couple of blog postings about it:
http://thebuild.com/blog/2009/11/07/django-postgresql-and-transaction-management/
--
--
Didn't anyone experience this problem?
On Mon, Mar 1, 2010 at 4:43 PM, ozgur vatansever wrote:
> Hi,
>
> I have a django-based web application (django 1.1.0) and I encounter
> some db related issues. (i am using python_psycopg2 and PostgreSQL
> 8.4)
>
> Every connection
When I've needed something like this I've used a model field
subclass to customize the formfield() method. I've subclassed
models.ManyToManyField, but I would expect the approach to
work on models.ForeignKey as well. formfield is called to
instantiate a forms field when you instantiate the model
You could do this with some javascript, which might work better in the
following scenario:
If you change the state of Completed between True and False, then
other options will be enabled/disabled for you by the javascript
My "take" on the admin screens is its a facility to fiddle with the
model,
Well, 1.2 is due out any day now... and hopefully you will be able to
upgrade. I am sure that, if the current track record of Django is
anything to go by, the documentation will "meet or exceed" the quality
of the code! That's just one advantage of working with a platform
developed by
On Mon, Mar 1, 2010 at 4:12 AM, Alessandro Ronchi
wrote:
> 2010/2/25 Alessandro Ronchi :
>> I am using Varnish as a frontend proxy for my django apps. I usually
>> disable keepalive on apache, but in this case I've only one client (the
>>
unsubscribe
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit
Thanks for the link, Derek. It's good to know that Django is
integrating more JS into the admin - although I'm using 1.1.1, not
1.2. Hopefully customizing the admin with JQuery will make its way
into the core documentation, as well.
On Mar 1, 12:31 am, derek wrote:
>
Hi, I have added verbose names for each of my field names, with the
purpose of getting a pretty admin display. However, I have reset my
database and the admin still shows the field name only, not the
verbose name. Do I need to do anything else?
--
You received this message because you are
You could, but doing it on the front-end webserver makes more sense.
Malcolm
On Mon, Mar 1, 2010 at 3:02 PM, ozgurv wrote:
> You can write a middleware that redirects users who visit admin
> related pages (starts with /admin maybe) to HTTPS.
>
> On Mon, Mar 1, 2010 at 2:08
You can write a middleware that redirects users who visit admin
related pages (starts with /admin maybe) to HTTPS.
On Mon, Mar 1, 2010 at 2:08 AM, Janusz Harkot wrote:
> no, but you can do this very easy on the fronted-webserver (nginx,
> apache, cherokee etc.)
>
> J.
>
I'm using Django 1.1.1 and have accomplished this using jQuery.
Here's a simplified version of what I write to override the admin
change_form template for the targeted app. I put this at //templates/admin///change_form.html:
{% extends "admin/change_form.html" %}
{% block extrahead %}{{
Hi,
I have a django-based web application (django 1.1.0) and I encounter
some db related issues. (i am using python_psycopg2 and PostgreSQL
8.4)
Every connection psycopg2 establishes, it performs the following
statements:
Feb 27 04:02:04 gallus postgres[28534]: [6756-1]
Il giorno lun, 01/03/2010 alle 09.21 -0500, Shawn Milochik ha scritto:
> I highly recommend "The Definitive Guide," second edition. Then you'll know
> 1.1, and then learning the new stuff in 1.2 will be easy enough from the
> online docs.
>
> The transition from 1.1 to 1.2, although it adds new
Hi.
I have a situation very similar to the following;
[code]
class chars(models.Model):
name=moels.CharField('Name',max_length=32)
associated_id=models.IntegerField('Associated',blank=False,null=False)
associated_id.default=0
class ctor(models.Model):
hi malcolm,
now i'm trying that but i get the error :
"int() argument must be a string or a number, not 'QueryDict'"
why?
Hi,
this is my model
class CampaignFile(models.Model):
chance = models.DecimalField(null=True, blank=True, default=1.0,
decimal_places=2, max_digits=3,
I highly recommend "The Definitive Guide," second edition. Then you'll know
1.1, and then learning the new stuff in 1.2 will be easy enough from the online
docs.
The transition from 1.1 to 1.2, although it adds new functionality, doesn't
change enough to require you to re-learn everything.
Hello.
Someone know if any publisher is planning a django book updated to 1.2?
Or someone can suggest how to print the online doc without too much
trouble.
I'm in difficult at reading on my monitor, I prefer a printed copy
Max-B
--
You received this message because you are subscribed to
link to the Google jQuery instead of a local file (it's really fast
too)
http://google.com/jsapi" />