Commit graph

367 commits

Author SHA1 Message Date
Martin Mahner
4bdcbdcd20 Removed bootstrap. 2017-09-05 13:43:16 +02:00
Martin Mahner
3aa06d30e0 100% vanilla JS now. 2017-09-01 18:57:06 +02:00
Martin Mahner
1167d6fcdb Changelog 2017-09-01 12:34:57 +02:00
Martin Mahner
201f78e81b First iteration of JS vanilla'ization 2017-09-01 12:34:52 +02:00
Martin Mahner
470b8dd2b3 v3.0 2017-09-01 11:32:58 +02:00
Martin Mahner
54de452f19 further cleanup 2017-03-18 14:08:36 +01:00
Kristján Oddsson
0e980b1eaf Change variable name from base_url to site_url
So it's more in-line with other global context variables ie.
`site_name`.

See https://github.com/bartTC/dpaste/pull/89#issuecomment-285331008
2017-03-09 14:27:09 +00:00
Kristján Oddsson
ec533a9dcc Replace hard-coded urls in about page with base_url
Display the `DPASTE_BASE_URL` instead of the hard-coded value
`dpaste.de`.
2017-03-09 11:13:29 +00:00
Kristján Oddsson
e6781d9dbc Expose base_url in global context for templates
Since `DPASTE_BASE_URL` is a dynamic setting that can be changed when
the application is self-hosted, the templates need to have access to the
variable when rendering the templates so that they do not erroneously
display the dpaste.de url.
2017-03-09 11:10:50 +00:00
Martin Mahner
95aca3588d Minor cleanup before highlight refactor. 2017-01-21 21:35:38 +01:00
Martin Mahner
0123fc1512 Removed tree 2017-01-21 14:46:05 +01:00
Martin Mahner
e1c3d21f38 Merge branch 'master' into cleanup 2017-01-21 14:45:51 +01:00
Martin Mahner
47d9d39cc9 Removed unused middleware 2017-01-20 10:59:50 +00:00
Martin Mahner
f6d8c1c742 Fixed missing exception for 404 views in Django 1.9+ 2017-01-19 22:46:41 +01:00
Martin Mahner
a6a5bc726b Backwards incompatible: Removed Gist button feature. 2017-01-19 12:16:07 +01:00
Martin Mahner
ae27acf1f9 Backwards incompatible: django-mptt removal.
Removal of django-mptt and therefor the removal of a tree based snippet list, due to performance reasons with large snippet counts.

Snippets still have a 'parent' relation if it's an answer of another snippet, however this is no longer a Nested Set. The UI is simplified too and the user can now only compare an answer to it's parent snippet. I believe this is the major use case anyway.
2017-01-19 12:10:35 +01:00
Martin Mahner
a6982b7414 Added Hebrew translation. 2016-12-02 14:54:11 +01:00
Martin Mahner
335fa38ab1 Copy url button 2016-12-02 14:44:12 +01:00
Martin Mahner
d765a0ccda Stub test for leading whitespace bug. 2016-12-02 13:38:47 +01:00
Martin Mahner
4b6dbb34d5 Use Postgres for testing. 2016-12-02 13:38:13 +01:00
Martin Mahner
6505f07a2a Moved template variables into a context processor. Fixed content type handling with Django 1.10. 2016-09-06 15:08:03 +02:00
Martin Mahner
1cc6a1a05e Added atom plugin. Closes #75. 2016-09-04 20:14:30 +02:00
Martin Mahner
b51c16bcbc Code cleanup and update for Django 1.10. Fixed all warnings. 2016-09-04 20:06:07 +02:00
Brian Harring
0bf4a7587a cleanup_snippets: use self.stdout rather than sys.stdout
The point of using these handles rather than sys.* is to support things
like this: https://docs.djangoproject.com/ja/1.9/ref/django-admin/#output-redirection

