class Meta:
model = Example
Does anyone can help me here? Thanks for any reply!
BR enrico
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
@Fred: Thanks a lot, that really helped me!
enrico
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To po
Thinking about this topic more detailed made me realize that I also need to
track the user who performed the insert/change (delete is globally not
permitted) actions. However, that are user names managed via Django ... so
when i use DB triggers I only can track the MySQL user who is used by the
audit trail information or
did you go one of the listed ways? My main aim here again is to be able to
build reasonable audit trail views where a user can see the history of a
record with easy query's behind it.
Thanks for reply,
Enrico
--
You received this message because you are subscrib
Hi Mike,
thanks for that reference, I will take a look.
Enrico
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegrou
efine the audit trail functionalities in the database
models so it is forced on any record manipulation.
I hope I could describe my issues comprehensible and would be very happy to
get some feedback from you guys.
Thanks a lot and best regards,
enrico
--
You received this message because you
used by an overly aggressive spelling corrector on your
> computer.)
> --
> Vernon
>
> On Saturday, October 12, 2013 10:41:11 AM UTC-6, Enrico Battiston wrote:
>>
>> Hi, i'm a first time user and i'm experiencing an error in the first part
>> of the django 1.5 t
Hi, i'm a first time user and i'm experiencing an error in the first part
of the django 1.5 tutorial.
At the "Activating models" paragraph when i execute the command line "*python
manage.py sql polls*" it return me: "ImportError: No module named pools".
Here the section INSTALLED_APPS of setting.
is static checking for templates. I have tried some
> other light IDEs recently (SPE and UliPad were both nice) but neither
> is as smooth and responsive, and had various minor irritants.
If you find something, please let me/us know and/or put on the wiki page
mentioned above. That'd be coo
Works like a charm.
Thanks!
Ciao
Enrico
On Feb 21, 11:06 pm, Michael Elkins wrote:
> On Tue, Feb 21, 2012 at 01:10:28PM -0800, Enrico wrote:
> >But your query counts all the books, even the bad ones. I only need to
> >count the good ones...
>
> >For example, if my books
query for each publisher to count
the number of good books).
Ciao
On Feb 21, 7:50 pm, Michael Elkins wrote:
> On Feb 21, 6:11 am, Enrico wrote:
>
> > This query:
> > Publisher.objects.filter(book__rating__gt=3.0).annotate(num_books=Count('bo
> > ok'))
> >
lts also the Publishers
without good books (num_books = 0).
Ciao
Enrico
PS: Sorry for my horrible english
--
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 unsubscri
ister(User)
admin.site.register(User, MyUserAdmin)
Take a look here for more info:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/
http://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/
Best regards,
Enrico
--
You received this message because you are subscribed to the Google Groups
"Djan
On Thu, Jan 21, 2010 at 4:49 PM, Enrico Sartorello <
enrico.sartore...@gmail.com> wrote:
> You're right, it's the mime escaping!
>
> In order to send emails I simply use:
>
> render_to_string(file)
> send_mail()
>
> How can I send plain text messages w
#x27;s django templates that are doing the escaping? =3D is
> the mime escaping for = - could it be something else in your email
> processing chain that's escaping the sign?
> Malcolm
>
> On 1/21/10, Enrico Sartorello wrote:
> > Hi,
> > i'm using Django template s
aped to '=3D' even if autoescape is off or the
containing string is marked with 'safe' filter.
What's wrong with that?
Please help me because I've lost a lot of time trying to solve this issue!
Thanks in advance :-)
--
Enrico Sartorello
--
You received this mess
Unlike the render_to_response shortcut, generic views only accepts a
single template name, not a list of templates.
These views could be improved by accepting multiple templates and the
compatibility wouldn't be affected.
One reason that this could be useful: having a categorized news
listing tha
If anyone is interested, I've created a script for fabric
autocompletion.
http://github.com/ricobl/dotfiles/blob/master/bin/fab_bash_completion
Extremelly lazy, I know! =)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gro
On Wed, Sep 2, 2009 at 10:25 AM, Matthias Kestenholz wrote:
>
> On Wed, Sep 2, 2009 at 9:15 AM, Enrico
> Sartorello wrote:
> > Up.
> >
>
> Already?
>
>
Yes, cause it seemed to me that a message buried by other 30 messages was
about to be left unanswered :-)
>
Up.
On Tue, Sep 1, 2009 at 11:06 AM, Enrico Sartorello <
enrico.sartore...@gmail.com> wrote:
> Wait a moment: this solution doesn't solve my problem.
> Remember that the form I need has to be used on the admin site, so I can't
> deal with it directly (in fact, I can
009 at 10:48 AM, Enrico Sartorello <
enrico.sartore...@gmail.com> wrote:
> Thank you very much, your solution is simple and efficient :-)
>
>
> On Mon, Aug 31, 2009 at 10:57 PM, Matthias Kestenholz <
> matthias.kestenh...@gmail.com> wrote:
>
>>
>> On
Thank you very much, your solution is simple and efficient :-)
On Mon, Aug 31, 2009 at 10:57 PM, Matthias Kestenholz <
matthias.kestenh...@gmail.com> wrote:
>
> On Fri, Aug 28, 2009 at 10:34 AM, Enrico
> Sartorello wrote:
> > Hi,
> > i'm developing a Dj
Up.
On Fri, Aug 28, 2009 at 10:34 AM, Enrico Sartorello <
enrico.sartore...@gmail.com> wrote:
> Hi,
> i'm developing a Django application where i need to differentiate the
> validation of an admin-site model form between different users: some user
> must respect some
ation
errors.
I've searched on the net but seems i cannot find any solution for that
problem.
Any hints?
Thanks for the attention
--
Enrico Sartorello
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dja
n Aug 12, 3:48 pm, Jarek Zgoda wrote:
> >> Wiadomość napisana w dniu 2009-08-12, o godz. 13:00, przez Enrico
> >> Sartorello:
> >>
> >>> i'm facing a problem developing with Django a Web Application: in
> >>> response to some events (for exa
is
the language to apply for translations.
I've tried to search the web in order to look for a solution but i
wasn't able to find it.
For example, django-multilingual package doesn't affect the way the
translations are made.
Can somebody help me?
Tha
Hi all,
I've released a project on Google Code to create importers for Django
models.
Here is the blog release and the project page:
http://ricobl.wordpress.com/2009/04/21/django-importer-released/
http://code.google.com/p/django-importer/
Any comments are welcome!
Best regards,
E
Very nice Malcolm!
It works like a charm!
I was confused about how to extend an iterator, but I can surely find
my own way from here.
Thanks for the help!
Best regards,
Enrico
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
I would like to track which items are being loaded in a queryset,
without having to loop through the entire list.
I think the best way would be to extend the Queryset object, probably
the "__iter__" or "iterator" methods...
But I don't want to copy-and-paste or mess with the Queryset code too
mu
Hi Mark,
I think you could use the Q object like this:
q_filter = Q()
for category in category_list:
q_filter = q_filter | Q(categories__slug=category.slug)
results = RelatedModel.objects.filter(q_filter)
Best regards,
Enrico
--~--~-~--~~~---~--~~
You
I didn't have time to check your tarball but I have a guess...
Check the HTML source on the browser and look for any empty "src" for
images or "href" for stylesheets.
If you find any, this may be the culprit of the second request, as the
browser tries to load the same view when looking for the i
Maybe this could help:
http://www.djangosnippets.org/snippets/1187/
--~--~-~--~~~---~--~~
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 unsubscri
I knew it! ;)
Tricky!
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PR
ng the embedded images on your page, or any external files
like css, javascript.
Try checking the referring page also...
Best regards,
Enrico
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users&quo
lename[:dot_index] + '_' + filename[dot_index:]
Does this look reasonable?
Regards
Enrico
On Tue, 2007-04-24 at 22:45 +1000, Malcolm Tredinnick wrote:
> On Tue, 2007-04-24 at 21:06 +1200, Enrico de Klerk wrote:
> > Hi there,
> >
> > I've noticed a possible race con
n't this use something like mkstemp that does this
atomically?
Cheers
Enrico de Klerk
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-use
s path is relative
because the Admin app doesn't know where it is installed.
Most people use "/admin", but it could be on any other path.
Best regards,
Enrico
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gr
s, transforming SelectMultiple fields into that cool widget.
I agree with Rob, if you didn't touch the page source, you may be
missing some JS files.
If you read the comments inside the 'SelectFilter2.js' file, you'll
see tha
Hi,
There is a 'YOUR_ADMIN_MEDIA/js/SelectFilter2.js' file, I think this
is the file that does the "magic".
Maybe you can use it as a base for applying the widget on your site.
Best regards,
Enrico
--~--~-~--~~~---~--~~
You received this
Hi!
The widget is almost the same as your "blank listbox" but with a
little Javascript.
Take a look at the admin page source, it may be easy to reuse the
code.
Best regards,
Enrico
--~--~-~--~~~---~--~~
You received this message because you are sub
Can't you just override the 'save' method of your model?
Or maybe use a 'pre_save' or 'post_save' signal.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to d
Hi Jeremy,
I get this almost daily.
The 'application/x-www-form-urlencoded' felt weird for a page that
doesn't have forms.
I'm not worried also, just curious. :)
Thanks.
Enrico
--~--~-~--~~~---~--~~
You received this message because you a
but the post is old and I
couldn't write a reply:
http://groups.google.com/group/django-developers/browse_thread/thread/c433a61a93a6cbfd
Best regards,
Enrico
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"D
ny clues?
Best regards,
Enrico
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send
I've changed my 'admin/base.html' template to show a quick menu of
apps/models.
It's easier to switch between pages without having to go back to the
admin home.
It works on Firefox and maybe on other non-IE browsers, it uses only
CSS but shouldn't be hard to use some Javascript to make it work o
ile__friends=request.user.id)
I hope this helps...
Best regards,
Enrico
--~--~-~--~~~---~--~~
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.c
7;who') and Q(profile__friends=request.user.id) or
Q())
)
Best regards,
Enrico
--~--~-~--~~~---~--~~
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@go
)
My problem is to get my friends and people who added me in the same
listing.
To do this I should be able to somehow use the Q object to build an OR
lookup.
As I said, the relationship isn't symmetrical, so I may not be present
in the friends list of someone in my own list.
Any idea?
Best regar
me_user_id)
But I can't get the list of people I added using a lookup, and I can't
just use the 'friends_set' method because I may need to combine the
two filters.
Anyone can help me?
Best regards,
Enrico
--~--~-~--~~~---~--~~
You receive
Hi Dirk,
I'm the author of that Wiki page, I've put that code on
'/util/'.
You could put somewhere else in your python path if you plan to use it
in more projects.
But Django doesn't look for custom fields anywhere, you'll have to
import in yo
text, and pass it as an argument to the 'decorated' view function.
Best regards.
Enrico
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send e
Hi all,
Seems that Django keeps spreading, there's an article on Sitepoint:
http://www.sitepoint.com/article/build-to-do-list-30-minutes
Very nice.
Best regards.
Enrico
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the G
models of the current app.
Examples:
--> Auth app selected
1: *Auth* | Sites
2: Groups | Users
--> Auth app selected and Users model selected
1: *Auth* | Sites
2: Groups | *Users*
Hope you guys get my point. It would be a great improvement to the
admin interface.
Best regards.
lly, or passing
"is_active=False" to the authenticate method.
In other hand, maybe (note: maybe) this can break projects that don't
check for this flag.
So, I can see two paths:
- change this behaviour;
- make a note in the docs that inactive users can authe
e authenticate method should require
an active user. But it won't hurt to check myself or use the default
AuthenticationForm.
Thanks for the help and for the fixes.
Best regards.
Enrico
--~--~-~--~~~---~--~~
You received this message because you are subsc
description in the docs looks very similar.
Maybe should be clarified that is_staff is only Django admin related,
and is_active is related to the entire Django Auth, not only admin.
Just my thoughts, hope I'm not being picky with this.
Best Regards.
Enrico
--~--~-~--~~---
Sorry guys!
I think this didn't solve the error for me.
I keep getting this error:
Referrer: http://200.139.115.13/media/admin/css/base.css
Requested URL: /error/HTTP_NOT_FOUND.html.var
Someone can help me?
Thanks in advance.
E
.
Just reporting here in case someone gets the same error.
Best regards.
Enrico
--~--~-~--~~~---~--~~
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@g
Hi Waylan,
Thanks for your help, the fog has gone now. :)
Maybe the docs should be a little clearer...
Regards.
Enrico
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
ermissions
- Only super: no login
- Active+staff: login but no default perms
- Active+super: no login
- Staff+super: login but no default perms
- Active+staff+super: ok
And what fields should be checked (True) to a normal site user
(non-admin)?
Sorry about the mess...
Regar
plate engine is used for some
other purpose that requires every byte of the included file it could
become an error.
For that reason I won't open a ticket, but it's nice to have this post
here for people having the same problem in the future.
Best
first (base) template and
removed from the subsequent ones.
That's it.
Regards.
Enrico
--~--~-~--~~~---~--~~
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
Yes, maybe this will be solved when Django becomes fully "unicoded".
Also, it's not a big issue, I can live with that for a while.
Maybe I can fix the data myself before saving the model.
Thanks for the help Ivan.
Best
rhandler, line 33.
The backend tries to execute the update (or insert) SQL, receives a
Database.Warning Exception, and try to execute a 'SHOW WARNINGS', then
raises the above error.
Best Regards
Enrico
--~--~-~--~~~---~--~~
You received this message becaus
st regards.
Enrico
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL
r database) doesn't.
But this shouldn't result in an error. Maybe it should generate an
warning, or automatically crop, the characters...
Best regards.
Enrico
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Group
'%s%s IN (%s)' % (table_prefix,
field_name, ','.join(['%s' for v in value])) ) ) or ''
# ...
Another problem may appear when using 'exclude', if the filter IN
returns an empty string, we can end up with an empty '
Hi Jacob,
I've just updated to revision 3654.
I was trying to populate a context with two different lists of news
entries. The second list shouldn't display entries already shown in the
first, so I used exclude with 'id__in' to separate the results.
Also, I'm using a custom manager to show only
That's it, my first wiki page. :)
http://code.djangoproject.com/wiki/CustomUploadAndFilters/
--~--~-~--~~~---~--~~
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@g
could save a lot of work and avoid errors.
Any thoughts?
Regards.
Enrico
--~--~-~--~~~---~--~~
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@googlegro
I've never edited a wiki, but seems easy, I'll post the code soon.
Regards.
Enrico
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send e
Makes sense. :)
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED
rop images directly from
templates.
The original idea came from *ImageWithThumbnailField, I've recreated as
an exercise and to adapt it to my taste.
* http://trac.studioquattro.biz/djangoutils/wiki/Thumbnail
If someone's insterested, I can share the co
that "load" tags doesn't get inherited.
Regards.
Enrico
--~--~-~--~~~---~--~~
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
Has anyone used jQuery?
http://jquery.com/
Looks very promising. It doesn't have lots of advanced widgets but
seems easy to use and very powerful. Supports xpath and css 3
selectors.
I'm planning to start using it myself.
Regar
Hi all,
I like the idea of a "Change password" view.
It doesn't feel like changing the password by mistake.
But wouldn't hurt to use the "not-empty" approach, what matters is to
have this feature.
Regards.
Enrico
--~--~-~--~~~---~--~-
Thanks Chris.
I was trying to access the _meta in the __init__ method and it didn't
worked because I didn't have an instance.
Then I used a post_init method to set up my custom "upload_to".
Now I don't have to worry about where to put my uploads! That
ield, the path should be:
album/picture/pic/1.jpg
So far, I got the primary key renaming working.
But I couldn't access the app and model names from the field __init__
method.
Does anyone knows how to get the names?
Regards.
Enrico
--~--~-~--~~~---~--~~
Yo
Maybe you can change it with CSS.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email t
That's right!
I found out that myself and posted on "Nesh django utils" a few hours
ago.
Regards.
Enrico
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
loading the app "nesh.thumbnail" in my project
settings and in the template. But still, got the error: "invalid syntax
(thumbnail.py, line 13)".
Where am I wrong?
Regards.
Enrico
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Thanks guys, I'll try it out, it seems very good.
Nebojsa, don't worry about the self promotion, thanks for sharing. :)
Enrico
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gr
Hi,
It worked for linking my models, but the referencing app didn't
appeared on the admin until I used the non-generic way.
Regards.
Enrico
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users&
f).save()
class Admin:
pass
Is there a better way to do it?
How hard would be to create a "custom" ImageField for this?
It could be used in many other models in my project, and could even get
included in the Django package.
Thanks in advance.
Enrico
--~--~-~-
Hi Joshua,
That's exactly what happened to me, maybe we should open a ticket...
Thanks for your workaround, it worked.
I didn't need another field, but it wouldn't hurt to add a description,
then I made it "core" and now it
Admin:
pass
class news_pic(models.Model):
parent = models.ForeignKey(news, edit_inline=models.TABULAR)
pic = models.ImageField(upload_to='news', core=True)
Any ideas?
Regards.
Enrico
--~--~-~--~~~---~--~~
You received this
Better yet, I've just changed the PythonPath for the admin:
PythonPath "['C:/apache2triad/django/projects'] + sys.path"
The rest gets inherited.
Thanks again.
Enrico
--~--~-~--~~~---~--~~
You received this message because
've done this, and now it worked, I just repeated the same config in
the "/" location for the "/admin" location.
Thanks for the help Malcolm.
Regards.
Enrico
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
I'm following the tutorial:
http://www.djangoproject.com/documentation/tutorial2/
And I couldn't get the admin working by just uncommenting the
"Uncomment this for admin:" line.
My project name is "rico", I had to change the url to "rico/admin/"
instead of only "admin/".
This way I can log into
89 matches
Mail list logo