plugin visibile in admin, not in front end

2015-02-21 Thread gg4u


Hello!

I purchased the provision of a cms, developers chose django.

But they delivered a quite buggy cms, without any comments/documentation in 
the code, and unfortunately deny assistance for 'being busy with bigger 
clients'.

I spent several days solving issues here and there, but the last is 
completely odd and got me stuck.

I have two plugins (a carousel and a footer): if I am logged in as admin, I 
can update them and see changes; once I log off, I don't see changes 
anymore - The plugins are missing from the public frontend.


Could you please shed some light on the possible issue?

- What could you suggest to debug the problem?

- How could I debug which placeholders and which plugins are being included 
in the index.html template?

As I said once I am logged in as admin, page index.html renders the 
plugins, once I am logged out it does not.

- How could I debug (breakpoints?) and see which content is pulled in into 
the { % block content %endblock } ?

- is there any python expert (in the neighborhood of italy?) willing to 
give support?

Thank you so much.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8aa78046-b348-4061-bbe5-5bc6f4472fb0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


nginx configuration to cache all endpoints but one

2016-09-23 Thread gg4u
Hello,

I want to cache all api endpoints except of one: /api/search endpoint.
Do I need to specify settings for each of the endpoints?

My configuration use nginx as server on port 8000 and port 80 as virtual 
proxy server.
Please not I removed settings not related to question to minify the post!

server {
listen 8000 default_server;

# Set Cache for my Json api
# I want to cache everything but /api/search endpoint
location ~* \.(?:json)$ {
 expires 1M;
 access_log off;
 add_header Cache-Control "public";
}

   
location /api {
include uwsgi_params;
uwsgi_pass unix:/var/www/awesome3-gamma/app.sock;
allow [MY DNS];
deny all;
}
}



# Set cache dir
proxy_cache_path /tmp/nginx levels=1:2 keys_zone=my_zone:10m inactive=60m;
proxy_cache_key "$scheme$request_method$host$request_uri";

# Virtualhost/server configuration
server {
listen   80  default_server;

# here I cache /api
# how to avoid caching /api/search ?

location /api {
add_header X-Proxy-Cache $upstream_cache_status;
proxy_cache my_zone;
proxy_cache_use_stale updating;
proxy_cache_lock on;
proxy_cache_valid 30d;
proxy_ignore_headers X-Accel-Expires Expires Cache-Control;
  proxy_pass [my site route api]
}
}


I am looking at:
http://stackoverflow.com/questions/29466494/nginx-turn-off-cache-for-a-specific-file
http://stackoverflow.com/questions/29466494/nginx-turn-off-cache-for-a-specific-file

tried with following block on server listening on port 8000

location /api/search {
expires off;
}


but got error 500.

Must it go before /api location, afterwards, or it does not matter the 
order?
Any idea of what I am missing ?

I would like to avoid specify same settings for all API endpoints

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2a459135-89fa-45d5-8b4e-79b5377c11a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: nginx configuration to cache all endpoints but one

2016-09-25 Thread gg4u
Hi Hashmi,

thank you for your suggestion.

I tried to set proxy_pass for the location I don't want to cache, but I 
don't see caching working properly on my browser.

Could you give a look?
I will attach a mockup of settings,may you want to comment or edit it there 
so that is more readable to me and also other people?

I want to cache all /api location, except /api/search

In attachment what I tried (I removed from settings things not relevant to 
this).

thank you,
Luigi





Il giorno venerdì 23 settembre 2016 21:45:45 UTC+2, M Hashmi ha scritto:
>
> Create a separate block to exclude certain endpoint above others. 
>
> You can also try following approach.
>
> https://groups.google.com/forum/embed/#!topic/openresty-en/apyaHbqJetU
> Regrads,
> Mudassar
>
> On Fri, Sep 23, 2016 at 12:26 PM, gg4u > 
> wrote:
>
>> Hello,
>>
>> I want to cache all api endpoints except of one: /api/search endpoint.
>> Do I need to specify settings for each of the endpoints?
>>
>> My configuration use nginx as server on port 8000 and port 80 as virtual 
>> proxy server.
>> Please not I removed settings not related to question to minify the post!
>>
>> server {
>> listen 8000 default_server;
>>
>> # Set Cache for my Json api
>> # I want to cache everything but /api/search endpoint
>> location ~* \.(?:json)$ {
>>  expires 1M;
>>  access_log off;
>>  add_header Cache-Control "public";
>> }
>>
>>
>> location /api {
>> include uwsgi_params;
>> uwsgi_pass unix:/var/www/awesome3-gamma/app.sock;
>> allow [MY DNS];
>> deny all;
>> }
>> }
>>
>>
>>
>> # Set cache dir
>> proxy_cache_path /tmp/nginx levels=1:2 keys_zone=my_zone:10m inactive=60m;
>> proxy_cache_key "$scheme$request_method$host$request_uri";
>>
>> # Virtualhost/server configuration
>> server {
>> listen   80  default_server;
>>
>> # here I cache /api
>> # how to avoid caching /api/search ?
>> 
>> location /api {
>> add_header X-Proxy-Cache $upstream_cache_status;
>> proxy_cache my_zone;
>> proxy_cache_use_stale updating;
>> proxy_cache_lock on;
>> proxy_cache_valid 30d;
>> proxy_ignore_headers X-Accel-Expires Expires Cache-Control;
>>   proxy_pass [my site route api]
>> }
>> }
>>
>>
>> I am looking at:
>>
>> http://stackoverflow.com/questions/29466494/nginx-turn-off-cache-for-a-specific-file
>>
>> http://stackoverflow.com/questions/29466494/nginx-turn-off-cache-for-a-specific-file
>>
>> tried with following block on server listening on port 8000
>>
>> location /api/search {
>> expires off;
>> }
>>
>>
>> but got error 500.
>>
>> Must it go before /api location, afterwards, or it does not matter the 
>> order?
>> Any idea of what I am missing ?
>>
>> I would like to avoid specify same settings for all API endpoints
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/2a459135-89fa-45d5-8b4e-79b5377c11a8%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/2a459135-89fa-45d5-8b4e-79b5377c11a8%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d0ec5cdd-7fb0-43e5-aaa6-5922fd266c36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