It also makes unit testing the output simpler.
2016-08-10 23:17:50 +00:00
Brian Harring
fd4beeec73 Use https:// for jquery script download by default.
Google offers SSL for the resource, so we might as well use that
as the default to cut off MITM angles.
2016-08-08 23:50:03 +00:00
nixon
2638096448 use snippet_new url for headline 2016-07-03 10:04:48 -05:00
Marco Rougeth
c3ba7de621 Added R lexer 2016-06-03 15:24:45 -03:00
Martin Mahner
021101d9e0 Fix for missing languages in about menu. 2016-03-25 11:43:06 +01:00
Martin Mahner
3eba19db02 Moved code highlighting to view. 2016-03-25 11:30:42 +01:00
Martin Mahner
f5cc7fc171 Drop Github Gist Export 2016-03-24 20:16:34 +01:00
Martin Mahner
6799f8609f Fix for missing languages in about menu. 2016-03-24 20:14:26 +01:00
Martin Mahner
1c2e26c930 Make all views class-based. 2016-03-24 20:14:13 +01:00
Martin Mahner
82d49d0ed1 First introduction of markup 2016-03-24 12:54:54 +01:00
Martin Mahner
998c3aaf82 Added C++ lexer. Closes #73. 2016-03-23 14:06:00 +01:00
Martin Mahner
b046d8ab87 Backwards incompatible. API calls now need to pass all arguments via POST. 2016-03-23 14:02:48 +01:00
Martin Mahner
d2a704c075 Code Updates for Django 1.8+ 2016-03-23 14:02:19 +01:00
Martin Mahner
2595d22b90 The future is now. 2016-03-23 14:01:30 +01:00
Martin Mahner
516cea933f Shortcut to run coveraged tests 2015-08-12 06:56:34 +02:00
Martin Mahner
1692d4572c No longer hide the base settings, have them in base. 2015-08-12 06:19:01 +02:00
Martin Mahner
2c0bd362a2 Updated messages. 2015-08-12 06:02:27 +02:00
Pesach Weinstock
71369bafdb - Moving south migrations into deprecated directory
which is still supported by south 1.0+, but will not
  get in the way of Django 1.7+ built-in migrations. See
  http://south.readthedocs.org/en/latest/releasenotes/1.0.html#library-migration-path
  and
  https://docs.djangoproject.com/en/1.7/topics/migrations/#upgrading-from-south
2015-01-29 16:21:10 -05:00
Martin Mahner
a42f1d93e7 Merge remote-tracking branch 'origin/master' 2015-01-09 08:49:43 +00:00
Martin Mahner
74e474b390 Removed media path settings, there are no file uploads 2015-01-09 08:49:26 +00:00
Martin Mahner
011d641c3b Updated message strings. 2014-12-29 11:43:16 +01:00
Martin Mahner
dfd0f25f11 Added wsgi application file 2014-12-14 17:28:28 +00:00
Martin Mahner
4939467620 Removed South from the default settings since it’s no longer compatible with latest Django 1.7. 2014-12-14 18:11:57 +01:00
Martin Mahner
b25b9b888e Cleaned up all imports using isort. 2014-12-14 18:03:35 +01:00
Martin Mahner
611e0f6ea9 Apply network block middleware on all POSTs 2014-12-12 22:58:06 +01:00
Martin Mahner
459e60a138 Added a middleware to repel anonymous proxy and tor clients 2014-12-12 21:02:25 +00:00
Martin Mahner
4dfab6533a Need to fix fallback value, in case the list is too short it would fail 2014-12-12 20:58:21 +00:00
Martin Mahner
7821056b64 Further cleanup of all „One-Time snippet“ strings. 2014-10-28 12:05:47 +01:00
Martin Mahner
6ca849cc91 Made the i18n url a fixed string, in Django 1.4 the named urlpattern does not exist yet. This looks like the best way to support all versions. Once 1.4 is deprecated we make this a revserse again. 2014-10-28 11:36:19 +01:00
Martin Mahner
ea27bf9e0f Language support! 2014-10-28 11:22:43 +01:00
Sergio Oliveira
174080d259 Updated ES 2014-10-27 15:15:44 -02:00
Sergio Oliveira
a7a1a6238f Updated pt_BR and es translations 2014-10-27 14:28:41 -02:00
Martin Mahner
d014c4df3f DEBUG is now False by default. 2014-10-25 12:09:06 +02:00
Martin Mahner
1185b5128b Updated german language. 2014-10-25 12:08:58 +02:00
Martin Mahner
8683c4c30d Further language cleanup. 2014-10-25 12:08:11 +02:00
Sergio Oliveira
dce3d6b9bd Fixed typo 2014-10-20 12:15:37 -02:00
Sergio Oliveira
ae2de8ef9c Fixed typo 2014-10-20 12:15:37 -02:00
Martin Mahner
832645f129 First pass of a German language. 2014-10-17 08:43:44 +02:00
Sergio Oliveira
434aeed6d1 Updated i18n strings 2014-10-16 09:27:17 -03:00
Marco Rougeth
ca75059f10 Add pt_BR translations 2014-10-16 09:27:08 -03:00
Jacob Welsh
85a02edb8f New settings for private installations
- The site name in the titles and "about" page can be changed from
  dpaste.de
