Saturday, January 1, 2011

Re: Help getting started.....I think it is installed correctly

You can put your code anywhere you like although you shouldn't put it
anywhere public.

Just pick a private folder somewhere and let django-admin.py set up the folder.

On 1 January 2011 16:14, Anthony Pearce <codenoob@gmail.com> wrote:
> Quote from "Writing your first Django app, part 1":
>
> From the command line, cd into a directory where you'd like to store
> your code, then run the command django-admin.py startproject mysite.
> This will create a mysite directory in your current directory.
>
> Put your code in some directory outside of the document root, such as /
> home/mycode.
>
>
> OK, please explain where /hom/mycode should be located.  Is it
> directly on the C:, or like I have a www folder for playing with html,
> or within the Python directory somewhere?   Sorry, but I'm looking at
> this again for the first time in over a year, and need a bump start.
>
> --
> 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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: merge 2 views?

On 2 January 2011 00:56, bruno desthuilliers
<bruno.desthuilliers@gmail.com> wrote:
> "simple_tag" is nothing new - it has been here since the 0.96 days
> IIRC.

But only the version in v1.3 has the ability to manipulate the context
object (which is what's needed in the suggested alternative solution),
thanks to the new takes_context parameter.

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: DJANGO BOOTCAMP

I've found many books that demonstrate how Django can be used.
Django 1.0 Web Site Development
Practical Django Projects, Second Edition
and The Definitive Guide to Django: Web Development Done Right, Second
Edition are all pretty nice. I'd recommend checking these out.


On Dec 31 2010, 6:17 am, delegb...@dudupay.com wrote:
> Hi all,
>
> I recently started working on a project which is based on django. I've had reasons to work through the documentation several times to get things done.
> However, each time I check the documentation, I find out there is more to learn hence, my thought.
>
> Is there any or can there be a django clinic for beginners or a bootcamp for beginners where people can go through the process of learning django.
>
> With the little I have seen of the so many that is possible, can there not be such arrangement for beginners like me to tap into. Reading the documentation alone may not help as having a guide.
>
> Regards.
> Sent from my BlackBerry wireless device from MTN

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Help getting started.....I think it is installed correctly

Quote from "Writing your first Django app, part 1":

From the command line, cd into a directory where you'd like to store
your code, then run the command django-admin.py startproject mysite.
This will create a mysite directory in your current directory.

Put your code in some directory outside of the document root, such as /
home/mycode.


OK, please explain where /hom/mycode should be located. Is it
directly on the C:, or like I have a www folder for playing with html,
or within the Python directory somewhere? Sorry, but I'm looking at
this again for the first time in over a year, and need a bump start.

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: merge 2 views?

On 1 jan, 08:01, Sam Lai <samuel....@gmail.com> wrote:
(snip)
> An alternative solution would be to create a template tag

(snip)

> It's a little bit more complicated in code though (made a lot easier
> in Django 1.3 with simple_tag)

"simple_tag" is nothing new - it has been here since the 0.96 days
IIRC.

And FWIW, writing a "full" custom tag is far from difficult (even if
sometimes a bit boring), and it's really something all django coders
should learn.

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: merge 2 views?

Thanks for the solution =)
but on everypage the navigation will be called so there wont be
unneccecary code,
Thanks for the tip though will surely look at it for some other
project

On 1 jan, 08:01, Sam Lai <samuel....@gmail.com> wrote:
> The one downside to this solution is that these variables will fetched
> for every request, even if navigation.html was not included in the
> output template.
>
> An alternative solution would be to create a template tag that fetches
> these variables, and only load and use this template tag in
> navigation.html. That way those variables are only fetched if
> navigation.html is included.
>
> It's a little bit more complicated in code though (made a lot easier
> in Django 1.3 with simple_tag), and might not be worthwhile if you
> aren't doing complicated computations.
>
> http://docs.djangoproject.com/en/dev/howto/custom-template-tags/
>
> On 30 December 2010 05:32, Thom van Ledden <tvled...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Thanks a lot for pointin me in the right direction!
>
> > made a context_processor.py for my navigation, and added it to my
> > settings.py
>
> > from basic.blog.models import Category
> > from common.models import fillNavigationFinishedProjects
> > from common.models import fillNavigationUnfinishedProjects
>
> > def navigation(request):
> >    """
> >    Adds navigation  variables to the context.
>
> >    """
> >    return {
> >    'finishedProjects':fillNavigationFinishedProjects(),
> >    'unfinishedProjects':fillNavigationUnfinishedProjects(),
> >    'blogCategories':Category.objects.all(),
> >    }
>
> > Seems to work perfectly!
> > thanks much!
>
> > On 29 dec, 18:51, Michael <mhall...@gmail.com> wrote:
> >> Look into context processors, that sounds like what you need.
>
> >>http://docs.djangoproject.com/en/dev/ref/templates/api/#subclassing-c...
> >> --
> >> Michael <mhall...@gmail.com>
>
> >> On Wed, 2010-12-29 at 08:51 -0800, Thom van Ledden wrote:
> >> > Hi django developers,
>
> >> > Ive got a seperate navigation.html file which need to be rendered on
> >> > each page, but the page need some vars for that. how can i get those
> >> > vars to be defined just only once?
>
> >> > my idea: the main_page should add the vars for the navigation, and the
> >> > views of the content pages will have their own vars, and those need to
> >> > be merged some how
> >> > some files i uploaded:http://thomvl.pastebin.com/gGjGj4NP
> >> >http://thomvl.pastebin.com/uYUp5iCjhttp://thomvl.pastebin.com/Yv6fPTP7
>
> >> > could anyone point me where i go wrong? (the main_page 's vars are the
> >> > ones i need, aside of title ofcourse)
>
> >> > Thanks in advance
>
> > --
> > 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+unsubscribe@googlegroups.com.
> > For more options, visit this group athttp://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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Unable to see Django Error Pages

Hi Friends,

I have been using Django for quite sometime now. It has been working well for me all this while. 

For the past couple of days am not able to see the Fancy Error Pages of Django. Whenever an error occurs all I see is the name of the error - 'OperationalError', 'SyntaxError' etc on the title bar and an empty page. I have kept the DEBUG mode ON. Am unable to find out the reason for the missing error pages. Would be glad if you guys could help me out.

--
Alagappan


--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.