[Trac] The T.E.O site layout & design

14 views
Skip to first unread message

Itamar O

unread,
Jun 26, 2010, 6:16:50 AM6/26/10
to trac-users
Hi all,

I would like to use ideas from the t.e.o site layout & design in our organizational intranet
(something similar to the top navbar, with a "tab" for every division that links to the Trac of that division),
and I am wondering about several things:
- is the design copyrighted? is it licensed BSD, as the software itself?
- how exactly is it implemented? all using site.html and custom css?
  is this site.html available as reference somewhere?
- for each edgewall project, the tab of the project has a different "active" style.
  is it done dynamically? or every project has its own site.html with static "active" tab?

Thanks,
Itamar.

Christian Boos

unread,
Jun 26, 2010, 8:09:06 AM6/26/10
to trac-...@googlegroups.com, Jonas Borgström

I'd have to ask Jonas, but I personally don't see a problem in making
that public. If he agrees (as I believe the whole thing was his work),
I'll make a CookBook page out of that.

-- Christian

anton

unread,
Jun 28, 2010, 5:54:43 AM6/28/10
to trac-...@googlegroups.com
Thanks Christian and Jonas ;-)

I think a lot of people (like me too) like the possibility to
set up a trac "like what I am used to see at t.e.o".

Anton

Itamar O

unread,
Jul 24, 2010, 4:49:12 AM7/24/10
to trac-...@googlegroups.com, Jonas Borgström
On 6/26/10, Christian Boos <cb...@neuf.fr> wrote:
> On 6/26/2010 12:16 PM, Itamar O wrote:
>> Hi all,
>>
>> (snip)

>
> I'd have to ask Jonas, but I personally don't see a problem in making
> that public. If he agrees (as I believe the whole thing was his work),
> I'll make a CookBook page out of that.
>
> -- Christian
>

Any news on this?

Christian Boos

unread,
Jul 24, 2010, 4:59:33 AM7/24/10
to trac-...@googlegroups.com

Thanks for the reminder, I'll start this when time permits and follow-up
here when it's done (in 1-2 weeks from now).

-- Christian

Itamar O

unread,
Aug 27, 2010, 2:29:20 AM8/27/10
to trac-...@googlegroups.com


-- Christian

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-...@googlegroups.com.
To unsubscribe from this group, send email to trac-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


I don't want to be a pain, and I'm sure you're busy with other stuff, but - any news? :-)

Luie Xia

unread,
Aug 27, 2010, 12:45:40 PM8/27/10
to trac-...@googlegroups.com
Hi All,

I would like to understand the TRAC source code. But I found it is very difficult to understand source code structure. For instance, I could not find the main.py code. Does anyone can guide me how to find the main file, and read all source codes from there?

Thanks,
Luie

Matthew Caron

unread,
Aug 27, 2010, 12:56:47 PM8/27/10
to trac-...@googlegroups.com, Luie Xia
On 08/27/2010 12:45 PM, Luie Xia wrote:
> Hi All,
>
> I would like to understand the TRAC source code. But I found it is very
> difficult to understand source code structure. For instance, I could not
> find the main.py code. Does anyone can guide me how to find the main
> file,

(mattc@E2-06L) ~/workspace/code/trac (master)$ find . -name main.py
./trac/web/main.py
./trac/versioncontrol/web_ui/main.py

I'd expect that trac/web/main.py is the one you seek.

> and read all source codes from there?

In the main.py file, I see the following import directives related to trac:

from trac import __version__ as TRAC_VERSION
from trac.config import ExtensionOption, Option, OrderedExtensionsOption
from trac.core import *
from trac.env import open_environment
from trac.perm import PermissionCache, PermissionError, PermissionSystem
from trac.resource import ResourceNotFound
from trac.util import get_lines_from_file, get_last_traceback,
hex_entropy, \
arity
from trac.util.compat import partial, reversed
from trac.util.datefmt import format_datetime, http_date, localtz, timezone
from trac.util.text import exception_to_unicode, shorten_line, to_unicode
from trac.util.translation import _
from trac.web.api import *
from trac.web.chrome import Chrome
from trac.web.clearsilver import HDFWrapper
from trac.web.href import Href
from trac.web.session import Session

So, for example, trac.config.py is in trac/config.py.
--
Matthew Caron
Build Engineer
Sixnet | www.sixnet.com
O +1 518 877 5173 Ext. 138
F +1 518 602 9209
matt....@sixnet.com

Olemis Lang

unread,
Aug 27, 2010, 1:13:20 PM8/27/10
to trac-...@googlegroups.com
On Fri, Aug 27, 2010 at 1:06 PM, Lu, Steven (Steven)
<steve...@alcatel-lucent.com> wrote:
> Matthew,
>
> I read this file and imported files. But I only see class and function define. Not seeing any place called functions. Don't know how the code works.
>

What is it exactly that you wanna know ?

--
Regards,

Olemis.

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:

Lu, Steven (Steven)

