Re: jquery in included html file

2014-05-05 Thread Andreas Bloch
here is how the files are structured... *base.html* ... {% block nav %}{% endblock %} {% block content %}{% endblock %} *template.html* {% extends "base.html" %} {% block nav %} {% include 'nav.html' %} {% endblock %} *// works* $(fun

jquery in included html file

2014-05-05 Thread Andreas Bloch
How do you access (or include) jquery in a file, which is included? I'm getting a "Uncaught ReferenceError: $ is not defined" when trying to use jquery in the included file... In my template, that extends base.html, I am able to use jquery but not the file I'm including with {% include 'nav.html

Re: select_related reverse?(!)

2014-05-05 Thread Andreas Bloch
thanks for your input fellas, solved my problem. -- 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+unsubscr...@googlegroups.com. To post to this group

select_related reverse?(!)

2014-05-01 Thread Andreas Bloch
Okay, I'm a little confused here about using select_ralated... Can you only run select_related on a table that HAS a foreign key not a table that IS a foreign key? What if I want to go: SELECT * FROM product LEFT JOIN review on product.id = review.product_id LEFT JOIN comments ON product.id =

Re: placing views and models in configuration root

2014-04-29 Thread Andreas Bloch
because they are sites in a bigger django project with multiple apps... -- 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+unsubscr...@googlegroups.com

Re: placing views and models in configuration root

2014-04-28 Thread Andreas Bloch
so what do you when you're making trivial sites, that don't have any database models, like about-page, landing-page and so on? would you make a separate app for those and stuff them all in there or just use templateviews and route them from the configuration root urls.py? -- You received this m

Re: placing views and models in configuration root

2014-04-27 Thread Andreas Bloch
> > lrighty then - I will create an app then... -- 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+unsubscr...@googlegroups.com. To post to this

placing views and models in configuration root

2014-04-27 Thread Andreas Bloch
is it bad practice to create a views.py and models.py file and place it in the configuration root? (the folder that is created when you run "startproject " which contains the settings, urls, and uwsgi file") -- You received this message because you are subscribed to the Google Groups "Django

second level nested inlines not showing in django-nested-inlines

2014-04-16 Thread Andreas Bloch
I'm trying to add a nested admin interface using https://github.com/s-block/django-nested-inline *but the 2nd level is not showing up in the admin*... I have a foreign key relationship between three models: ContractTemplate => ContractClause => ContractSubClauses (i.e. a template can have ma