- The Gist feature can be disabled (both the UI and the code that does
  the POST)
- A different URL can be given for jquery(.min).js besides google, such
  as beside the local static files
2014-10-01 19:31:28 -05:00
Martin Mahner
ac87dac3cc Added unittests for the xss bug. 2014-08-02 12:56:46 +02:00
Martin Mahner
497e5f0c28 Fixed XSS bug, 'code' lexer syntax were not escaped properly. 2014-08-01 20:56:58 +00:00
Martin Mahner
3bc2eb0c84 Add support to set a lexer with a given filename. Closes issue #63.
This allows third-party API utils to set the lexer automatically based on the open filename.
2014-06-09 20:18:08 +02:00
Martin Mahner
fbe6aeedb7 Split testcases so we dont rely on a DB order. 2014-06-09 20:04:39 +02:00
Martin Mahner
5c0012b3dd Removed Recent Changes. 2014-06-08 20:27:40 +02:00
Martin Mahner
0b50fd9bd1 No „View Raw“ button when viewing a one-time snippet, since it was already deleted at this time. Closes issue #62. 2014-06-08 20:25:11 +02:00
Martin Mahner
ae61e6f9aa Added settings docs for Gist changes made in issue #58. 2014-06-08 20:21:59 +02:00
Marco Rougeth
9f1650693b Add support to tzinfo 2014-06-08 20:16:58 +02:00
Martin Mahner
34181e03f7 Added a API value to set the expire time of snippets. Closes issue #64. 2014-06-08 20:15:59 +02:00
Martin Mahner
afafd4fb3b The expiration choice ‚never‘ is now enabled by default. 2014-06-08 20:09:36 +02:00
Marco Rougeth
f7e954491c Abstracting Gist's options 2014-05-05 00:02:54 -03:00
Marco Rougeth
f094e72788 Fixing TypeError when creating gist 2014-05-04 23:52:37 -03:00
Marco Rougeth
8c7b752f7e Add bootstrap3 support 2014-05-02 00:59:23 -03:00
Martin Mahner
1d7ba5a417 Usage update. 2014-04-12 11:33:41 -04:00
Martin Mahner
fa5c752ab9 Slightly simpler and cleaner API example. 2014-04-12 11:32:26 -04:00
Martin Mahner
8ebd3d1a82 Fixed indentation in about example. 2014-04-12 11:17:36 -04:00
Martin Mahner
550ad5a908 The 'code' lexer renders code snippets with no highlights now. 2014-04-12 11:01:09 -04:00
Martin Mahner
0a3e2b5082 Fixed duplicate slugs.
Before a slug could get generated again, which threw an error since it was not unique, but treated as a kind of primary key.

