Using two urls to load the same template

2014-11-13 Thread RLF_UNIQUE
Hello,

I'm having this weird situation where if you go to my website like this
www.mywebsite.com
vs like this
www.mywebsite.com/index.html

I'm getting different values.

*urls.py*
urlpatterns += patterns('',   
  url(r'^index.html$',   views.index,   
name='index'),
  url(r'^$',  views.index,   
name='index'),
)

*view.py*
def index(request):
   home_list = Home.objects.all()[:1]   


 
   context = {'home_list': home_list}
   return render_to_response('index.html', context)

*index.html*
{% extends 'base.html' %}   



  {% block content %}
  test
  {% for home in home_list %}
  {{home.description|safe}}
  {% endfor %}
  {% endblock %}

when I just go to mysite.com, I only get "test", whereas when I go to 
mysite.com/index.html, I get "test" as well as the home variable.

It almost seems like something isn't loading in the proper order?

Thanks
Kyle

-- 
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/4ec40b5b-99a3-43d5-bfd8-d245fb61ccd1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using two urls to load the same template

2014-11-13 Thread RLF_UNIQUE
Did some more testing, seems like it's completely skipping the views.py, 
and going straight to loading index.html, any way to force it to 
dynamically load?

On Thursday, November 13, 2014 9:37:27 PM UTC-6, RLF_UNIQUE wrote:
>
> Hello,
>
> I'm having this weird situation where if you go to my website like this
> www.mywebsite.com
> vs like this
> www.mywebsite.com/index.html
>
> I'm getting different values.
>
> *urls.py*
> urlpatterns += patterns('',   
>   url(r'^index.html$',   views.index,   
> name='index'),
>   url(r'^$',  views.index,   
> name='index'),
> )
>
> *view.py*
> def index(request):
>home_list = Home.objects.all()[:1] 
> 
> 
>
>context = {'home_list': home_list}
>return render_to_response('index.html', context)
>
> *index.html*
> {% extends 'base.html' %} 
> 
> 
>   
>   {% block content %}
>   test
>   {% for home in home_list %}
>   {{home.description|safe}}
>   {% endfor %}
>   {% endblock %}
>
> when I just go to mysite.com, I only get "test", whereas when I go to 
> mysite.com/index.html, I get "test" as well as the home variable.
>
> It almost seems like something isn't loading in the proper order?
>
> Thanks
> Kyle
>

-- 
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/66e05589-6e70-4fea-9060-70dab7f6fefb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using two urls to load the same template

2014-11-13 Thread RLF_UNIQUE
I think I figured it out. I was building "in" satchmo and was previously 
appending my urls to satchmo s, which probably has a catch all handler (r'^$') 
already that was loading it's own view and rendering index.html but was hitting 
my (overridden) template without any context since the views handler was 
different

-- 
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/bbd2356e-ae3d-4ba2-82a9-8877f9625a6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Users can give permissions they don't have.

2014-11-14 Thread RLF_UNIQUE
I want to make a "manager" user, who has a set of permissions (less than 
what I have as admin). I want "manager" to be able to create users, groups, 
permissions, etc, but restrict them to ONLY the permissions they have (if I 
give them permission to add user, they can just give new user all available 
permissions, even ones they don't have). Is there an easy way to do this?

-- 
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/87448e01-9197-44d5-97c6-a1dac68e8a8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Users can give permissions they don't have.

2014-11-15 Thread RLF_UNIQUE
The problem is that's not how it's working. I create a user and they can give 
other users privs that they don't have.

-- 
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/e05dc643-2584-4227-b6c6-b2b98fdca753%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


my mysite/templates/admin/base_site.html is ignored (tutorial unclear?)

2014-11-16 Thread RLF_UNIQUE
Obviously you've restarted the server and refreshed the page in such a way to 
ensure it's not a caching issue ?

-- 
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/2dfc3c89-cf1a-411f-ab0b-c15e7e09d501%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to override satchmo/apps/satchmo_store/contact/forms.py

2015-01-11 Thread RLF_UNIQUE
Can't figure out how to override this file, here is my directory structure

└── store ├── __pycache__ ├── localsite │   └── contact ├── static │   ├── 
admin │   │   ├── css │   │   ├── img │   │   │   └── gis │   │   └── js 
│   │   └── admin │   ├── cache
│   ├── css │   ├── fonts │   ├── images │   └── js └── templates ├── 
contact ├── product └── shop ├── checkout ├── email └── pdf

-- 
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/b40e26f7-3984-4523-8250-2e3fde7eb15b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to override satchmo/apps/satchmo_store/contact/forms.py

2015-01-11 Thread RLF_UNIQUE
└── store
├── __pycache__
├── contact
├── localsite
│   └── contact
├── static
│   ├── admin
│   ├── cache
│   ├── css
│   ├── fonts
│   ├── images
│   └── js
└── templates
├── contact
├── product
└── shop

-- 
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/2c879be1-bdfa-4a27-b8b0-9160f7b8fe29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to override satchmo/apps/satchmo_store/contact/forms.py

2015-01-11 Thread RLF_UNIQUE
Whoops that didn't work

└── store
├── __pycache__
├── localsite
├── static
│   ├── admin
│   ├── cache
│   ├── css
│   ├── fonts
│   ├── images
│   └── js
└── templates
├── contact
├── product
└── shop

-- 
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/7904a0e2-30e3-4422-b594-5c70ee631f7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to hide the "save and add another" button in admin page?

2014-01-18 Thread RLF_UNIQUE
I have been trying all day. What I am doing is trying to have a model for 
an "about" page, which I want to limit to 1 item. It doesn't really make 
sense to have multiple "abouts". I've done everything described here

http://stackoverflow.com/questions/13101281/in-django-admin-how-can-i-hide-save-and-continue-and-save-and-add-another-butto

but can't get it to work, it works if in the ctx update I set 
show_save_and_add_another to false, but then the "save and add another" 
button doesn't show up for any model.

Please help.

-- 
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/1f6e444e-c3f5-4386-ae3c-5b7b8ff2b60d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How to hide the "save and add another" button in admin page?

2014-01-19 Thread RLF_UNIQUE
Ah I see, give a user change permission but not add or remove? Then just use 
superaccount to make initial entry?

-- 
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/f2b936f2-7107-4dad-bd3a-364cae68cb37%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.