unread,
Aug 27, 2010, 1:06:26 PM8/27/10
to trac-...@googlegroups.com
Matthew,

I read this file and imported files. But I only see class and function define. Not seeing any place called functions. Don't know how the code works.

Thanks,
Steven
________________________________________
From: trac-...@googlegroups.com [trac-...@googlegroups.com] On Behalf Of Matthew Caron [Matt....@sixnet.com]
Sent: Friday, August 27, 2010 11:56 AM
To: trac-...@googlegroups.com
Cc: Luie Xia
Subject: Re: [Trac] How to find TRAC source code structure?

--

Lu, Steven (Steven)

unread,
Aug 27, 2010, 2:07:27 PM8/27/10
to trac-...@googlegroups.com
Olemis,

I would like to understand the source code flow, and possibly hack the code a bit when needed in my machine. I am new to Python.

Thanks,
Steven
________________________________________
From: trac-...@googlegroups.com [trac-...@googlegroups.com] On Behalf Of Olemis Lang [ole...@gmail.com]
Sent: Friday, August 27, 2010 12:13 PM
To: trac-...@googlegroups.com


Subject: Re: [Trac] How to find TRAC source code structure?

On Fri, Aug 27, 2010 at 1:06 PM, Lu, Steven (Steven)

--
Regards,

Olemis.

Featured article:

--

Olemis Lang

unread,
Aug 27, 2010, 2:22:16 PM8/27/10
to trac-...@googlegroups.com
On Fri, Aug 27, 2010 at 2:07 PM, Lu, Steven (Steven)
<steve...@alcatel-lucent.com> wrote:
> Olemis,
>

:o)

> I would like to understand the source code flow, and possibly hack the code a bit when needed in my machine.

My recommendation is to learn about how to write plugins . That's the
way you should start subverting the system . If you really wanna learn
Trac internals beware of the fact that there are a lot of things in
there beyond mere web (e.g. Version Control API, MIME subsystem,
Workflow web , templates, filters , ...) . I've been developing Trac
plugins since some years ago and I still don't know how everything
works , I just have a barely minimal understanding of the things I
care about ... Besides plugins add a whole new bunch of functionality
that eventually may be merged with Trac or you might want to try out .

That's why I'd suggest you to start trying to do something concrete
and research how to do it ... eventually you'll learn

;o)

BTW , everything starts with trac.web.main.RequestDispatcher.dispatch
(take a look at the deploy scripts `trac-admin /path/to/env deploy`
;o)

> I am new to Python.

Ok, ask specific questions about something you want to do and somebody
will answer . ;o)

Olemis Lang

unread,
Aug 27, 2010, 2:29:05 PM8/27/10
to trac-...@googlegroups.com
On Fri, Aug 27, 2010 at 2:22 PM, Olemis Lang <ole...@gmail.com> wrote:
> On Fri, Aug 27, 2010 at 2:07 PM, Lu, Steven (Steven)
> <steve...@alcatel-lucent.com> wrote:
>> Olemis,
>>
>
> :o)
>
[...]

>> I would like to understand the source code flow, and possibly hack the code a bit when needed in my machine.
>
> BTW , everything starts with trac.web.main.RequestDispatcher.dispatch
> (take a look at the deploy scripts `trac-admin /path/to/env deploy`
> ;o)
>

Ha! Another important class is trac.web.api.Request. When I started,
it was tricky because of its lazy instantiation mechanism (e.g.
Request.callbacks) for instance , Request.chrome is not defined
anywhere in the source code. Inside
trac.web.main.RequestDispatcher.dispatch you'll be able to see that it
is really «bound» to trac.web.chrome.Chrome.prepare_chrome_data , and
so on ...

Itamar O

unread,
Sep 24, 2010, 10:00:21 AM9/24/10
to trac-...@googlegroups.com
On Fri, Aug 27, 2010 at 8:29 AM, Itamar O <itam...@gmail.com> wrote:
On Sat, Jul 24, 2010 at 11:59 AM, Christian Boos <cb...@neuf.fr> wrote:
On 7/24/2010 10:49 AM, Itamar O wrote:
On 6/26/10, Christian Boos<cb...@neuf.fr>  wrote:
 
On 6/26/2010 12:16 PM, Itamar O wrote:
   
Hi all,

(snip)
     
I'd have to ask Jonas, but I personally don't see a problem in making
that public. If he agrees (as I believe the whole thing was his work),
I'll make a CookBook page out of that.

-- Christian

   
Any news on this?

 

Thanks for the reminder, I'll start this when time permits and follow-up here when it's done (in 1-2 weeks from now).


-- Christian


I don't want to be a pain, and I'm sure you're busy with other stuff, but - any news? :-)

Just wanted to update: http://trac.edgewall.org/wiki/CookBook/TracLayoutRecipe
(See also http://trac.edgewall.org/ticket/9629)
I'd like to thank Remy for releasing the sources needed for the recipe.

- Itamar O.
Reply all
Reply to author
Forward
0 new messages