mousadialo / django-profile

Automatically exported from code.google.com/p/django-profile
BSD 2-Clause "Simplified" License
2 stars 0 forks source link

conflicts of base.html in templates #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In the userprofile/templates directory, most of the templates html extends from 
base.html or base_2col.html (which in turn extends base.html)

E.g.
./profile/public.html:{% extends "base.html" %}
./account/password_expired.html:{% extends "base.html" %}
./account/logout.html:{% extends "base.html" %}

Unfortunately a barebone skeleton base.html doesn't quite work. E.g. you can 
see demo/templates/base.html which do include a few userprofile specific css 
files for the templates to work properly. 

Would it be better if we use userprofile_base.html which extends base.html and 
have all the userprofile specific things in there? Similiar argument applies to 
userprofile_base_2col.html.

Thanks
-Aaron

Original issue reported on code.google.com by waifun...@gmail.com on 10 Nov 2008 at 8:57

GoogleCodeExporter commented 8 years ago
Just to add to the proposal of having a "namespace" for userprofile. It may 
also be good to have the 
html to reference the css files with userprofile after {{ MEDIA_URL }}.

E.g.
<link rel="stylesheet" href="{{ 
MEDIA_URL}}userprofile/css/blueprint/screen.css" type="text/css" 
media="screen, projection" />
<link rel="stylesheet" href="{{ MEDIA_URL 
}}userprofile/css/blueprint/print.css" type="text/css" 
media="print" />
<link rel="stylesheet" href="{{ MEDIA_URL 
}}userprofile/css/blueprint/plugins/fancy-type/screen.css" 
type="text/css" media="screen, projection" />

Thanks
-Aaron

Original comment by waifun...@gmail.com on 10 Nov 2008 at 9:32

GoogleCodeExporter commented 8 years ago
Great proposals. I'm going to incorporate them to the trunk.

Original comment by david.ru...@gmail.com on 11 Nov 2008 at 4:22

GoogleCodeExporter commented 8 years ago
Thanks David, I thought about the template extension filename issue and seems 
better 
to be consistent with the media resources. i.e. have 

templates/userprofile/base.html and
media/userprofile/...

and use {% extends "userprofile/base.html" %}

The userprofile_base_2col.html I mentioned earilier was just long and 
unnecessary.
-Aaron

Original comment by waifun...@gmail.com on 11 Nov 2008 at 4:51

GoogleCodeExporter commented 8 years ago
Aaron, I like your solution a lot, everything gets simpler. I have implemented 
it on
the trunk.

I keeped the Blueprint CSS Framework && jquery on the main base.html template,
because these are no django-profile specific utilities.

Thanks for the report. Tell me what you think about it, or any ideas you have.

Original comment by david.ru...@gmail.com on 14 Nov 2008 at 7:45

GoogleCodeExporter commented 8 years ago
Excellent! I have another suggestion for the male.png & female.png in django-
profile.css, can we change it to:

a.male {
  background: url(/media/userprofile/images/male.png) no-repeat #E6E6E6;
}

a.female {
  background: url(/media/userprofile/images/female.png) no-repeat #E6E6E6;
}

For consistency with your new structure? Thanks again!
-Aaron

Original comment by waifun...@gmail.com on 14 Nov 2008 at 4:17

GoogleCodeExporter commented 8 years ago
Totally right! Changed on the SVN trunk.

Original comment by david.ru...@gmail.com on 14 Nov 2008 at 5:53

GoogleCodeExporter commented 8 years ago
it seems like the new "userprofile_foo" block names are a real step back. is 
that
change part of this issue?

Original comment by ericd...@gmail.com on 17 Nov 2008 at 4:50

GoogleCodeExporter commented 8 years ago
Hi Eric,

yes, the motivation of this change is to avoid a conflict between userprofile 
and the  
base template of a project. The "{% block content %}" was very generic, so it 
could 
conflict with the main base template if it will use the same naming convention.

I tought it was the best solution, but I can be wrong. Do you think there's 
another 
solution for this issue?

Original comment by david.ru...@gmail.com on 17 Nov 2008 at 8:22