That's very strange.  Just to confirm: you copied the
arches_hip/models/resource.py file, pasted it into the corresponding
directory of your own app, and then changed the RESOURCE_MODEL as described
above, correct?  That's all you should need to do...

On Wed, May 4, 2016 at 11:23 AM, <[email protected]> wrote:

> Hi Alexei, I am not using Apache. I edit our app on a Mac Yosemite
> installation with Postgres.app. I should add that other .py files, like
> settings.py, can be modified 'on the fly' and changes are recognised by the
> app. It would appear that resource.py is an exception. I thought it could
> be a Django cache issue, but the MIDDLEWARE parameters in the settings.py
> file of Arches do not seem to include the caching ones, so this also proved
> to be a dead end.
>
> Any other ideas?
>
> Andrea
>
>
> On Wednesday, May 4, 2016 at 6:02:40 PM UTC+1, Alexei Peters wrote:
>>
>> Hi Andrea,
>> If you're using Apache, make sure to restart it after editing any .py
>> file.
>> Cheers,
>> Alexei
>>
>>
>> Director of Web Development - Farallon Geographics, Inc. - 971.227.3173
>>
>> On Wed, May 4, 2016 at 8:54 AM, <[email protected]> wrote:
>>
>>> Thanks Adam, I have tried adding the string below,  - still no *.pyc. I
>>> even tried commenting off the RESOURCE_MODEL in the HIP settings (the
>>> default there is: RESOURCE_MODEL = {'default':
>>> 'arches_hip.models.resource.Resource'}), still nothing. This is what the
>>> top of my settings.py in my app looks like now:
>>>
>>> PACKAGE_ROOT =
>>> os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
>>> PACKAGE_NAME = PACKAGE_ROOT.split(os.sep)[-1]
>>> DATABASES['default']['NAME'] = 'arches_%s' % (PACKAGE_NAME)
>>> DATABASES['default']['POSTGIS_TEMPLATE'] = 'template_postgis'
>>>
>>> ROOT_URLCONF = '%s.urls' % (PACKAGE_NAME)
>>>
>>> INSTALLED_APPS = INSTALLED_APPS + (PACKAGE_NAME,)
>>> STATICFILES_DIRS = (os.path.join(PACKAGE_ROOT, 'media'),) +
>>> STATICFILES_DIRS
>>> TEMPLATE_DIRS = (os.path.join(PACKAGE_ROOT,
>>> 'templates'),os.path.join(PACKAGE_ROOT, 'templatetags')) + TEMPLATE_DIRS
>>>
>>> # Absolute filesystem path to the directory that will hold user-uploaded
>>> files.
>>> MEDIA_ROOT =  os.path.join(PACKAGE_ROOT, 'uploadedfiles')
>>>
>>>
>>> RESOURCE_MODEL = {'default':
>>> '{}.models.resource.Resource'.format(PACKAGE_NAME)}
>>>
>>>
>>> Thanks for your help.
>>>
>>> Andrea
>>>
>>>
>>>
>>> On Wednesday, May 4, 2016 at 3:00:46 PM UTC+1, Adam Cox wrote:
>>>>
>>>> Hi Andrea, you need to explicitly set your resource model in your
>>>> settings.py file. Something like this:
>>>>
>>>> RESOURCE_MODEL = {'default':
>>>> '{}.models.resource.Resource'.format(PACKAGE_NAME)}
>>>>
>>>> Once you run the app, you should see a .pyc file appear next to your
>>>> app's models/resource.py file, meaning that it's now in use.
>>>>
>>>> Adam
>>>>
>>>>
>>>>
>>>> On Wed, May 4, 2016 at 6:53 AM, <[email protected]> wrote:
>>>>
>>>>> Hello All,
>>>>>
>>>>> I am having an issue with modifying resource.py both in my
>>>>> installation of Arches and on the Arches-HIP. I am trying to modify the
>>>>> fields that are mapped as geojson (i.e. the section covered by the
>>>>> function prepare_documents_for_map_index()). However, whenever I modify
>>>>> something within this function, it would appear that Django does not
>>>>> re-read my .py source file. I even tried to delete resource.py and its 
>>>>> .pyc
>>>>> , and did the same with the corresponding files in the HIP. Still nothing.
>>>>> It would seem that the py file is not called. I thought it might be an
>>>>> elasticsearch issue, but then I re-ran it and nothing changed. It would
>>>>> appear that resource.py does not get called, which is strange since I 
>>>>> would
>>>>> have expected prepare_documents_for_map_index() to be called when
>>>>> visualising records with the Location Filter.
>>>>>
>>>>> Please note that I tried to modify static strings such as the default
>>>>> entity_data=_('None specified'), to no avail.
>>>>>
>>>>> Can you help?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Andrea
>>>>>
>>>>> --
>>>>> -- 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.
>>>>>
>>>>
>>>> --
>>> -- 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.
>>>
>>
>> --
> -- 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.
>

-- 
-- 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