Re: modelForm has no _default_manager

2011-08-19 Thread Guillaume DE BURE
Thanks, I overlooked the documentation... Will check this!

Guillaume
Le 19 août 2011 14:49, "Daniel Roseman"  a écrit :
> On Friday, 19 August 2011 11:15:53 UTC+1, gdebure wrote:
>>
>> Hi Everyone,
>>
>> I've been discovering Django for a few weeks, and love it so far :)
>> However I am facing an issue with a modelForm. As I couldn't find my
>> answer through googling, I thought you might be able to help...
>>
>> == context ==
>> I have an object (called "Domain") that has an "owner" attribute that
>> links to a user. using guardian (http://packages.python.org/django-
>> guardian/ ), I would like to

>> automatically setup a per object
>> permission on this Domain for its Owner
>>
>> == code ==
>> Please see : http://pastebin.com/4Uf31Q52
>>
>> == error ==
>> Whenever I try to access the update page that should contain the Form,
>> I get the error:
>>
>> type object 'DomainForm' has no attribute '_default_manager'
>>
>> (Full traceback at http://dpaste.com/598065/)
>>
>> Please note that this does not seem to be the same as the
>> "AttributeError: 'str' object has no attribute '_default_manager'" for
>> which I saw many things on google, but that do not seem to apply to my
>> case.
>>
>> Thanks a lot for any guidance you may provide :)
>>
>> Guillaume
>
>
> You've simply put the form class as the `model` parameter in the URLconf.
> You need to use the `form_class` parameter instead.
> --
> DR.
>
> --
> You received this message because you are subscribed to the Google Groups
"Django users" group.
> To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/q-_GkaiJzxAJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
>

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Displaying information as a table?

2011-09-03 Thread Guillaume DE BURE
Le Samedi 3 Septembre 2011 09:02:52 Levi Campbell a écrit :
> In a django template, what's the best way to display information from
> the models as a table? I've had no luck searching the documentation
> and google.
> 
> 

As far as I can tell, there is no way to do it fully automatically, but you can 
use the built-in ListView or DetailView with your own defined 
template. IMHO, this is a good balance between automation and customization.
-- 
Skrooge, a free, Open Source, personal finances software
http://skrooge.org

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Create a modular application

2011-10-12 Thread Guillaume DE BURE
Hi people,

I just started a new open source project aimed at small companies that would 
need a tool to manage its resources 
(http://github.com/myOpenCompany/myOpenCompany not much to see at the 
moment...), and one of the central idea would be modularization: 

For example, we will start with an "employee" and a "hardware" module. The 
hardware module allows tracking the phones and laptops affected to 
employees. In the employee property page, the list of hardware for this 
employee is displayed.

Now, if the company does not need the "hardware" module, the property page 
will of course not contain this information. This is implies some kind of 
dependency between the two modules, and that the "employee" module is somehow 
aware of the information that the "hardware" module can provide.

The application will contain probably many modules (attendance management, 
skills, missions, training...)

Being still quite new to django, I have some very basic questions on this:
* Should each module be a django app ? Or is it something different ?
* Is there already something existing (a third party app ?) to provide this 
kind of mechanism ?
* If not, does anyone has experience implementing such behaviour ?

Thanks in advance for any feedback,

Guillaume
-- 
Skrooge, a free, Open Source, personal finances software
http://skrooge.org

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.