
from django import template
from settings import JQUERY
import os

register = template.Library()

# returns the url to the jquery version being used
def jquery(parser, token):
  class JqueryNode(template.Node):
    def render(self, context):
      return JQUERY
  
  return JqueryNode()

LIGHTBOX = '''
$(document).ready(function() {
  $("a[rel=^lightbox]").click(function() {
    alert("asdf!")
  });
});
'''

# returns the js required to create a lightbox
def lightbox(parser, token):
  class LightboxNode(template.Node):
    def render(self, context):
      return LIGHTBOX
  return LightboxNode()

register.tag('jquery', jquery)
register.tag('lightbox', lightbox)


from django import template
from settings import JQUERY
import os

register = template.Library()

# returns the url to the jquery version being used
def jquery(parser, token):
  class JqueryNode(template.Node):
    def render(self, context):
      return JQUERY
  
  return JqueryNode()

register.tag('jquery', jquery)

Remove old lightbox starting stuff that never got done
Remove old lightbox starting stuff that never got done
  
  from django import template
  from settings import JQUERY
  import os
  
  register = template.Library()
  
  # returns the url to the jquery version being used
  def jquery(parser, token):
    class JqueryNode(template.Node):
      def render(self, context):
        return JQUERY
    
    return JqueryNode()
  
+ register.tag('jquery', jquery)
- LIGHTBOX = '''
- $(document).ready(function() {
-   $("a[rel=^lightbox]").click(function() {
-     alert("asdf!")
-   });
- });
- '''
  
- # returns the js required to create a lightbox
- def lightbox(parser, token):
-   class LightboxNode(template.Node):
-     def render(self, context):
-       return LIGHTBOX
-   return LightboxNode()
- 
- register.tag('jquery', jquery)
- register.tag('lightbox', lightbox)
- 
Remove old lightbox starting stuff that never got done
## Code Before:

from django import template
from settings import JQUERY
import os

register = template.Library()

# returns the url to the jquery version being used
def jquery(parser, token):
  class JqueryNode(template.Node):
    def render(self, context):
      return JQUERY
  
  return JqueryNode()

LIGHTBOX = '''
$(document).ready(function() {
  $("a[rel=^lightbox]").click(function() {
    alert("asdf!")
  });
});
'''

# returns the js required to create a lightbox
def lightbox(parser, token):
  class LightboxNode(template.Node):
    def render(self, context):
      return LIGHTBOX
  return LightboxNode()

register.tag('jquery', jquery)
register.tag('lightbox', lightbox)

## Instruction:
Remove old lightbox starting stuff that never got done
## Code After:

from django import template
from settings import JQUERY
import os

register = template.Library()

# returns the url to the jquery version being used
def jquery(parser, token):
  class JqueryNode(template.Node):
    def render(self, context):
      return JQUERY
  
  return JqueryNode()

register.tag('jquery', jquery)