test-caching
Description: Binary data


Re: nginx configuration to cache all endpoints but one

2016-09-25 Thread gg4u
Hi M :)

thank you for helping out!
Here a .txt version of settings.

For logs, I will send it in PVT!

thank you.

Il giorno domenica 25 settembre 2016 13:40:13 UTC+2, M Hashmi ha scritto:
>
> Send me settings of /etc/nginx/nginx.conf and then 
> /etc/sites-available/app.
> The format of the file is not opening up on my system as I am on windows 
> right now.
>
> Also if you have some logs that would be great. 
> Regards,
> M (call me M)
>
> On Sun, Sep 25, 2016 at 3:50 AM, gg4u > 
> wrote:
>
>> Hi Hashmi,
>>
>> thank you for your suggestion.
>>
>> I tried to set proxy_pass for the location I don't want to cache, but I 
>> don't see caching working properly on my browser.
>>
>> Could you give a look?
>> I will attach a mockup of settings,may you want to comment or edit it 
>> there so that is more readable to me and also other people?
>>
>> I want to cache all /api location, except /api/search
>>
>> In attachment what I tried (I removed from settings things not relevant 
>> to this).
>>
>> thank you,
>> Luigi
>>
>>
>>
>>
>>
>> Il giorno venerdì 23 settembre 2016 21:45:45 UTC+2, M Hashmi ha scritto:
>>>
>>> Create a separate block to exclude certain endpoint above others. 
>>>
>>> You can also try following approach.
>>>
>>> https://groups.google.com/forum/embed/#!topic/openresty-en/apyaHbqJetU
>>> Regrads,
>>> Mudassar
>>>
>>> On Fri, Sep 23, 2016 at 12:26 PM, gg4u  wrote:
>>>
>>>> Hello,
>>>>
>>>> I want to cache all api endpoints except of one: /api/search endpoint.
>>>> Do I need to specify settings for each of the endpoints?
>>>>
>>>> My configuration use nginx as server on port 8000 and port 80 as 
>>>> virtual proxy server.
>>>> Please not I removed settings not related to question to minify the 
>>>> post!
>>>>
>>>> server {
>>>> listen 8000 default_server;
>>>>
>>>> # Set Cache for my Json api
>>>> # I want to cache everything but /api/search endpoint
>>>> location ~* \.(?:json)$ {
>>>>  expires 1M;
>>>>  access_log off;
>>>>  add_header Cache-Control "public";
>>>> }
>>>>
>>>>
>>>> location /api {
>>>> include uwsgi_params;
>>>> uwsgi_pass unix:/var/www/awesome3-gamma/app.sock;
>>>> allow [MY DNS];
>>>> deny all;
>>>> }
>>>> }
>>>>
>>>>
>>>>
>>>> # Set cache dir
>>>> proxy_cache_path /tmp/nginx levels=1:2 keys_zone=my_zone:10m 
>>>> inactive=60m;
>>>> proxy_cache_key "$scheme$request_method$host$request_uri";
>>>>
>>>> # Virtualhost/server configuration
>>>> server {
>>>> listen   80  default_server;
>>>>
>>>> # here I cache /api
>>>> # how to avoid caching /api/search ?
>>>> 
>>>> location /api {
>>>> add_header X-Proxy-Cache $upstream_cache_status;
>>>> proxy_cache my_zone;
>>>> proxy_cache_use_stale updating;
>>>> proxy_cache_lock on;
>>>> proxy_cache_valid 30d;
>>>> proxy_ignore_headers X-Accel-Expires Expires Cache-Control;
>>>>   proxy_pass [my site route api]
>>>> }
>>>> }
>>>>
>>>>
>>>> I am looking at:
>>>>
>>>> http://stackoverflow.com/questions/29466494/nginx-turn-off-cache-for-a-specific-file
>>>>
>>>> http://stackoverflow.com/questions/29466494/nginx-turn-off-cache-for-a-specific-file
>>>>
>>>> tried with following block on server listening on port 8000
>>>>
>>>> location /api/search {
>>>> expires off;
>>>> }
>>>>
>>>>
>>>> but got error 500.
>>>>
>>>> Must it go before /api location, afterwards, or it does not matter the 
>>>> order?
>>>> Any idea of what I am missing ?
>>>>
>>>> I would like to avoid specify same settings for all API endpoints
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Django users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 

