Jens Gutermuth
deb04500c5
Only use prefetched thumbnails if there are there
...
The optimization broke image uploading, this fixes it again.
2015-03-23 03:30:13 +01:00
Jens Gutermuth
9d4791b65a
image can be loaded with a join as well (saves another query)
2015-03-23 02:30:54 +01:00
Jens Gutermuth
e4b8769168
DoesNotExist should be ObjectDoesNotExist, oops!
2015-03-23 02:28:21 +01:00
Jens Gutermuth
3bcc6d3152
Loanding pins does no N+1 queries anymore
...
This saves another three queries per pin, bringing to total query count
down to 8.
See issue #85 .
2015-03-23 02:22:35 +01:00
Jens Gutermuth
60cf2dcbd7
Fix three N+1 queries in pin loading
...
Fetch the submitter with a join and get all the images and tags in one
query each. This reduces the total query count for loading 50 pins from
304 to 158.
See issue #85 .
2015-03-23 02:03:31 +01:00
Lapo Luchini
9e901485ee
Allow closing pinry with ESC or clicking on header.
...
On close, remove the script as well as the images.
2015-01-20 10:18:58 +01:00
Lapo Luchini
259d699551
Remove race condition waiting for proper event instead of fixed time.
2014-11-23 20:25:59 +01:00
Razzi Abuissa
7c553e2e52
Remove unused ugettext import
2014-07-28 02:47:25 -04:00
Isaac Bythewood
d6c515ed0a
Merge pull request #62 from tomwys/patch-2
...
Fix url regexp.
2014-07-21 23:54:29 -04:00
Lapo Luchini
e2f61176dd
Properly encode query string parameters.
2014-05-28 16:10:08 +02:00
Lapo Luchini
e1e2c07f2b
getUrlParameter fixes as in http://stackoverflow.com/a/8764051/166524
2014-05-28 16:09:22 +02:00
Lapo Luchini
a2ab9a2b8c
Use .src to get absolute URL as calculated by the browser.
2014-05-28 15:58:00 +02:00
Lapo Luchini
0549bb5113
Use jQuery as soon as it is loaded.
2014-05-28 15:47:55 +02:00
Krzysztof Klimonda
b79e6249ea
Fixed tests not passing on postgresql.
2014-04-03 11:20:33 +02:00
Tomasz Wysocki
bd984f9fd2
Fix url regexp.
...
\d allows numbers from other digit systems, so urls like: http://demo.getpinry.com/१७/ are possible. This could lead to some nasty security issues in the future (ie. if you try to use pin number without using `int(...)`).
2014-04-03 11:12:39 +02:00
Tomasz Wysocki
25c02407ba
"keys" is optional.
2014-04-03 10:09:11 +02:00
Tyler Stalder
c3d998654f
Use jQuery because you're checking for window.jQuery
...
Some sites put jQuery into noConflict mode and don't bind to $. One example is http://shop.timberland.com/ so the pinry bookmarklet would not work. It will throw a 'document does not have a method ready' error. This change just wraps all of the jQuery specific code to use the current jQuery as $.
http://api.jquery.com/jQuery.noConflict/
2013-11-24 17:51:08 -08:00
Isaac Bythewood
8a0b577f16
Fix SITE_URL being used in title when that feature was removed.
2013-09-25 22:45:42 +00:00
Isaac Bythewood
fc39a075e9
Hide passwords from view on forms
2013-09-24 23:58:38 +00:00
Isaac Bythewood
50d61af22a
Move to bootstrap 3, better design, move all vendor items local.
2013-09-24 23:02:00 +00:00
Isaac Bythewood
795a905596
Added Original URL and Pin URL to lightbox of items.
2013-09-24 19:24:12 +00:00
Isaac Bythewood
a4f3adc2df
Updated requirements and other items in preps of new pinry version
2013-09-22 03:33:50 +00:00
Isaac Bythewood
70a797c5af
Update feeds to meet PEP requirements and minor adjustments to base.html
2013-09-22 00:32:52 +00:00
Isaac Bythewood
85d099fa94
Finish up feed implementation.
2013-09-21 05:21:17 -04:00
Isaac Bythewood
3affd088fa
Adding rss feed for latest pins.
2013-09-21 04:28:41 -04:00
Isaac Bythewood
a12a5bd2a4
Fixed missing punctuation in messages css.
2013-09-18 19:10:14 -04:00
Krzysztof Klimonda
7db42bb075
Generate thumbnails when image is being saved
...
Too lax unique constraints for Thumbnail coped with "on demand" thumbnail
generation may leave database in inconsistent state where two thumbnail for
the same size are saved. We should be able to prevent that from happening
by generating all thumbnails when we save the image. Should fix #24 , but
I can't figure out a way to actually test it.
2013-04-16 00:30:43 +02:00
Krzysztof Klimonda
defbd50445
Don't load Pins "in background" when lightbox is active.
...
Remove the scroll event handler when lightbox is active, so pins are
not loaded in background breaking the page layout.
2013-04-14 15:51:39 +02:00
Isaac Bythewood
cecc88f068
Refactor loading pins part of pinry.js to fix some bugs
2013-04-05 18:50:06 +00:00
Isaac Bythewood
c8f0d6b1d6
Fix bug of multiple of same images loading sometimes
2013-04-05 18:30:14 +00:00
Krzysztof Klimonda
2ecda33fed
Apply fix from 3b10868 to users tests too
...
Repeat after me "I'll run a full test suite before pushing changes"
2013-04-05 19:44:16 +02:00
Krzysztof Klimonda
c0bf9d992e
Make sure that users can't impersonate each other when creating pins
...
We weren't checking if the Pin submitter is the logged user which made it possible
to pass any submitter to the Pin resource create call. Fix it, and make the submitter
optional.
2013-04-05 19:34:31 +02:00
Krzysztof Klimonda
3b10868832
Open binary files in the binary mode
...
Make sure that we are using binary mode to read binary files like images, this Fixes #20
2013-04-05 19:10:17 +02:00
Krzysztof Klimonda
e71452c68f
Use a relative path for the test image
...
It's part of the issue #20 (weird path on Windows). Django File class used
a full file path which resulted in path like C:\Example\pinry\static\C:\... which
is obviously invalid.
2013-03-27 21:07:22 +01:00
Isaac Bythewood
4f8139f615
Fix bug in sometimes loading the same pins again because the offset is not increased outside of "success"
2013-03-20 21:02:28 -03:00
Isaac Bythewood
310a89f2fe
Change default pin load limit to 50 instead of 30
2013-03-20 20:37:04 -03:00
Krzysztof Klimonda
fea9ea2f0e
Commit an initial South migration.
...
It is a milestone of sort, from now on we're commited to write
correct two-way migrations for our code. It's one of the last
things to be done before an official v1.0 release.
2013-03-19 20:41:37 +01:00
Krzysztof Klimonda
51ba441af5
Call lightbox() when new pin is created
...
We have to call lightbox() when new pin is created so its
onClick listener is registered.
2013-03-19 19:23:50 +01:00
Krzysztof Klimonda
494f7fbd8c
Fix test by mocking requests.get function
2013-03-19 15:41:55 +01:00
Krzysztof Klimonda
98876bb0bd
Use requests library instead of raw urllib2
...
This commit is a foundation upon a more robust image fetching code
will be built in the future, and it already fixes at least one weird
issue I've seen.
2013-03-19 15:22:20 +01:00
Krzysztof Klimonda
e0e0ac1679
Remove /by-md5/ prefix from image paths
...
Use forked django-images for now, until we can communicate with the
upstream about it. Fixes #4
2013-03-19 14:43:31 +01:00
Isaac Bythewood
de9628d863
Added viewport meta tag
2013-03-17 18:47:12 +00:00
Isaac Bythewood
e07a3aa87b
Add a noscript message
2013-03-17 18:38:07 +00:00
Krzysztof Klimonda
2f98fc4a57
Change avatar background color to white
2013-03-13 15:51:00 -07:00
Krzysztof Klimonda
8fa7583b0f
Call tillLayout when adding a new pin
2013-03-12 15:01:22 -07:00
Isaac Bythewood
026b5dcd88
Now shows messages from django
2013-03-12 06:38:47 +00:00
Isaac Bythewood
28c791fd1e
Pins are now editable
2013-03-12 06:12:09 +00:00
Isaac Bythewood
bcf480e639
Add fade to edit buttons and fix queueing of animation
2013-03-12 05:05:43 +00:00
Rober Torkuhl
812358e31b
use jQuery.off() instead od deprecated .unbind() function
2013-03-09 21:59:39 +01:00
Rober Torkuhl
0a5ed2b049
remove doubled event listeners
2013-03-09 21:39:40 +01:00