This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<br /> | |
<br /> | |
<br /> | |
<style type='text/css'> | |
a.link{margin:0;padding:0;border:none !important;text-decoration:none !important;} | |
table,tr,td,a,span{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;} | |
</style> | |
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /> | |
<meta name='format-detection' content='telephone=no' /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def build_user_FOO(foo, serializer_class_name, query_param=None): | |
if foo not in ['follows', 'fans', 'order_set']: | |
raise AttributeError | |
##todo check SerializerClass | |
get_class = lambda x: globals()[x] | |
@api_view(["GET"]) | |
@authentication_classes((TokenAuthentication, )) | |
def get_user_foo(request, pk): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@register.inclusion_tag("generic/includes/comments.html", takes_context=True) | |
def comments_for(context, obj): | |
""" | |
Provides a generic context variable name for the object that | |
comments are being rendered for. | |
""" | |
form = ThreadedCommentForm(context["request"], obj) | |
try: | |
context["posted_comment_form"] | |
except KeyError: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (! defined ( 'IN_DISCUZ' )) { | |
exit ( 'Access Denied' ); | |
} | |
class plugin_monitor { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install mysql | |
sudo apt-get install libmysqlclient-dev | |
sudo apt-get install python-dev | |
sudo pip install mysql-python | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function do_post_request($url, $data, $optional_headers = null) | |
{ | |
$params = array('http' => array( | |
'method' => 'POST', | |
'content' => $data | |
)); | |
if ($optional_headers !== null) { | |
$params['http']['header'] = $optional_headers; | |
} | |
$ctx = stream_context_create($params); |