Re: nginx configuration to cache all endpoints but one

2016-10-02 Thread gg4u
Hi M,

have you had possibility to take a closer look to setting files and logs?


Il giorno domenica 25 settembre 2016 15:48:57 UTC+2, gg4u ha scritto:
>
> Hi M :)
>
> thank you for helping out!
> Here a .txt version of settings.
>
> For logs, I will send it in PVT!
>
> thank you.
>
> Il giorno domenica 25 settembre 2016 13:40:13 UTC+2, M Hashmi ha scritto:
>>
>> Send me settings of /etc/nginx/nginx.conf and then 
>> /etc/sites-available/app.
>> The format of the file is not opening up on my system as I am on windows 
>> right now.
>>
>> Also if you have some logs that would be great. 
>> Regards,
>> M (call me M)
>>
>> On Sun, Sep 25, 2016 at 3:50 AM, gg4u  wrote:
>>
>>> Hi Hashmi,
>>>
>>> thank you for your suggestion.
>>>
>>> I tried to set proxy_pass for the location I don't want to cache, but I 
>>> don't see caching working properly on my browser.
>>>
>>> Could you give a look?
>>> I will attach a mockup of settings,may you want to comment or edit it 
>>> there so that is more readable to me and also other people?
>>>
>>> I want to cache all /api location, except /api/search
>>>
>>> In attachment what I tried (I removed from settings things not relevant 
>>> to this).
>>>
>>> thank you,
>>> Luigi
>>>
>>>
>>>
>>>
>>>
>>> Il giorno venerdì 23 settembre 2016 21:45:45 UTC+2, M Hashmi ha scritto:
>>>>
>>>> Create a separate block to exclude certain endpoint above others. 
>>>>
>>>> You can also try following approach.
>>>>
>>>> https://groups.google.com/forum/embed/#!topic/openresty-en/apyaHbqJetU
>>>> Regrads,
>>>> Mudassar
>>>>
>>>> On Fri, Sep 23, 2016 at 12:26 PM, gg4u  wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I want to cache all api endpoints except of one: /api/search endpoint.
>>>>> Do I need to specify settings for each of the endpoints?
>>>>>
>>>>> My configuration use nginx as server on port 8000 and port 80 as 
>>>>> virtual proxy server.
>>>>> Please not I removed settings not related to question to minify the 
>>>>> post!
>>>>>
>>>>> server {
>>>>> listen 8000 default_server;
>>>>>
>>>>> # Set Cache for my Json api
>>>>> # I want to cache everything but /api/search endpoint
>>>>> location ~* \.(?:json)$ {
>>>>>  expires 1M;
>>>>>  access_log off;
>>>>>  add_header Cache-Control "public";
>>>>> }
>>>>>
>>>>>
>>>>> location /api {
>>>>> include uwsgi_params;
>>>>> uwsgi_pass unix:/var/www/awesome3-gamma/app.sock;
>>>>> allow [MY DNS];
>>>>> deny all;
>>>>> }
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>> # Set cache dir
>>>>> proxy_cache_path /tmp/nginx levels=1:2 keys_zone=my_zone:10m 
>>>>> inactive=60m;
>>>>> proxy_cache_key "$scheme$request_method$host$request_uri";
>>>>>
>>>>> # Virtualhost/server configuration
>>>>> server {
>>>>> listen   80  default_server;
>>>>>
>>>>> # here I cache /api
>>>>> # how to avoid caching /api/search ?
>>>>> 
>>>>> location /api {
>>>>> add_header X-Proxy-Cache $upstream_cache_status;
>>>>> proxy_cache my_zone;
>>>>> proxy_cache_use_stale updating;
>>>>> proxy_cache_lock on;
>>>>> proxy_cache_valid 30d;
>>>>> proxy_ignore_headers X-Accel-Expires Expires Cache-Control;
>>>>>   proxy_pass [my site route api]
>>>>> }
>>>>> }
>>>>>
>>>>>
>>>>> I am looking at:
>>>>>
>>>>> http://stackoverflow.com/questions/29466494/nginx-turn-off-cache-for-a-specific-file
>>>>>
>>>>> http://stackoverflow.com/questions/29466494/nginx-turn-off-cache-for-a-specific-file
>>>>>
>>>>> tried with following block on server listening on port 8000
>>>>>
>>>>> location /api/search {
>>>>> expires o