Now if the same slug gets generated again, we generate one other slug with one more character.
2014-04-12 10:10:46 -04:00
Martin Mahner
bbd68ee2c9 Fixed lexer key validation. Fixed tests. 2014-03-13 15:55:27 +01:00
Martin Mahner
a3b8c8a7a7 Fixed different fallback values for max-snippets setting.
Refs issue #51.
2014-03-13 15:48:36 +01:00
Martin Mahner
68cb1c27ec Merge remote-tracking branch 'origin/master' 2014-03-13 15:42:13 +01:00
Martin Mahner
1a0093ec0a Added a generic 'code' lexer (which actually falls back to Python) to have a better distinction to 'text'.
Refs issue #52.
2014-03-13 15:42:07 +01:00
Martin Mahner
e3f82db006 Fixed indentation that stole 1 whitespace. 4 spaces became 3. 2014-03-13 15:39:57 +01:00
Martin Mahner
1ed8e087fd Added little hook to add extra context to homepage 2014-03-01 06:33:52 +00:00
Martin Mahner
6cf181953f Merge remote-tracking branch 'origin/master' 2014-01-26 13:24:55 +01:00
Martin Mahner
15793347fb Fixed whitespace in api example 2014-01-26 13:24:52 +01:00
Martin Mahner
75f58993b1 Fixed display of tabs in normal/wordwrap mode 2014-01-24 13:20:57 +00:00
Martin Mahner
c61f134bb3 Wordwrap support. 2014-01-21 21:08:59 +01:00
Martin Mahner
973a7b825e News copy changes. 2014-01-21 15:00:00 +01:00
Martin Mahner
a4e637b1f2 Added a little news section and slight responsive fixes. 2014-01-21 14:50:22 +01:00
Martin Mahner
ec386d4506 Removed rounded border. 2014-01-21 13:23:57 +01:00
Martin Mahner
3b8bb915e5 One time tests and docs. 2014-01-21 13:12:03 +01:00
Martin Mahner
4eec1ab692 Removed view count and simpler message. 2014-01-21 12:36:01 +01:00
Martin Mahner
f627632bdd One time fixes 2014-01-21 12:30:06 +01:00
Martin Mahner
88be3a6b1f Support for onetime snippets. 2014-01-21 12:10:52 +01:00
Martin Mahner
15cb32abe9 Added IRC syntax to default list. 2014-01-16 20:52:24 +01:00
Martin Mahner
fc383915fd Merge pull request #41 from adsworth/master
add ABAP to the list of available lexers
2014-01-11 07:14:23 -08:00
Martin Mahner
dbfbcf54b6 API call accepts the lexer or format parameters now via GET too.
With this you can set the format by the url: /api/?format=json
2014-01-11 16:11:42 +01:00
Martin Mahner
964e1b64c7 Added option to keep snippets forever. 2014-01-11 16:00:11 +01:00
adsworth
c19b3eb513 add ABAP to the list of available lexers 2014-01-10 11:34:28 +01:00
Martin Mahner
d86f8b812b Code cleanup. 2014-01-07 13:07:55 +01:00
Martin Mahner
ebdd36cfeb Made the secret_id func more reusable. Added a test that is none. 2014-01-07 12:57:06 +01:00
Martin Mahner
c687ab125a Use SystemRandom to generate unpredictable random slugs. Fixed duplicate characters in the choice string, removed iI from it to prevent confusion. Fixes issue #40. 2014-01-07 12:46:57 +01:00
Martin Mahner
5a3b726e31 Merge remote-tracking branch 'origin/master' 2014-01-07 12:32:45 +01:00
Martin Mahner
58096be8e1 Removed stathat stats. 2014-01-07 12:32:34 +01:00
Martin Mahner
1047be02b5 Removed Twitter button. 2014-01-07 12:31:57 +01:00
dan
10c0dd695b fix minor typo 2013-12-20 11:28:15 -07:00
Martin Mahner
961d289ac1 More tests. 2013-12-18 12:54:26 +01:00
Martin Mahner
a5a15b3131 Removed unused method. 2013-12-18 12:54:22 +01:00
Martin Mahner
fae95e1e2a Moved inside the function so its re-evaluated for every testcase. 2013-12-18 12:54:13 +01:00
Martin Mahner
0ca950d109 Better fix for ctrl+Enter for Windows. 2013-12-18 10:34:44 +01:00
Martin Mahner
130605a04c Added csrf support. Closes issue #34. 2013-12-17 22:52:21 +01:00
Martin Mahner
9be3dea930 Use the ctrlKey if a MetaKey is not present. Should support Ctrl+Enter form submit on Windows. 2013-12-17 18:19:21 +01:00
Martin Mahner
91d40c521a Added X-Content-Type-Options='nosniff' to the Raw view. 2013-12-17 18:11:25 +01:00
Martin Mahner
b4e62fca36 Expire choices are not settable. 2013-12-17 18:10:19 +01:00
Martin Mahner
b362cd2ef6 Cmd+Enter form submit 2013-11-30 13:22:59 +01:00
Martin Mahner
f7f4f1b95c Removed my private info. 2013-11-29 19:35:23 +01:00
Martin Mahner
fac97b61fa Slug length and choices are now settings. 2013-11-29 18:46:28 +01:00
Martin Mahner
fb5bef707f Moved about page to 'paste' to fix 3rd party integration. 2013-11-29 18:46:11 +01:00
Martin Mahner
b4f2afa03a No longer strip the beginning of a paste! 2013-11-26 16:51:05 +01:00
Martin Mahner
e9ef15454d Added Django 1.4 compatibility by using future urlnames. 2013-11-26 11:08:36 +01:00
Martin Mahner
6a7e201a72 Tests for the management command. 2013-11-25 23:31:14 +01:00
Martin Mahner
c4dbc7f812 Better typo for text preview. 2013-11-25 21:28:45 +01:00
Martin Mahner
3fb5ca9598 Better visual highlighted line 2013-11-25 20:14:14 +01:00
Martin Mahner
1d8cff1dde Moar tests. 2013-11-25 19:37:01 +01:00
Martin Mahner
6f563ee4ea Use Python's json now. 2013-11-25 19:36:57 +01:00
Martin Mahner
8e727cb940 Set to debug True by default. 2013-11-25 19:36:50 +01:00
Martin Mahner
75618d649b Fixed import. 2013-11-25 19:36:32 +01:00
Martin Mahner
1069b3a88d Simplificiation of a snippet GET. No check for Multiple objects, if it really happens, fail loud. 2013-11-25 09:12:51 +01:00
Martin Mahner
715be017dd Removed caches since they are not used. Back to db based session storage. Re-added sessions backend. 2013-11-25 09:12:25 +01:00
Martin Mahner
b4f01103dc Moar cleanup. 2013-11-24 23:37:01 +01:00
Martin Mahner
43f82ba42b Python 3 compatibility. 2013-11-24 23:09:46 +01:00
Martin Mahner
d14bde889f Cleaned settings. 2013-11-24 23:02:16 +01:00
Martin Mahner
14d014bcba Fixed urlpattern warning. 2013-11-24 19:46:47 +01:00
Martin Mahner
ba0cbcd7c5 UI fixes for error pages. 2013-11-24 19:19:47 +01:00
Martin Mahner
c1c43dd51a A better API that supports more values. 2013-11-24 19:18:56 +01:00
Martin Mahner
82cbb9f141 UI Improvements. 2013-11-24 18:25:30 +01:00
Martin Mahner
33a37aed8d Go back to homepage by clicking on the page title. 2013-11-24 18:20:00 +01:00
Martin Mahner
f1a0dbab49 Allow to delete all snippets at once. 2013-11-24 18:16:29 +01:00
Martin Mahner
5cea272b15 UI improvements. Bootstrap sucks. 2013-11-24 17:58:57 +01:00
Martin Mahner
6960f67026 Text snippets are now rendered as text. 2013-11-24 17:05:43 +01:00
Martin Mahner
691c21dd0f Allow to set the initial lexer via GET. 2013-11-23 16:31:13 +01:00
Martin Mahner
1fce9e38f6 Reorganised settings. Removed Redis cache from base settings. 2013-11-23 16:08:11 +01:00
Martin Mahner
77c259ee39 Merge branch 'master' into develop 2013-11-23 15:55:53 +01:00
Marius Gedminas
508d86ba31 Allow raw snippets without trailing slash
Fixes an asymmetry where both of

  curl https://dpaste.de/xXxx
  curl https://dpaste.de/xXxx/

