Re: Site Architecture

2012-09-07 Thread Jeff Regan
Thanks for the reply.

I wanted to use Django for the templating engine and, in the future, some
of the open source applications (commenting, graphing, and blogs for
example) that were built as Django apps.  Also, I like being able to build
my urls.

After discussing the web architecture with one of the other developers at
my company, we came up with the below.  What do you think?

Database -> Services Project -> Reference to Services Project -> Django
Views -> Django Urls -> HttpPosts to Django with jQuery -> HTML/jQuery

We're debating whether the Django project should talk to the services
project over http requests or by importing the project.  Importing the
project allows us to have secure functionality that we don't have to worry
about exposing to the internet.  Also, it would allow for a faster and more
reliable connection to the backend.  Consuming data over Http requests
gives the web application a similar architecture as the other applications
(phones, outside apps) that do the same.  It also puts the services project
out on it's own island.  It may seem obvious, but the other developer was
in favor of importing the project.  I like to be consistent with the things
I do, and was in favor of accessing resources using Http requests.

Thanks,
Jeff

On Fri, Sep 7, 2012 at 4:34 AM, Babatunde Akinyanmi <tundeba...@gmail.com>wrote:

> I'm hardly a pro but I think the answer to your question will depend
> on why you want to add django to the stack
>
>
> On 9/7/12, Jeff Regan <jeffrega...@gmail.com> wrote:
> > I'm not much of an architect and am pretty new to Django, so I was
> hoping I
> >
> > could get some advice. Currently our site is html/jQuery and all the data
> > is accessed through Javascript calls to rest services.
> > Data -> Rest Services -> HTML/jQuery
> >
> > I was planning on putting a Django layer between the client and the rest
> > services.
> > Data -> Rest Services -> Django -> HTML/jQuery
> >
> > I'd use jQuery to send post requests to Django urls(routed to views).
>  The
> > views would then call the rest layer to retrieve the data, and pass the
> > response to the front end.
> >
> > Does anyone see a problem with this approach?  Is there anything I should
> > be aware of?  Are there other sites that took a similar approach?
> >
> > I appreciate any help.
> >
> > Thanks,
> > Jeff
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msg/django-users/-/Cpw8-j0ZqlEJ.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/django-users?hl=en.
> >
> >
>
> --
> Sent from my mobile device
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: Multiple elements with one element?

2012-09-06 Thread Jeff Regan
You might look into using jQuery to get the results and then post the
results (also using jQuery) to some url.

This approach doesn't really fit the Django pattern, but it should work.

On Thu, Sep 6, 2012 at 9:53 PM, Gchorn  wrote:

> Hi All,
>
> I'm trying to create a form on a web page where the user can select
> choices from multiple drop-down lists ( HTML elements) and then
> submit them all at once with a single submit button.  Is this possible?
>
> I don't want to use a single  element with the "multiple"
> attribute because the list of options may be quite long, and I find it
> quite clunky for the user to have to hold ctrl/command/shift down while
> clicking on multiple options in such a long list (it's easy to accidentally
> release one of the keys and have to start over, etc.).
>
> I've also used this  for
> something similar in the past, but I want to limit the number of selected
> options to only four at once (which is another reason I also don't want to
> use  with "multiple").
>
> So does anyone know how I could make something like the following work,
> both in terms of HTML and views.py (and without JS)?
>
> 
>   
> one
> two
> buckle
> shoe
>   
>   
> three
> four
> shut
> door
>   
>   
> 
>
> I'm guessing that in views.py it would be something like
> request.GET.getlist('q'), but as far as I know you're supposed to give each
>  element a different name, right?
>
> thanks,
> Guillaume
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/dcFM0INbXCAJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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



Site Architecture

2012-09-06 Thread Jeff Regan
I'm not much of an architect and am pretty new to Django, so I was hoping I 
could get some advice. Currently our site is html/jQuery and all the data 
is accessed through Javascript calls to rest services.  
Data -> Rest Services -> HTML/jQuery

I was planning on putting a Django layer between the client and the rest 
services.  
Data -> Rest Services -> Django -> HTML/jQuery

I'd use jQuery to send post requests to Django urls(routed to views).  The 
views would then call the rest layer to retrieve the data, and pass the 
response to the front end.

Does anyone see a problem with this approach?  Is there anything I should 
be aware of?  Are there other sites that took a similar approach? 

I appreciate any help.

Thanks,
Jeff

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Cpw8-j0ZqlEJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.