We have done this before by creating a second model with a different
fields definition in the Admin class, and then assigning the model to
the same database table by specifying db_table in the Meta class. This
allowed us to specify separate access permissions on each model, even
though both models
URLs should be unambiguous, i.e any logical piece of content should
have one and only one definitive URL, with any alternatives acting as
a permanent redirect.
http://simonwillison.net/2007/Feb/4/urls/
Therefore, rather than configuring urls.py to ignore case, a better
solution would be to use mo
Hi Sean,
Well, the main advantage is that PhotoField has already been written :)
If PhotoField doesn't provide you with what you need, you could easily
modify it, or use it as an example of how to create a custom field.
Also, _post_save() has been deprecated since M-R was merged [1].
Regarding
Hi Sean,
No worries, glad to hear that you find TemplatePages useful :)
To answer your question, you can write a custom inclusion tag to
insert snippets of dynamic content into your templates.
http://www.djangoproject.com/documentation/templates_python/#inclusion-tags
Alternately, you could use
Cool! Glad to have helped.
Cheers,
Bryan
On 8/21/06, Derek Hoy <[EMAIL PROTECTED]> wrote:
> Just put this up on a site I'm moving from static pages to Django, and
> it's just what I needed- I'd been doing something horrible with
> subdomains to get it working, and been thinking of doing somethi
On 8/21/06, Sean Schertell <[EMAIL PROTECTED]> wrote:
> ... I need my client to be able to upload some images in
> the admin section, then have Python do some resizing
> and cropping behind the scenes ...
Take a look at PhotoField. Sounds like it would provide exactly what
you're looking for.
ht
See:
http://groups.google.com/group/django-users/browse_thread/thread/51827a2a40e5262e
Bryan :)
On 8/19/06, Jon Atkinson <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I need to schedule some operations on my database to happen at a
> certain time each day. I'm tackling this by using cron, so ideally I'
This was brought up a couple days ago:
http://groups.google.com/group/django-users/browse_thread/thread/ca7091de1e961dff
On 8/17/06, fyl <[EMAIL PROTECTED]> wrote:
> Just entering data in the admin interface. I want to stuck the current
> user in a field at save time if nothing has been specifie
On 8/14/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
> Heheh. Welcome indeed. 10 helpful answers in under 20 minutes. ;-)
Impressive, but credit should also be given to Google Groups' laggy
updates, resulting in 9 out of 10 helpful answerers (including me)
being totally oblivious to the fact th
Look into Python's urllib and httplib.
http://docs.python.org/lib/lib.html
a wrote:
> /favicon.ico
>
> i want to get the favicon.ico from the URL when a blog is added to the
> aggregator
>
> and then display the image,
> this is the usage scenario
>
> Please let me know how to do this in python
On 8/15/06, Sean Schertell <[EMAIL PROTECTED]> wrote:
> Wow! Ask and ye shall receive!
>
> TemplatePages is *precisely* what I was looking for :-)
>
> I can't wait to get to the office and try it out. Yay!
>
> Sean
Cool. Please let us know how it works out for you.
Bryan :)
--~--~-~--
On 8/15/06, Sean Schertell <[EMAIL PROTECTED]> wrote:
> I'd really like to use Django templates and stay DRY by using the
> same base template for my static pages as I do for any apps in the
> site.
On 8/15/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> ... you just need an easy way to serve
On 8/13/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
> > http://www.verdjn.com/wiki/PhotoField
>
> Beautiful, now it's worth my time ;-)
>
> Seriously, thanks a lot.
> Jay P
You're welcome, Jay!
Please drop us a line and let us know if you have any questions,
comments, or suggestions about the cod
Hi Yun,
Make sure that 'django.contrib.admin' is in INSTALLED_APPS in your
project's settings.py file.
Hope this helps.
Bryan
On 8/14/06, yun <[EMAIL PROTECTED]> wrote:
> I'm currently working through the tutorial using the lastest
> development verison of django, downloaded from subversion.
Hi Gloria,
For the Django development server to be accessible externally, you
must specify the IP address or 0.0.0.0, e.g.
manage.py runserver 0.0.0.0:
Hope this helps.
Bryan
On 8/14/06, Gloria <[EMAIL PROTECTED]> wrote:
> Hi. I am a Python geek who has been in the CherryPy/PythonPaste w
I believe that this is currently not supported in admin.
Some users have worked around this limitation by stashing the User
object in thread local storage.
http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
http://lukeplant.me.uk/blog.php?id=1107301634
Bryan
On 8/14/06, yi huang
Hi Ray,
You can set null=True on your DateField to allow null values in the
database. Foe example:
thedate = models.DateField(null=True, blank=True)
Cheers,
Bryan
On 8/13/06, Rares Vernica <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a DateField with blank=True and after I complete and sub
On 8/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Currently, in the admin interface, the size of a text field is
> defaulted at 50 for char vars and 10 for integer types.
>
> I would like to change this in the model and have it propegate through
> to the admin interface. Is there a way t
Optional parameter for JPEG quality added :)
http://www.verdjn.com/wiki/PhotoField
On 8/12/06, Bryan Chow <[EMAIL PROTECTED]> wrote:
> Hi Jay,
>
> Here's a custom field that automatically resizes the uploaded image
> using PIL. You should be able to modify save_fi
Hi David,
Not sure what you mean by "parent object". If author is a ForeignKey
in your blog_entry model, and author has a field called full_name,
then you should be able to use {{ blog_entry.author.full_name }}.
Otherwise, you could just place author in the context that's passed to
your template
More information please. What steps have you taken to install Django?
Have you read the installation guide? There are some tips for
installing Django on Windows in the comments.
http://www.djangoproject.com/documentation/install/
Bryan
On 8/12/06, Dennis <[EMAIL PROTECTED]> wrote:
> hello to a
Hi Jay,
Here's a custom field that automatically resizes the uploaded image
using PIL. You should be able to modify save_file() to adjust the JPEG
compression level on pil_obj.save()
In fact we might add this as an optional parameter in the next version.
http://www.verdjn.com/wiki/PhotoField
B
+1 for James' excellent tutorial.
Here's the context processor that I use in most of my projects:
http://www.verdjn.com/wiki/Siteroot
http://www.verdjn.com/browser/verdjnlib/context_processors/__init__.py
--~--~-~--~~~---~--~~
You received this message because you
What exactly are you trying to achieve with Strip-o-Gram?
Have you considered using Django's built-in STRIPTAGS or REMOVETAGS
filters instead?
http://www.djangoproject.com/documentation/templates/#removetags
Bryan
On 8/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I though
Hi Olivier,
What is the error message?
You're missing a % in line 9.
Bryan.
On 8/11/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> I just tried two loops "for" imbricated, it does'nt seems to work. It
> gives an error at the second "endfor" when we use "forloop.first"
> between the two.
>
On 8/9/06, a <[EMAIL PROTECTED]> wrote:
> i like the admin interface and want to modify it for my needs, do you
> have pointers on how to go about it
On 8/9/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> apart from cosmetic stuff which is explained in the relevant doc, it
> is easier to roll
Not sure I understand exactly what you're looking for, but have you
looked at the manipulators documentation?
http://www.djangoproject.com/documentation/forms/
Bryan
On 8/8/06, ElGranAzul <[EMAIL PROTECTED]> wrote:
> Hi all...
>
> I'm very newbie to django and python, and i'm testing it.
>
> I
This should get you started. The following styles override your styles
(i.e. you can just paste them at the bottom of your CSS file.)
#allcontent {
width: 780px;
}
#header {
margin: 10px 0;
}
#main {
float: left;
width: 545px;
margin: 0 0 10px 0;
}
#sidebar {
float: right;
width: 170px;
You can import User from django.contrib.auth.models
The save method of the Person class needs to create a User object
programatically, e.g. User.objects.create_user(username, email,
password)
Then you can call super(Person, self).save()
This should give you enough to figure out the rest, but if
1. Override the save() method in your person class to create a user
object if one does not yet exist.
2. Try "True" with a capital T.
3. Should be solved by point 1.
Hope this helps :)
Bryan
--~--~-~--~~~---~--~~
You received this message because you are subsc
Kinda. We have been using a developed-from-scratch mailing list system
using Django. Web management interface plus support for email commands
using procmail into Python scripts. Still a work in progress but it's
in production. Pretty simple stuff.
Bryan
--~--~-~--~~~
Hi Adrian,
Thanks for the reply, and for the suggestion. I've been working with
Ian Clelland, who submitted this patch a few days ago to address the
issue:
http://code.djangoproject.com/ticket/1650
There is definitely lots of interest over here for this functionality
to become part of Django, a
Is there a "correct" way to extend a Django template that doesn't exist
on the filesystem? I couldn't find any mention of this in the
documentation.
I'm creating template objects programmatically, and I want one of these
objects to extend another, just as a template on the filesystem can {%
exten
You can extend the user model in m-r using a ForeignKey with
edit_inline, num_in_admin=1, max_num_in_admin=1, and unique=True. This
is what my dev team uses to add additional fields to users.
Conceptually, a OneToOneField would probably make more sense, but it
seems that OneToOneField is still be
verbose_name is not required. Are you using the latest revision of m-r?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To uns
35 matches
Mail list logo