work, but

  curl https://dpaste.de/xXxx/raw/

fails without a trailing slash (because curl doesn't follow redirects by
default).
2013-10-22 11:01:15 +03:00
Marius Gedminas
520332e151 Trailing newline on raw responses
Without this you cannot easily share patches:

    user@machine1 $ git diff | curl -F 'content=<-' https://dpaste.de/api/
    user@machine2 $ curl https://dpaste.de/xxxx/raw/ | git apply
    fatal: corrupt patch at line 67
2013-10-22 11:01:15 +03:00
Martin Mahner
fb20e91a7d Added session cache backend. Added redis. Updated requirements. 2013-09-28 12:34:57 +02:00
Martin Mahner
c711639bac About improvements 2013-09-27 19:40:14 +00:00
Martin Mahner
3db308f750 Fixed missing import 2013-09-27 19:30:23 +00:00
Martin Mahner
bf39d704d7 Fixed a bug that raised an error if a lexer is unknown 2013-09-27 19:27:46 +00:00
Martin Mahner
e34c46f9aa Fixed snippet delete function. 2013-09-27 17:54:05 +02:00
Martin Mahner
6e641290e2 Fixed couple of merge issues 2013-09-27 17:50:58 +02:00
Martin Mahner
0e251a0392 Merge branch 'develop'
Conflicts:
	dpaste/urls/dpaste.py
	dpaste/views.py
