Hi Adam,

Thank you for your help. 

Yes, we have copied the resource.py file into our app - it is in the same 
directory as forms.py, ../our app/our app/models. However, the settings.py 
file (and compiled version) has been modified slightly differently from 
what you suggest and is located in ...../our app/our app. As I do not know 
python, I do not know if this is effectively the same: 

RESOURCE_MODEL = {'default': 'ead.models.resource.Resource'} where 'ead' is 
our app.  

(In the past we have managed to compile python programs but the technician 
involved cannot now be contacted and I do not know what has changed.)

Thanks, Lucy


On Sunday, November 6, 2016 at 4:29:39 PM UTC+2, Adam Cox wrote:
>
> Hi Lucy, regarding the resource.py file, have you already copied that from 
> Arches-HIP to your app? You must do this if you wish to use your own 
> forms.py file, and you need to update the RESOURCE_MODEL variable in your 
> settings.py file. Mine is set like this:
>
> RESOURCE_MODEL = {'default': 
> '{}.models.resource.Resource'.format(PACKAGE_NAME)}
>
> For example 
> <https://github.com/mradamcox/afrh/blob/master/afrh/settings.py#L36>
>
> Hope that's all you need. In general, you are right to look for a .pyc 
> file as an indication that the .py file is being used.
>
> Adam
>
> On Sun, Nov 6, 2016 at 4:29 AM, 'Lucy FJ' via Arches Project <
> [email protected] <javascript:>> wrote:
>
>> Hi everyone,
>>
>> This is a basic technical question which I am asking as a not 
>> particularly technical person. 
>>
>> We are customising Arches and are changing forms.py because we have added 
>> new nodes to the Heritage Resource graph. 
>> I have copied forms.py from the Arches HIP directory, changed it and put 
>> it into our custom directory. I opened Arches and found that the changes 
>> had not taken effect and noticed that a .pyc file had not been created in 
>> the custom directory. I assume that the .pyc file in the HIP directory is 
>> being read instead? (It is still there). I have tried stopping and 
>> restarting our server and still the .pyc file fails to be created. The file 
>> resource.py has been changed as suggested by the Arches documentation to 
>> pick up the correct version of 'forms' (*from arches_hip.models import 
>> forms *has been changed to *import forms*) and is also located in the 
>> custom directory. What is the mechanism that causes the .pyc file to be 
>> created? I was wondering if it was a permission/ownership problem. All our 
>> Arches programs are owned by Root. is this normal in an Arches 
>> installation? 
>>
>> Thank you very much for your help.
>>
>>
>> -- 
>> -- To post, send email to [email protected] <javascript:>. To 
>> unsubscribe, send email to [email protected] <javascript:>. 
>> For more information, visit 
>> https://groups.google.com/d/forum/archesproject?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Arches Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
-- To post, send email to [email protected]. To unsubscribe, send 
email to [email protected]. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to