Skip to content

Instantly share code, notes, and snippets.

View chernysh's full-sized avatar

Vadim Chernysh chernysh

View GitHub Profile
## models.py
class Photo(models.Model):
user = models.ForeignKey(User)
image = models.ImageField(upload_to=photo)
text = models.TextField(blank=True, null=True)
date_created = models.DateTimeField(auto_now_add=True)
is_deleted = models.BooleanField(default=False)
objects = PhotoManager()
<html>
<head>
<script src="http://code.jquery.com/jquery-1.4.4.min.js" type="text/javascript"></script>
</head>
<body>
<a href="#" id="#toggle_button">Show/Hide</>
<center>
<table cellpadding='8px' cellspacing='0px' id="users_table">
$(document).ready(function() {
$('#button_or_other_element_id').click(function(){
$('#div_id').toggle();
});
});