2013-09-27 17:47:09 +02:00
Martin Mahner
4ba94ce64e Shorter random URLs and no longer a trailing slash. 2013-09-27 17:39:12 +02:00
Martin Mahner
4c96e1eb17 Update test_api.py 2013-08-15 21:42:26 +02:00
Martin Mahner
2c072e2789 Huge cleanup. Simplified lexer massively. Cleaned up view code. Cleaned up syntax highlighting. 2013-08-15 20:42:02 +02:00
Martin Mahner
e3de35fa15 No need for a sendmail compatible smtp anymore. 2013-08-15 19:09:10 +02:00
Martin Mahner
1d6fea38c4 Cleaned up models. 2013-08-15 19:06:15 +02:00
Martin Mahner
2b402680f8 Allow anybody to delete a snippet.
I got too many requests in the past, most of because people created snippets via the API and can't delete them, or because of legal issues.
2013-07-19 09:54:18 +02:00
Martin Mahner
f6f04901d6 Create python files on Gist by default 2013-06-05 17:44:56 +00:00
Martin Mahner
8db8977910 Create a Github gist from a snippet.
I'm not yet sure how useful it is, since its creates Gists in a anomymous space and not under your account, but if you want to save Snippets permanently, thats the way to go.
2013-06-05 19:40:41 +02:00
Martin Mahner
27f97ed458 Removed message 2013-05-31 09:47:02 +00:00
Martin Mahner
49edeecca0 Clickjacking middleware 2013-05-28 23:00:41 +00:00
Martin Mahner
30dd414a0f SSL example 2013-05-28 22:37:16 +00:00
Martin Mahner
4bbab1b324 New config files due to server movement 2013-05-26 19:40:16 +00:00
Timo Tijhof
fee4bd1354 Update and enhance javascript code
* Use shorthand notation for `$(document).ready`. This isn't
  just shorter but also slightly faster as it uses a cached
  instance or $(document) instead of re-instantiating jQuery.
* Use .prop('checked') instead of .attr('checked').
  Form fields reflect live state in properties, attributes are
  only used when parsing the HTML to set the initial values of
  the DOM properties. In the past (upto jQuery 1.6) jQuery
  would cover you by secretly calling .prop() for common mistakes
  but this has been deprecated and removed.
* Use .toggleClass instead of `if hasClass/addClass/removeClass`.
* Cancel previous AJAX request before starting another one.
  This fixes the bug where using the "Guess lexer" or "Diff" button
  twice in a row can sometimes result in the second push being
  ignored. Since the requests are asynchronous, one can arrive
  before or after the other and the callback called in a different
  order. It also saves a bit on the network I guess.
* DiffAjax: Moved location.hash assignment to before the request.
  It is asynchronous anyway, so the assignment happened before
  the request already. But now it is more obvious that this is
  the case.
* Simplified various selectors to just an ID instead of element
  with ID. IDs are unique. If you have more than one of them
  with a different element, there's something wrong. I suppose
  in a way it also saves potential maintenance in the future if
  a minor detail changes (e.g. from <div> to <p>).
* Removed weird variable conflict that was incorrectly
  copy-pasted in 1f863b345f.
  `var a;` when `a` already exists does nothing. It doesn't clear
  or reset it. It just weird syntax that should throw an error
  but is instead silently ignored. And `curLine` is already set
  and continues to be there.
2013-04-23 06:57:57 +02:00
Timo Tijhof
b2265b1af8 Clean up: Drop redundant attributes, minor JS clean up, gitignore
* Dropped redundant `type` attribute from script elements
  (some had them removed already).
* Dropped redundant `media` attribute from link elements.
* <div> is not a valid self-closing tag.
* Dropped redundant / in self-closing tags in <hr/>, <br/>, <input/>.
  Just like was done for <img> and <link> already).
* Aliasing $ to jQuery (local reference is cheaper and using
  jQuery as global seems more stable, bootstrap.js does this too).
* Unminified it a bit (nothing extreme, just more consistent
  other code here already).
