Again, Model and ModelForm validation

2013-01-25 Thread Fabio Natali
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

Model and ModelForm validation

2013-01-25 Thread Fabio Natali
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

Re: Admin, m2m relationship and custom save method: is save_related of any help?

2012-11-11 Thread Fabio Natali
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

Admin, m2m relationship and custom save method: is save_related of any help?

2012-11-02 Thread Fabio Natali
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

Custom template tag for django-voting

2012-03-27 Thread Fabio Natali
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,

Re: Comments form customization

2012-02-13 Thread Fabio Natali
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

Re: Comments form customization

2012-02-13 Thread Fabio Natali
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

Re: Comments form customization

2012-02-13 Thread Fabio Natali
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

Comments form customization

2012-02-13 Thread Fabio Natali
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

Re: Bulk import of data

2011-11-29 Thread Fabio Natali
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

Re: Bulk import of data

2011-11-29 Thread Fabio Natali
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

Re: Bulk import of data

2011-11-29 Thread Fabio Natali
=';') 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

Re: Bulk import of data

2011-11-26 Thread Fabio Natali
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

Re: Bulk import of data

2011-11-25 Thread Fabio Natali
/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

Bulk import of data

2011-11-25 Thread Fabio Natali
;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

Re: Using DSE when a model contains a manytomany field

2011-11-24 Thread Fabio Natali
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"

Using DSE when a model contains a manytomany field

2011-11-24 Thread Fabio Natali
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

Re: Massive import from CSV to Database

2011-11-13 Thread Fabio Natali
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

Re: Massive import from CSV to Database

2011-11-13 Thread Fabio Natali
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

Re: Massive import from CSV to Database

2011-11-13 Thread Fabio Natali
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

Re: Massive import from CSV to Database

2011-11-12 Thread Fabio Natali
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

Massive import from CSV to Database

2011-11-12 Thread Fabio Natali
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

Re: request.method not working as expected

2011-09-21 Thread Fabio Natali
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

Re: request.method not working as expected

2011-09-21 Thread Fabio Natali
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

Re: request.method not working as expected

2011-09-21 Thread Fabio Natali
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

Re: request.method not working as expected

2011-09-21 Thread Fabio Natali
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,

Re: request.method not working as expected

2011-09-20 Thread Fabio Natali
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

Re: request.method not working as expected

2011-09-20 Thread Fabio Natali
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,

Re: request.method not working as expected

2011-09-20 Thread Fabio Natali
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

request.method not working as expected

2011-09-20 Thread Fabio Natali
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

Django-based journal publishing system

2009-12-21 Thread Fabio Natali
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

Re: Django website stats

2009-11-19 Thread Fabio Natali
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: > >

Django website stats

2009-11-18 Thread Fabio Natali
? 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

Re: User field in a model?

2009-05-05 Thread Fabio Natali
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

User field in a model?

2009-05-05 Thread Fabio Natali
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

Re: Django versioning and backup best practice

2009-03-20 Thread Fabio Natali
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

Re: Django versioning and backup best practice

2009-03-20 Thread Fabio Natali
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

Django versioning and backup best practice

2009-03-20 Thread Fabio Natali
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

Re: table display with AJAX

2009-02-06 Thread Fabio Natali
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/

Comma as a decimal separator

2009-01-27 Thread Fabio Natali
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

Re: How to hide/show an admin field when a radio field is selected

2008-12-15 Thread Fabio Natali
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): &

How to hide/show an admin field when a radio field is selected

2008-12-10 Thread Fabio Natali
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

Re: Local flavor and admin (zip-code)

2008-12-02 Thread Fabio Natali
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 --~--~-~--~~~--

Local flavor and admin (zip-code)

2008-12-01 Thread 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 --~--~-~--~~~---~-

Re: Naming a ForeignKey field in the Admin

2008-12-01 Thread 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

Re: Custom column in admin change list table

2008-11-19 Thread Fabio Natali
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

Custom column in admin change list table

2008-11-19 Thread Fabio Natali
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

Re: Items tree in Django

2008-11-17 Thread 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

Re: Items tree in Django

2008-11-17 Thread Fabio Natali
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

Re: Items tree in Django

2008-11-17 Thread Fabio Natali
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.

Items tree in Django

2008-11-17 Thread Fabio Natali
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!

Re: link to other record in admin change list

2008-11-03 Thread Fabio Natali
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

Re: Custom change list and list_display

2008-10-31 Thread Fabio Natali
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

Re: Custom change list and list_display

2008-10-31 Thread Fabio Natali
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

Table width when using list_filter

2008-10-30 Thread Fabio Natali
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

Re: Custom change list and list_display

2008-10-29 Thread Fabio Natali
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

Custom change list and list_display

2008-10-29 Thread Fabio Natali
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

Re: Admin page customization for a single model

2008-10-28 Thread Fabio Natali
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

Admin page customization for a single model

2008-10-28 Thread Fabio Natali
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

Re: Foreign key with tons of items

2008-10-28 Thread Fabio Natali
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

Re: Foreign key with tons of items

2008-10-26 Thread Fabio Natali
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/

Re: Foreign key with tons of items

2008-10-23 Thread Fabio Natali
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

Foreign key with tons of items

2008-10-23 Thread Fabio Natali
...). 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

Re: Blank and null values for a foreign key

2008-10-13 Thread 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

Blank and null values for a foreign key

2008-10-12 Thread Fabio Natali
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 --~--~-~--~~~---~-

Re: Model with a foreign key and a percentage

2008-09-26 Thread 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

Model with a foreign key and a percentage

2008-09-26 Thread Fabio Natali
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

Re: How to access underscore starting attributes in templates

2008-09-04 Thread Fabio Natali
_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.

Re: How to access underscore starting attributes in templates

2008-09-03 Thread Fabio Natali
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 --~--~-~--~~--

How to access underscore starting attributes in templates

2008-09-03 Thread 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

Re: Accessing meta class info from my views.py

2008-09-03 Thread Fabio Natali
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@

Re: Accessing meta class info from my views.py

2008-09-03 Thread Fabio Natali
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"

Re: Accessing meta class info from my views.py

2008-09-03 Thread Fabio Natali
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

Accessing meta class info from my views.py

2008-09-03 Thread Fabio Natali
. -- 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

Re: Models list

2008-09-01 Thread Fabio Natali
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

Models list

2008-09-01 Thread fabio natali
? 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

Admin interface customization: drop down menus with js

2008-08-26 Thread Fabio Natali
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

Re: simple multiplication in models

2008-08-26 Thread Fabio Natali
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

Re: Generic Views and ModelAdmin: too much code?

2008-08-20 Thread fabio natali
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')

Re: Generic Views and ModelAdmin: too much code?

2008-08-20 Thread fabio natali
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

Re: Generic Views and ModelAdmin: too much code?

2008-08-20 Thread fabio natali
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

Re: Generic Views and ModelAdmin: too much code?

2008-08-20 Thread fabio natali
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

Re: Generic Views and ModelAdmin: too much code?

2008-08-18 Thread fabio natali
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