appreciated.
Cheers, Fabio.
--
Fabio Natali
--
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
django-user
t English line (I am not a native speaker)?
Cheers, Fabio.
[0]
https://docs.djangoproject.com/en/1.4/ref/models/instances/#django.db.models.Model.full_clean
--
Fabio Natali
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from
On 02/11/12 08:00, Fabio Natali wrote:
Hi!
Snippet: http://dpaste.com/822354/
In the admin I make use of a tabular inline to possibly create Product
and Component objects at the same time.
[...]
I ended up using signals, which looks like an obvious solution now.
Whenever I save or delete
address this but I can't find no real example of
its use.
Could you help me and tell something more (possibly a real example)
about save_related? Do you think that could solve my problem?
Cheers, Fabio.
PS: would you please CC to my email address? fa...@fnstudio.it
--
Fabio Natali
--
You
the same object and get {'score': 0, 'num_votes': 0}.
I really don't understand where the problem may lay. Any tips appreciated.
Cheers, Fabio.
--
Fabio Natali
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group,
On 02/13/2012 11:12 AM, Fabio Natali wrote:
http://stackoverflow.com/questions/1456267/django-comments-want-to-remove-user-url-not-expand-the-model-how-to/4766543#4766543
This link worked fine for me. :-)
--
Fabio Natali FNstudio
http://fnstudio.it
fabio_natali@skype
--
You received
can have an example.
Cheers, Fabio.
--
Fabio Natali
--
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
django-user
this is the best solution for me. So, those of you
who are listening, if you have any further advice/hint, don't hesitate
to email me! :-)
Cheers, Fabio.
--
Fabio Natali
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this g
Could you give me some hints for such customization?
Thank you very much,
Fabio.
--
Fabio Natali
--
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 gro
d52ad67b29
Dear Anler, thank you for sharing your experience and your code. That's
very kind of you. I'll study it and ask you for questions.
Cheers, Fabio.
--
Fabio Natali
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to th
in future
develpment.
Thank you very much, Fabio.
--
Fabio Natali
--
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
dj
=';')
for ...
...
f.close()
Or you can use the new Python construct "with".
P.
Hey Petr! Thank you so much, I immediately followed your advice. File is
closed at the end of the story.
Cheers, Fabio.
--
Fabio Natali
--
You received this message because you are subscribed to the Goo
On 11/25/2011 05:23 PM, Fabio Natali wrote:
On 11/25/2011 03:12 PM, Tom Evans wrote:
[...]
It's not that tricky, is it?
Read the CSV file, split out the fields.
Get or create the category
Get or create the subcategory
Get or create the product
in code:
import csv
data = csv.reader(open
/csv.html
Hey Tom, that's very kind of you, so helpful and fast!
I'll use that in my real scenario (which is a bit more complicated).
I'll be back here soon, reporting success :-) or asking for more help!
Cheers!
--
Fabio Natali
--
You received this message because you are subscribed
;trousers;levis 501
clothing woman;shirt;nice shirt
[...]
##
I am not sure on which way to go. Do you have any hints or web
references to look at?
Thanks, Fabio.
--
Fabio Natali
--
You received this message because you are subscribed to the Google Groups "Django
users" grou
On 11/24/2011 03:17 PM, Fabio Natali wrote:
Hi everybody.
I want to insert data into my Django db as I read from a CSV file.
Everything was fine with a first model of mine.
##
fields = ("name", "price"
use?
Kind regards, Fabio.
--
Fabio Natali
--
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
django-users+unsubscr...@goog
on the CSV read/write capabilities
that come with Python Standard Library?
Cheers! Fabio.
--
Fabio Natali
--
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 unsubs
On 11/13/2011 08:38 AM, Fabio Natali wrote:
[...]
Here is my try:
###
from django.db import models
from csvImporter.model import CsvModel
class MyCsvModel(CsvModel):
name = models.CharField()
age = models.IntegerField()
length = models.FloatField()
class Meta:
delimiter = ";"
m
would "Just Work (TM)".
According to your and Andre's reply I'll probably have to change my mind
and work out a custom solution with bulkopt.py or something similar.
Thank you very much. Fabio.
--
Fabio Natali
--
You received this message because you are subscribed to the Goo
y_csv_list = MyCsvModel.import_data(data = open("file.csv"))
This is the error I get:
ImproperlyConfigured: No field defined. Should have at least one field
in the model.
What am I doing wrong?
All the best to you and everybody who's listening.
Fabio.
--
Fabio Natali
--
Yo
ny better solution?
Thank you very much, all the best, Fabio.
--
Fabio Natali
--
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 gro
On 09/21/2011 03:32 PM, Fabio Natali wrote:
[...]
Yes, I'll follow Andres Reyes advice and use {% url %} tag. I'm still
having a few problems with it, but it sounds like the way to go.
Ok, it works now. I just had to use the proper syntax! :-)
### urls.py
...
url(r'^add_to_cart
advice and use {% url %} tag. I'm still
having a few problems with it, but it sounds like the way to go.
Thanks! Fabio.
--
Fabio Natali FNstudio
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to dj
On 09/21/2011 09:39 AM, Babatunde Akinyanmi wrote:
What's in your add_to_cart view function?
Hi Babatunde,
at the moment, the add_to_cart view is just printing the POST data on
the screen.
Cheers, Fabio.
--
Fabio Natali FNstudio
http://fnstudio.it
fabio_natali@skype
--
You received
redirected to my main page with no error whatsoever.
### urls.py
(r'^add_to_cart/$', add_to_cart)
Any tips?
Thanks and greetings, Fabio.
--
Fabio Natali FNstudio
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group,
may
forget the trailing slash again in the future and that will mean the
break of everything... Is there any best practice for this?
Thanks! Greetings, Fabio.
--
Fabio Natali FNstudio
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To
pe)
Dear Babatunde, I had already tried that with no luck, that didn't work.
Thank you very much for your suggestion and your kind reply.
--
Fabio Natali FNstudio
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group,
On 09/20/2011 05:53 PM, DrBloodmoney wrote:
On Tue, Sep 20, 2011 at 11:46 AM, Fabio Natali<fa...@fnstudio.it> wrote:
Hi everybody!
I have a very simple view which is supposed to print out GET or POST,
depending which has been used to send data. The problem is I always get
"GET
rls.py:
(r'^method/$', method)
### php script to send data to the Django page:
http://192.168.0.2:8000/method/;>
I am running Django version 1.2.5, development server.
Am I missing something? Any hint?
Thanks, Fabio.
--
Fabio Natali FNstudio
--
You received this message because you a
lexibility in the
future.
So, do you know of any Django project to do this?
---
Thanks and regards,
Fabio.
[0] http://pkp.sfu.ca/?q=ojs
--
Fabio Natali
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
Martin Lundberg wrote:
> I am very new to Django but can't this be handled by middleware
> instead? It should have access to user and page data should it not?
>
> -Martin
>
> On Thursday, November 19, 2009, Fabio Natali
> <nat...@poisson.phc.unipi.it> wrote:
> >
? Should I extend my db with a new model
(e.g. "access", with fields: user, page, date)?
Is there any "right" way to do this?
Thanks and regards,
--
Fabio Natali
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
Gabriel wrote:
[...]
> Fabio Natali escribió:
> > I wish I could keep track of the user who added each recipe. Am I
> > supposed to add a "user" (or say "cook") field to my recipe model? Or
> > can I rather get that information from the auth application f
t;) field to my recipe model? Or
can I rather get that information from the auth application for free?
Best regards,
--
Fabio Natali
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To pos
rience, I
appreciate that.
> salutti
Saluti anche a te,
Fabio.
--
Fabio Natali
--~--~-~--~~~---~--~~
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
Suppose I decide to use Postgres instead of Sqlite, do you have any
tips on how to perform a backup of my data? Should I go for a psql
dump?
Thank you very much,
--
Fabio Natali
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goo
a Django
one, I apologize and won't push it any further.
Thank you very much,
Fabio.
--
Fabio Natali
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
Before I go and
> implement this myself, anyone have any suggestions on already made
> solutions? Thanks.
Are you sure you need AJAX as you state in your mail subject? I guess
some js will do the trick.
I got nice results with tablesorter [0].
Cheers,
Fabio.
[0] http://tablesorter.com/docs/
t;)
class ProductAdmin(admin.ModelAdmin):
list_display = ('name','value')
admin.site.register(Product, ProductAdmin)
###
Thanks for your help,
cheers,
Fabio.
[0] http://www.djangosnippets.org/snippets/643/
--
Fabio Natali
--~--~-~--~~~---~--~~
You received th
Fabio Natali wrote:
[...]
> Dear all,
>
> say I have a model "boat" with a radio field which let me choose
> between "sailing boat" and "motor boat".
>
> ##
>
> class Boat(models.Model):
&
ll the js
Any help is really appreciated.
Cheers,
--
Fabio Natali
--~--~-~--~~~---~--~~
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
or/it/forms.py",
line 18, in __init__
max_length=None, min_length=None, *args, **kwargs)
TypeError: __init__() got multiple values for keyword argument 'max_length'
Do I miss anything? Any other tips?
Thanks again, Fabio.
--
Fabio Natali
--~--~-~--~~~--
ect has no attribute 'ITZipCodeField'
Anyone who can kindly shed a bit of light on this? Or give me some
tips on the best way to get some zip-code field inside my model? I'll
provided more log/context if needed.
Bye and thanks, Fabio.
--
Fabio Natali
--~--~-~--~~~---~-
The Agregator wrote:
[...]
> CustomerID = models.ForeignKey(Customer)
> The problem is that I want it to say something else, like "Customer
> Name"
Try with
CustomerID = models.ForeignKey(Customer, verbose_name="Customer Name&q
returning link.
Thank you so much for your priceless help. I had it done in a few
minutes thanks to your hint.
All the best,
--
Fabio Natali
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gro
table, that is for each instance of my model.
(I will use that link to print a pdf report of that specific instance
of my model. Do you think there are better or more canonical ways to
achieve this?)
Any hints/urls on how to start are appreciated.
Cheers,
--
Fabio Natali
tabo
Thanks and regards, Fabio.
--
Fabio Natali
--~--~-~--~~~---~--~~
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
nd I am not 100% sure I got your
line. When you say "a simple nested hierarchy like this", do you refer
to my naive adjacency list implementation?
> Regards,
> Malcolm
Thanks and regards,
--
Fabio Natali
--~--~-~--~~~---~--~~
You received th
e some benchmarks as
you suggest.
All the best, Fabio.
--
Fabio Natali
--~--~-~--~~~---~--~~
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.
ForeignKey('self', blank=True, null=True)
And then consider the "null-parented" node as the root one?
Does my code make any sense? Do you think it will turn out as too slow
for my hierarchy? Should I better rely on django-treebeard or
django-mptt?
Any help appreciated, thank you so much!
om/en/dev/ref/contrib/admin/#list-display
Hth,
--
Fabio Natali
--~--~-~--~~~---~--~~
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
aren thank you very much for your explanation, this is very kind of
you. I suspected there could be such kind of reason but I didn't
figure it out clearly.
See ya, Fabio.
--
Fabio Natali
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
a big
deal. (But I probably miss some points and misjudge the difficulty of
the matter.)
Thanks again, Fabio.
--
Fabio Natali
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To pos
ng is
more narrow. Obviously, part of the width is taken by the list_filter
window, but the table shrinks down far more.
Is this behaviour normal? Is there any reason for it?
I use trunk django and a cutting edge firefox browser.
Cheers, Fabio.
--
Fa
full of details. Thank you
so much! I'll consider each option you point out and I'll figure out
what's the best for my work.
Thanks again and all the best,
--
Fabio Natali
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gro
this mean that I can
add some callable and then alphabetically order them?
Thank you so much for any tips you'll be able to give.
Fabio.
--
Fabio Natali
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Djan
p, or one model.
No... it was so easy! I can't believe it! :-)
Thank you very much Daniel.
> DR.
Fabio.
--
Fabio Natali
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To po
e best to all of you, Fabio.
[0]
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-vs-replacing-an-admin-template
--
Fabio Natali
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dja
chical menu... something like a first drop down menu
for the category and then a second drop down menu for the real
product, the latter being properly filtered by category.
Could anyone provide some tips on how to get this?
Thank you so much,
--
Fabio
e I am using fom my models.py is this [0].
Hence, my "too-much-populated" drop down menu appears inside an inline
element. Which, I think, makes things even worse.
I really wish someone of you can help me and shed a bit of light on
this.
Cheers, Fabio.
[0] http://dpaste.com/hold/86817/
Fabio Natali wrote:
[...]
> class Prod2(models.Model):
> name = models.CharField(max_length=30)
>
> class Prod1(models.Model):
> name = models.CharField(max_length=30)
> belongs_to = models.ForeignKey(Prod2)
>
> class Prod0(models.Model):
> name = mod
...).
Is there a way to customize the admin page without having to write the
whole page from scratch? Shall I have to add some Javascript?
Any tips will be really appreciated. Links to code, docs and whatever
are welcome.
All the best,
--
Fabio Natali
e best to all of you,
Fabio.
--
Fabio Natali
--~--~-~--~~~---~--~~
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 g
the
case.
Well, I guess I could use a not-existing license number instead of
null. For example 00 instead of NULL. But it seems tricky and
I might need that number in the future.
How can I solve this?
Thanks, Fabio.
--
Fabio Natali
--~--~-~--~~~---~-
bruno desthuilliers scrisse:
[...]
> #
> http://docs.djangoproject.com/en/dev/topics/db/models/#intermediary-manytomany
That seems exactly what I was looking for! I'll use it in my app,
using your code as a starting point.
Thank you very much,
Fabio.
--
Fabio
s for your help,
Fabio.
--
Fabio Natali
--~--~-~--~~~---~--~~
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 th
_meta.verbose_name)
It did the trick! Now everything's fine. And I advanced a small step
into the Python world.
See ya,
--
Fabio Natali
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
endering: unbound method __unicode__() must be
called with Fornitore instance as first argument (got nothing instead)
I put some excerpts in http://dpaste.com/75743/. Can anybody see
what's missing/wrong?
Thanks.
> -Rajesh D
All the best,
Fabio.
--
Fabio Natali
--~--~-~--~~--
models (lot of new code to write?)
Are there any other alternatives? Which is the best bet? Could you
kindly point me out a few urls where I can study those topics?
Thank you very much,
--
Fabio Natali
--~--~-~--~~~---~--~~
You received this message because you
ood explanation! I wouldn't get to it on my own.
All the best,
Fabio.
--
Fabio Natali
--~--~-~--~~~---~--~~
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@
t):
File "", line 1, in
TypeError: '__proxy__' object is not callable
Anyone has any further tips?
Regards, Fabio.
--
Fabio Natali
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
Fabio Natali wrote:
[...]
> This is an excerpt from my models.py:
>
> from django.db import models
> from django.contrib import admin
> from django.utils.translation import ugettext_lazy as _
>
> class Fornitore(models.Model):
> nome = models.CharField(max_le
.
--
Fabio Natali
--~--~-~--~~~---~--~~
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
Fabio Natali wrote:
[...]
> I need a table similar to what you get when entering the admin panel,
> that is a list of all my models inside a certain app.
Hi Fabio!
Following code in your views.py and a for loop in your template will
do the trick:
def index(request):
model
? Is there a
one-line-python-command to get that list in a view and then pass it to
my template?
Thanks! Fabio.
--
Fabio Natali
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
multi level features,
taking advantage of the tree structure itself.
Any tips to get this?
Thank you so much, Fabio.
--
Fabio Natali
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" grou
It's a simple
multiplication, I guess you won't have performance issue for this
change.)
I'd appreciate if anyone can shed some light on this and point out any
drawbacks I can't see.
All the best, Fabio.
--
Fabio Natali
--~--~-~--~~~---~--~~
You received this messa
Ivan Sagalaev wrote:
> fabio natali wrote:
> > For the sake of clarity, my django project is named arteak, the models
> > we are using belong to an app called "management".
>
> Ah! Then there should of course be get_model('management',
> kwargs.pop('model')
teError at /manufacturer
'NoneType' object has no attribute 'objects'
along with this full traceback: http://dpaste.com/72673/.
This is how my urls.py looks like at last: http://dpaste.com/72674/.
For the sake of clarity, my django project is named arteak, the models
we are using belong to an app ca
Hi Ivan!
Ivan Sagalaev wrote:
[...]
> fabio natali wrote:
> > I added the line
> >
> > import arteak.management.models
>
> It's not the same thing :-). This line won't load the name "models" into
> your local environment. If you want import from
Ivan Sagalaev wrote:
[...]
> fabio natali wrote:
> > KeyError at /manufacturer
> > u'manufacturer'
> > when accessing http://localhost:8000/manufacturer
>
> KeyError says that it can't find a key 'manufacturer' in dict
> model_classes. This leads me to thi
cturer'
when accessing http://localhost:8000/manufacturer
(manufacturer being one of my model)
Thank you very much for any further help,
Fabio.
--
fabio natali
http://poisson.phc.unipi.it/~natali
--~--~-~--~~~---~--~~
You received this message because you ar
83 matches
Mail list logo