* Consistently used single quotes in the js code
  (most code used singled quotes already).
* Quoting attribute selectors $('input[name="foo"]').
  Unquoted selectors have been deprecated.
* Ignore .pyc files (so they don't show up in `git status`, and
  aren't accidentally committed with `git add`).
2013-04-23 06:33:06 +02:00
Timo Tijhof
32dc8e5928 Use protocol-relative url for jQuery. Fixes #15.
HTTP urls are blocked in modern browsers when accessing the page
over HTTPS (https://dpaste.de/), so jQuery wasn't being loaded
and the rest of the javascript failed on various ReferenceError
and TypeError exceptions around "$ is undefined".
2013-04-23 06:03:21 +02:00
Martin Mahner
4aaa2973be Streamlined settings. Removed test settings and moved defaults to settings.py 2013-03-29 19:25:27 +01:00
Martin Mahner
241180a350 Updated to Django 1.5.1 2013-03-29 19:09:59 +01:00
Martin Mahner
4978538a97 Removed Django-Piston, added a very simple view to handle API calls. Fully backwards compatible. Fixes all tests. 2013-03-29 19:09:22 +01:00
Martin Mahner
c595d99e6d Added a test hint 2013-03-28 22:56:41 +01:00
Martin Mahner
ad7f7ccf49 Restructured the about page 2013-03-28 21:52:48 +01:00
Martin Mahner
16b4f0fc0a Better visual error display. Fixes issue #13 2013-03-28 21:45:32 +01:00
Martin Mahner
2996bb9a3b Increased contrast for text and diff text 2013-03-28 21:38:25 +01:00
Martin Mahner
1f173efd7e Custom test settings 2013-03-22 22:45:16 +01:00
Martin Mahner
bcdea97073 Snippet tests 2013-03-22 22:38:50 +01:00
Martin Mahner
ce29409340 Strip content before putting it in the db. 2013-03-22 22:38:39 +01:00
Martin Mahner
6302145007 Unittests for the API 2013-03-22 21:03:10 +01:00
Martin Mahner
198e5252fb Set a max_length for all snippets. Nobody needs more than 256k of space. 2013-03-22 19:41:39 +01:00
Martin Mahner
e9770293bb Autofocus the textfield for a new snippet. 2013-03-22 19:41:39 +01:00
Martin Mahner
9321195ff4 Now that there is no admin anymore I need a quick way to check the total snippet count, to see if something goes wrong or I'm DOSed. 2013-03-22 19:41:39 +01:00
Martin Mahner
4e4463faf7 Removed auth, sites and content types. Without the admin we no longer need em. 2013-03-22 19:41:39 +01:00
Martin Mahner
22bce7a008 Removed Django admin. It was never useful anyway. 2013-03-22 19:41:39 +01:00
Martin Mahner
ecf7653bf9 Added a smtp comment 2013-03-22 19:41:39 +01:00
Martin Mahner
c922a30dca Removed Raven/Sentry 2013-03-22 19:41:39 +01:00
Martin Mahner
ed29279b0a Added dpaste.org to ALLOWED_HOSTS 2013-03-21 18:26:35 +00:00
Martin Mahner
da66c18479 No left and right padding, looks better on mobile 2013-03-20 13:45:52 +01:00
Martin Mahner
1f863b345f Ability to link and open to diffs directly. Fixes issue #2. 2013-03-20 13:41:31 +01:00
Martin Mahner
e14192d2d1 Save the recently used lexer to use it next time again. Fixes issue #3 2013-03-20 13:08:41 +01:00
Martin Mahner
d42a2d3c79 Don't display the compare button if the snippet has no replies. Fixes issue #6. 2013-03-20 12:58:07 +01:00
Martin Mahner
ca1e12596c Fixed curl example 2013-03-20 12:49:44 +01:00
Martin Mahner
a202d88324 Highlight the API example. Fixes issue #7 2013-03-20 12:09:11 +01:00
Martin Mahner
638a62d775 Line numbers are 1 based. Fixes issue #5. 2013-03-20 12:03:39 +01:00
Martin Mahner
faf840a113 Decoupled functions 2013-03-19 21:13:13 +01:00
Martin Mahner
f3b5bad47c Merge branch 'master' of github.com:bartTC/dpaste 2013-03-19 19:37:18 +00:00