> When line 7 is uncommented, transaction management is
> enabled, and the view works as I would expect.
So it is, my bad, thank you againg.
You see, it seemed a little weird, that first (with the decorator) we
force transaction to commit manually to 'test' all that would happen
in our view (supp
> When line 7 is uncommented, transaction management is
> enabled, and the view works as I would expect.
So it is, my bad, thank you againg.
You see, it seemed a little weird, that first (with the decorator) we
force transaction to commit manually to use 'test' for all that would
happen in our vi
On Apr 29, 6:10 am, akonsu wrote:
> hello,
>
> in my custom admin class that inherits ModelAdmin i need to set
> ModelAdmin.exclude, ModelAdmin.list_display, etc based on whether the
> logged in user is a superuser or not.
>
> is this possible?
>
> thanks
> konstantin
>
ModelAdmin provides a get_
I found this quite interestine discussion:
http://groups.google.com/group/django-developers/browse_thread/thread/166752daf5c96499/007ff42d83ac60c0
my opinion is close to Russell Keith-Magee opinion there. It looks
like a lot of effort was done just to conform django with small number
of databases.
Here are the models:
class ZoneType(models.Model):
name = models.CharField(max_length=50)
color = models.CharField(max_length=7)
class Meta:
app_label = 'maps'
class Zone(models.Model):
name = models.CharField(max_length=50)
type = models.ForeignKey(ZoneType)
code
You initialize (__init__) your ZoneType model instead of create()'ing. When
you save an initialized it doesn't get an id magically.
I suggest you to use ZoneType.objects.create() whenever possible. But if you
must init your model first; make sure you get() it again to retrieve its id.
Remember
Hello,
I am still a newbie exploring possibilities of Django but you learn
advanced techniques often on really big applications. I have here my two
projects I want to do in Django (1. advanced eshop system and 2.
webhosting management [customer database, invoicing, webhosting settings,
trouble ti
Hello Martin,
Django admin has its limitations and this quote from djangobook.com
http://djangobook.com/en/2.0/chapter06/ will clarify your comment.
"One final point we want to make clear is: the admin site is not an
end-all-be-all. Over the years, we’ve seen it hacked and chopped up to
serve a v
I have been using Django and I like it a lot.
I was wondering what is the best way to distribute my application?
Previously, with Apache tomcat it was very easy to distribute it. I
provided the tomcat server and the war file and everything was done.
Is there a tool or a preferred way to do this?
What do you mean by distributing your app?
getting people to view it?, or having your clients running their own server.
If you want people to view it, you have to deploy a django installation
somewhere with your app.
Else, if you want you clients to have each their own app, theyll have to
have the
On Thu, Apr 29, 2010 at 04:37:09AM -0700, Mag wrote:
> I was wondering what is the best way to distribute my application?
IMHO, the best way is the native way of your target platform. I.e., MSI
for Windows, rpm for RedHat, etc. I'd also bundle dependencies together
with the app.
With kind regards
Hi there,
I was wondering if there is a solution to manage a django deployment with
svn like revision tool.
What I would like to have my main django deployment to be a trunk like
folder.
When I want to test something, or make a new app, I want to make a branch
oid. which should be visible under so
I need to add some custom links to sidebar in admin section.
What's the cleaner way to make that?
I can only override the index.html template?
--
Alessandro Ronchi
http://www.soasi.com
SOASI - Sviluppo Software e Sistemi Open Source
Hobby & Giochi, l'e-commerce del divertimento
http://hobbygio
On Apr 29, 12:47 pm, Martin Tiršel wrote:
> Hello,
>
> I am still a newbie exploring possibilities of Django but you learn
> advanced techniques often on really big applications. I have here my two
> projects I want to do in Django (1. advanced eshop system and 2.
> webhosting management [customer
On Apr 28, 7:45 pm, Peter Landry wrote:
> +1 to this. I had similar requirements, and initially went down the road of
> pickling a queryset. It became clear quickly that (at least in my case) a
> better solution was to have a function that translates a Form instance into
> a Queryset. Then seriali
Hi,
I would like to set some fields to be readonly in the Admin app based
on some logic, and would like to use the new readonly_fields attribute
of ModelAdmin if possible (rather than some other sort of hack).
I'm trying to access readonly_fields, but get the error "'GalleryForm'
object has no at
On Apr 29, 3:43 pm, Nick wrote:
> Hi,
>
> I would like to set some fields to be readonly in the Admin app based
> on some logic, and would like to use the new readonly_fields attribute
> of ModelAdmin if possible (rather than some other sort of hack).
>
> I'm trying to access readonly_fields, but
Description:
django-currencies allows you to define different currencies, and
includes template tags/filters to allow easy conversion between them.
Download: http://pypi.python.org/pypi/django-currencies/0.2.1
Documentation: http://packages.python.org/django-currencies/
Source Code: https://launc
cleaned_data is just a dictionary. Every time you accept a form in order
to do a search, you write code to take the form data from cleaned_data,
plus, perhaps, request.user and/or things you can pull from request.user,
and build a queryset. That code can clearly be refactored into a separate
func
Yes that works, totally missed the get_readonly_fields method -
thanks!
Nick
On Apr 29, 4:40 pm, Daniel Roseman wrote:
> On Apr 29, 3:43 pm, Nick wrote:
>
>
>
>
>
> > Hi,
>
> > I would like to set some fields to be readonly in the Admin app based
> > on some logic, and would like to use the ne
I want to use str(uuid.uuid4()) instead of the name uploaded.
For instance: I have this model:
class foo(models.Model):
pic = ThumbnailField(upload_to='pics', size=(200, 200))
I am uploading hello_world.jpg and I should save these named versions
should be saved for example in:
4ba9b397-da69
Did you try to overwrite the storage?
On Apr 29, 6:16 pm, xRobot wrote:
> I want to use str(uuid.uuid4()) instead of the name uploaded.
>
> For instance: I have this model:
>
> class foo(models.Model):
> pic = ThumbnailField(upload_to='pics', size=(200, 200))
>
> I am uploading hello_world.jp
No I am newbie and I don't know how to overwrite storage... could you
help me ^_^ ?
On 29 Apr, 12:46, "ge...@aquarianhouse.com"
wrote:
> Did you try to overwrite the storage?
>
> On Apr 29, 6:16 pm, xRobot wrote:
>
>
>
>
>
> > I want to use str(uuid.uuid4()) instead of the name uploa
Hi,
Is it possible to refresh changes to apache (webserver) without restart it?
Actually i have multiple databases that i need to change while the webserver
is running. Is it possible?
Or any other way to accomplish this task? i.e. use multiple databases for
django application.
Regards,
Kashif
http://docs.djangoproject.com/en/dev/howto/custom-file-storage/
On Apr 29, 6:48 pm, xRobot wrote:
> No I am newbie and I don't know how to overwrite storage... could you
> help me ^_^ ?
>
>
>
> On 29 Apr, 12:46, "ge...@aquarianhouse.com"
> wrote:
>
>
>
> > Did you try to overwrite the
Sure, with WSGI script reload
On Apr 29, 6:51 pm, Kashif Ali wrote:
> Hi,
>
> Is it possible to refresh changes to apache (webserver) without restart it?
> Actually i have multiple databases that i need to change while the webserver
> is running. Is it possible?
>
> Or any other way to accomplish
thanks but now I prefer to tweak sorl-thumbnail ;)
---
On 29 Apr, 18:51, "ge...@aquarianhouse.com"
wrote:
> http://docs.djangoproject.com/en/dev/howto/custom-file-storage/
>
> On Apr 29, 6:48 pm, xRobot wrote:
>
>
>
>
>
> > No I am newbie and I don't know how to overwrite storage.
Thanks for your response.
One more question: Is it possible with mod_python?. This is because i am
using mod_python currently not WSGI.
On Thu, Apr 29, 2010 at 9:57 PM, ge...@aquarianhouse.com <
ge...@aquarianhouse.com> wrote:
> Sure, with WSGI script reload
>
> On Apr 29, 6:51 pm, Kashif Ali w
Anyone on OSX who has had this same problem? I'm going crazy here. Would
really want it to work since it would make it much easier to use
django-admin.
On Thu, Apr 29, 2010 at 12:01 AM, Martin Lundberg wrote:
> Hello,
>
> I've source the django_bash_completion script but when I try to use it
> b
Hi Continuation,
In Django, at this time, the best you can do is:
class AuctionBid(models.Model):
class
On Apr 29, 12:09 pm, Continuation wrote:
> I'm using MySQL with Django.
>
> MySQL uses clustered index. I have a class AuctionBid for which the
> "natural" PK is (user_id, auction_id).
>
>
In Django, the best current option I know of is:
from django.db import models
class AuctionBid(models.Model):
On Apr 29, 12:09 pm, Continuation wrote:
> I'm using MySQL with Django.
>
> MySQL uses clustered index. I have a class AuctionBid for which the
> "natural" PK is (user_id, auction_id
Hi Continuation,
In Django, at this time, the best you can do is:
class AuctionBid(models.Model):
class Meta:
unique_together = ( ( '
On Apr 29, 12:09 pm, Continuation wrote:
> I'm using MySQL with Django.
>
> MySQL uses clustered index. I have a class AuctionBid for which the
> "n
it should be already switched on
http://www.modpython.org/live/current/doc-html/dir-other-par.html
On Apr 29, 7:14 pm, Kashif Ali wrote:
> Thanks for your response.
>
> One more question: Is it possible with mod_python?. This is because i am
> using mod_python currently not WSGI.
>
> On Thu, Apr
Thank you Georg i am checking into it.
On Thu, Apr 29, 2010 at 11:01 PM, ge...@aquarianhouse.com <
ge...@aquarianhouse.com> wrote:
> it should be already switched on
>
> http://www.modpython.org/live/current/doc-html/dir-other-par.html
>
> On Apr 29, 7:14 pm, Kashif Ali wrote:
> > Thanks for yo
Excellent, I'll give trunk a go. Thanks Ian.
Tim.
Ian wrote:
On Apr 27, 2:36 pm, Tim Sawyer wrote:
Hmm, nearly. That gets around the error, but the return value isn't
populated.
>>> import cx_Oracle
>>> from django.db import connection
>>> cursor = connection.cursor()
>>> lOutput = cur
Buh... took me a while to get around to do it. After first installing
the django trunk it revealed another problem first though. Not sure if
this can be the cause or not?
The problem was django tinymce import error. In django tinymce widgets
line 14 there was
from django.forms.util import sm
Hi everyone,
I am looking for a way to replace the username with the email address
as the unique key for user accounts. Is there a setting in
contrib.auth to allow this? The solutions I've seen so far are hacks,
validating email uniqueness via a form rather than as a model field,
etc. In my mind a
https://code.google.com/p/django-audit/
This is a fairly comprehensive Audit Trail App that uses regular
django models and is not tied to a "NoSQL" solution
Disclaimer:
The nature of Audit requirements makes it impossible for a one size
fits all solution. This solution fits my requirements very w
This was not really a feature request or how its really setup.
But I wanted to know how the community thinks of this kind of development
setup.
I'm looking forward to your responses.
Grtz, Dexter
On Thu, Apr 29, 2010 at 4:10 PM, Dexter wrote:
> Hi there,
>
> I was wondering if there is a solut
django-1.2 will support this.
for now, I think the only way to do this is using some hacks like:
http://www.djangosnippets.org/snippets/74/
On Thu, Apr 29, 2010 at 5:01 PM, Thomas Allen wrote:
> Hi everyone,
>
> I am looking for a way to replace the username with the email address
> as the unique
Hi guys,
I am having trouble getting multiple LIKE statements to work using
cursor.execute(SQL, [params]).
Here is my raw SQL query which I have confirmed is working directly at
the mysql command line:
"SELECT samples.number from samples WHERE samples.description LIKE
samples.description LIKE %
I don't have time to look in detail right now, but if you're using
pages cms, try
putting:
PAGE_SANITIZE_USER_INPUT = False
in your settings.py (after or in place of anywhere you set it True).
The last time
I got this it was due to a bug in the sanitize stuff in that it
converted perfectly
valid
I think that there's an extra "samples.description LIKE" in there (occurs
twice).
But, should you want to do this with the ORM, assuming that samples
is a model (or could be made one, see the legacy database stuff in the
docs), I think that it could be done with Q objects using
description__contai
On Apr 30, 4:01 am, "ge...@aquarianhouse.com"
wrote:
> it should be already switched on
>
> http://www.modpython.org/live/current/doc-html/dir-other-par.html
That has zero effect in the case of Django.
The automatic reloading in mod_python only applies to handler code
files directly under the
On Apr 30, 2:57 am, "ge...@aquarianhouse.com"
wrote:
> Sure, with WSGI script reload
In respect of what? You can't just say WSGI as a generalised concept
in this case, you have to refer to the specific WSGI hosting
mechanism.
Many WSGI hosting mechanisms don't provide a way of doing automatic
Hi,
I'm on OSX (snow leopard) with default shell, python but django 1.2 beta within
a virtual env. Having the django_bash_completion sourced, the django-admin.py
he completes correctly to "help".
Regards,
Xavier.
Le 29 avr. 2010 à 19:41, Martin Lundberg a écrit :
> Anyone on OSX who has had t
I know this is way delayed, but in the hopes it helps someone else out
there... if you have,
SESSION_COOKIE_SECURE = True
then the browser may not be sending the cookie back to your view on an
http (i.e. not https) page. The behavior is as you described. The
admin login complains that the browser
On Fri, Apr 30, 2010 at 5:03 AM, Felippe Bueno wrote:
> django-1.2 will support this.
I'm sorry - what is this based on? There haven't been any substantive
changes to contrib.auth in 1.2. It's not on the official "new
features" list. There have been some discussions about some potential
changes,
On Thu, Apr 29, 2010 at 11:08 PM, Russell Keith-Magee <
freakboy3...@gmail.com> wrote:
> On Fri, Apr 30, 2010 at 5:03 AM, Felippe Bueno
> wrote:
> > django-1.2 will support this.
>
> I'm sorry - what is this based on? There haven't been any substantive
> changes to contrib.auth in 1.2. It's not o
I dont use any cms. I use few third party plugins like django-tinymce,
sorl-thumbnail, django-tagging and django-tagging-autocomplete and
thats it.
I checked how the stuff is stored in the database and its exactly the
same html it prints out on the pages. Letters like äöõü are all ä
ö õ ü in the d
Thanks, at least I know that it should work. Could it be that I don't have
bash-completion installed on osx? I've tried to install it with brew and it
seemed to work but I'm not sure if it is in fact installed and working and
I'm not sure how to test if it is.
-Martin
On Fri, Apr 30, 2010 at 2:39
51 matches
Mail list logo