Templatetags

firm_info.templatetags.firm_info.firm_contact(template_path)[source]

Renders the template which path is provided as param using FirmContact only instance serialized contact data.

  • Usage:

```html {% load firm_info %}

{% firm_contact “path/to/template.html” %} ```

  • Improvement:

Could use a cached template loader instead of loader.get_template()

```python from django.core.cache import cache

template_cache_key = f’firm_contact_template_{template_path}’ template = cache.get(template_cache_key) if template is None:

cache.set(…)

contact_cache_key = f’firm_contact_info’ contact = cache.get(contact_cache_key) if contact is None:

contact = FirmContact.objects.first() cache.set(…)

```

Renders the template which path is provided as param using all social network link objects serialized data related the only FirmContact instance.

Usage: ``` html {% load firm_info %}

{% firm_social_links “path/to/template.html” %} ```

firm_info.templatetags.firm_info.firm_description(template_path)[source]

Renders the template which path is provided as param using FirmContact only instance serialized description data.

Usage: ``` html {% load firm_info %}

{% firm_description “path/to/template.html” %} ```

firm_info.templatetags.firm_info.firm_logos(template_path)[source]

Renders the template which path is provided as param using Firm logos.

Usage: ``` html {% load firm_info %}

{% firm_logos “path/to/template.html” %} ```

firm_info.templatetags.firm_info.firm_social_shares(template_path)[source]

Renders the template which path is provided as param using all social network shares link objects serialized data related the only SocialSharing instance.

Usage: ``` html {% load firm_info %}

{% firm_social_shares “path/to/template.html” %} ```