How to find a view in a complex web application

68 views
Skip to first unread message

guettli

unread,
Apr 28, 2015, 5:27:47 AM4/28/15
to django...@googlegroups.com
We have a complex intranet application.

It has many view.

The problem: How to find the view a user wants to use?

A huge sitemap HTML does not help.

Is there a way to search the matching view?

Maybe even with auto complete?


aRkadeFR

unread,
Apr 28, 2015, 5:46:42 AM4/28/15
to django...@googlegroups.com
I dont quite get your request.

Where is your starting point to search the user view?
When you say "a user wants to use", where does it
come from? A template view? A view_name maybe?
A URL?
--
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b933d0e6-dcb4-4be2-90c3-aeb943924cdd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Derek

unread,
Apr 28, 2015, 10:04:35 AM4/28/15
to django...@googlegroups.com
A quick "brain storm"...

One idea could be to keep all the metadata for your views - their full name; abbreviated name; aliases (alternate names); URL; keywords; and categories etc. in a single table.  You could then use this table to generate *multiple* possible ways for a user to "find" the view they need.

For example - you could present a list of categories (and sub-categories, and sub-sub-categories) which could be presented in a expandable list (jQuery-style).

You could create a tag-cloud and allow a user to 'expand' a single tag into related-views.

You could allow a user to create their own tags for searching and display (in a many-to-many table linked to user).

You could allow a user to "favourite" some of the views and allow the user to easily see (list/sort/search) those.

And, of course, a simple search button could be created to allow an 'incremental' display (auto-complete Google-style) of all possible matches from all fields in your table...

I am sure there are other ways you could think of to generate navigation options, including fancy graphic ones!

You would have to 'admin' this table of course, but the data in it could be changed dynamically (e.g. adding more categories and aliases) without affecting the logic of your app.

[Hey - this could even make a cool app on its own!]

Hope these ideas help....  my project is a just a boring menu-driven one.

Derek

Andrew Farrell

unread,
Apr 28, 2015, 10:49:18 AM4/28/15
to django...@googlegroups.com
If you are asking this question as a developer who wants to know what view to use to affect a page when you know the url, I recommend you install The Silver Searcher, which lets you run 

$ ag 'some arbitrary text you might find on a page'

and it will quickly show you every place that text occurs in the entire directory tree where you run the command. This will show you what template is being rendered. Then, you can take the name of that template and do something like.

$ ag 'orders/unfulfilled.html'

and you will see which view is rendering that template.

--
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 http://groups.google.com/group/django-users.

guettli

unread,
Apr 30, 2015, 7:24:44 AM4/30/15
to django...@googlegroups.com


Am Dienstag, 28. April 2015 16:49:18 UTC+2 schrieb Andrew Farrell:
If you are asking this question as a developer who wants to know what view to use to affect a page when you know the url, I recommend you install The Silver Searcher, which lets you run 

$ ag 'some arbitrary text you might find on a page'

and it will quickly show you every place that text occurs in the entire directory tree where you run the command. This will show you what template is being rendered. Then, you can take the name of that template and do something like.

$ ag 'orders/unfulfilled.html'

and you will see which view is rendering that template.



No, I was looking at my pages through the glasses of a user.

For search in code I use pyCharm.

guettli

unread,
Apr 30, 2015, 7:26:25 AM4/30/15
to django...@googlegroups.com
Hi Derek,

yes, your idea looks good.

Next question would be: How to lay out the database structure (models)?

Regards,
  Thomas

Derek

unread,
Apr 30, 2015, 12:29:30 PM4/30/15
to django...@googlegroups.com
Hi Thomas

I do not I understand your question; I made a suggestion previously for what fields you might need in this 'metadata' model, and you can add or change as needed.  I do not know what your project looks like, so I cannot comment on what the rest of your database should contain.

Derek

guettli

unread,
May 4, 2015, 3:42:42 AM5/4/15
to django...@googlegroups.com
Hi Derek,

yes, your previous answer already contained information what the database schema could be.

This schema is not related to my application at all. At least I think so. This would be generic and reusable.

I think there is a better solution than starting plumbing this for myself.

Maybe it is better if we would use one of the many navigation apps for our project.

https://www.djangopackages.com/grids/g/navigation/

Maybe one of those already stores the relevant data in the database ....

I will post here, if I found a solution.

Regards,
  Thomas Güttler
Reply all
Reply to author
Forward
0 new messages