Coder Social home page Coder Social logo

montylounge / django-sugar Goto Github PK

View Code? Open in Web Editor NEW
116.0 116.0 18.0 155 KB

Curated collection of all the sweet Django helpers/utilities developers create, and sometimes recreate too often.

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

django-sugar's People

Contributors

montylounge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

django-sugar's Issues

incorrect import in sugar/views/decorators.py

in sugar/views/decorators.py there is a line:

from lib.http import JsonResponse

I suppose correct one should be

from json import JsonResponse

or

from sugar.views.json import JsonResponse

proposal: render_to change

at this moment @render_to decorator, requires template name as an argument.

I suppose it will be nice to have an option to leave it empty.

This is useful when a view function is accepting a template as an argument, e.g.:
@render_to
def my_view(request, template='template.html'):
return {}, template

Pygments imports (cannot import lexers, formatters from pygments)

It's a weird issue, but there's an easy fix.

>>> import pygments
>>> pygments.lexers
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'lexers'
>>> from pygments import lexers
>>> lexers
<module 'pygments.lexers' from '/home/conesus/lib/python2.5/pygments/lexers/__init__.pyc'>

Go figure.

To fix, just add/change these lines in pygment_tags.py:
Add:
from pygments import lexers
from pygments import formatters
Change:
pygments.lexers to lexers
pygments.formatters to formatters

This is because of the autoloading() behavior in lexers/__init__.py.

Duplicate keyword in setup.py

hi,

You have a duplicate keyword in setup.py located line 6 and 11.
It raises an error with pip during the installation of django-mingus with stable-requirements.txt:

Obtaining django-sugar from git+git://github.com/montylounge/django-sugar.git@9a10d89d7431daf989d44d8c470229dec230ffc1#egg=django_sugar-0.1-py2.5-9a10d89d7431daf989d44d8c470229dec230ffc1 (from -r stable-requirements.txt (line 30))
  Updating clone /Users/thoas/virtualenvs/myblog/src/django-sugar (to revision 9a10d89d7431daf989d44d8c470229dec230ffc1)
  Running setup.py egg_info for package django-sugar
    Traceback (most recent call last):
      File "", line 13, in ?
      File "/Users/thoas/virtualenvs/myblog/src/django-sugar/setup.py", line 11
        license='BSD',
    SyntaxError: duplicate keyword argument
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
  File "", line 13, in ?
  File "/Users/thoas/virtualenvs/myblog/src/django-sugar/setup.py", line 11
    license='BSD',
SyntaxError: duplicate keyword argument

tchô.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.