zacharytamas / atom-django Goto Github PK
View Code? Open in Web Editor NEWBuild Django apps faster with Atom.
Build Django apps faster with Atom.
I'm not really sure what changed; I haven't installed any new packages or anything like that. But suddenly django files are opening with pure Python syntax and I need to manually tell it to read them as Python Django, individually every time I open one.
How do I tell it to start detecting it again?
Here is what the atom-django cson file looks like (packages/atom-django/grammars/python django.cson
)
'fileTypes': []
'name': 'Python Django'
'patterns': [
# Model Field Types
{
'begin': '(meta|models)(\\.)(AutoField|BigIntegerField|BinaryField|BooleanField|CharField|CommaSeparatedIntegerField|DateField|DateTimeField|DecimalField|DurationField|EmailField|FileField|FilePathField|FloatField|ImageField|IntegerField|IPAddressField|GenericIPAddressField|NullBooleanField|PositiveIntegerField|PositiveSmallIntegerField|SlugField|SmallIntegerField|TextField|TimeField|URLField|UUIDField|ForeignKey|ManyToManyField|OneToOneField)'
'beginCaptures':
'1':
'name': 'support.class.django.model'
'3':
'name': 'support.class.django.model'
'end': '(\\))'
'patterns': [
{
'include': '#function-call-arguments'
}
]
}
# Form Field Types
{
'begin': '(forms)(\\.)(BooleanField|CharField|ChoiceField|TypedChoiceField|DateField|DateTimeField|DecimalField|DurationField|EmailField|FileField|FilePathField|FloatField|ImageField|IntegerField|IPAddressField|GenericIPAddressField|MultipleChoiceField|TypedMultipleChoiceField|NullBooleanField|RegexField|SlugField|TimeField|URLField|UUIDField|ComboField|MultiValueField|SplitDateTimeField|ModelChoiceField|ModelMultipleChoiceField)'
'beginCaptures':
'1':
'name': 'support.class.django.form'
'3':
'name': 'support.class.django.form'
'end': '(\\))'
'patterns': [
{
'include': '#function-call-arguments'
}
]
}
# Shortcut functions
{
'match': '(render_to_response|render|redirect|get_object_or_404|get_list_or_404|resolve_url)'
'name': 'support.function.django.shortcuts'
}
# Settings constants
{
'match': '(DEBUG|TEMPLATE_DEBUG|DEBUG_PROPAGATE_EXCEPTIONS|USE_ETAGS|ADMINS|INTERNAL_IPS|ALLOWED_HOSTS|TIME_ZONE|USE_TZ|LANGUAGE_CODE|LANGUAGES|LANGUAGES_BIDI|USE_I18N|LOCALE_PATHS|LANGUAGE_COOKIE_NAME|LANGUAGE_COOKIE_AGE|LANGUAGE_COOKIE_DOMAIN|LANGUAGE_COOKIE_PATH|USE_L10N|MANAGERS|DEFAULT_CONTENT_TYPE|DEFAULT_CHARSET|FILE_CHARSET|SERVER_EMAIL|DATABASES|DATABASE_ROUTERS|EMAIL_BACKEND|EMAIL_HOST|EMAIL_PORT|EMAIL_HOST_USER|EMAIL_HOST_PASSWORD|EMAIL_USE_TLS|EMAIL_USE_SSL|EMAIL_SSL_CERTFILE|EMAIL_SSL_KEYFILE|EMAIL_TIMEOUT|INSTALLED_APPS|TEMPLATE_DIRS|TEMPLATE_LOADERS|TEMPLATE_CONTEXT_PROCESSORS|TEMPLATE_STRING_IF_INVALID|TEMPLATES|DEFAULT_FROM_EMAIL|EMAIL_SUBJECT_PREFIX|APPEND_SLASH|PREPEND_WWW|FORCE_SCRIPT_NAME|DISALLOWED_USER_AGENTS|ABSOLUTE_URL_OVERRIDES|ALLOWED_INCLUDE_ROOTS|IGNORABLE_404_URLS|SECRET_KEY|DEFAULT_FILE_STORAGE|MEDIA_ROOT|MEDIA_URL|STATIC_ROOT|STATIC_URL|FILE_UPLOAD_HANDLERS|FILE_UPLOAD_MAX_MEMORY_SIZE|FILE_UPLOAD_TEMP_DIR|FILE_UPLOAD_PERMISSIONS|FILE_UPLOAD_DIRECTORY_PERMISSIONS|FORMAT_MODULE_PATH|DATE_FORMAT|DATETIME_FORMAT|TIME_FORMAT|YEAR_MONTH_FORMAT|MONTH_DAY_FORMAT|SHORT_DATE_FORMAT|SHORT_DATETIME_FORMAT|DATE_INPUT_FORMATS|TIME_INPUT_FORMATS|DATETIME_INPUT_FORMATS|FIRST_DAY_OF_WEEK|DECIMAL_SEPARATOR|USE_THOUSAND_SEPARATOR|NUMBER_GROUPING|THOUSAND_SEPARATOR|DEFAULT_TABLESPACE|DEFAULT_INDEX_TABLESPACE|X_FRAME_OPTIONS|USE_X_FORWARDED_HOST|WSGI_APPLICATION|SECURE_PROXY_SSL_HEADER|MIDDLEWARE_CLASSES|SESSION_CACHE_ALIAS|SESSION_COOKIE_NAME|SESSION_COOKIE_AGE|SESSION_COOKIE_DOMAIN|SESSION_COOKIE_SECURE|SESSION_COOKIE_PATH|SESSION_COOKIE_HTTPONLY|SESSION_SAVE_EVERY_REQUEST|SESSION_EXPIRE_AT_BROWSER_CLOSE|SESSION_ENGINE|SESSION_FILE_PATH|SESSION_SERIALIZER|CACHES|CACHE_MIDDLEWARE_KEY_PREFIX|CACHE_MIDDLEWARE_SECONDS|CACHE_MIDDLEWARE_ALIAS|AUTH_USER_MODEL|AUTHENTICATION_BACKENDS|LOGIN_URL|LOGOUT_URL|LOGIN_REDIRECT_URL|PASSWORD_RESET_TIMEOUT_DAYS|PASSWORD_HASHERS|SIGNING_BACKEND|CSRF_FAILURE_VIEW|CSRF_COOKIE_NAME|CSRF_COOKIE_AGE|CSRF_COOKIE_DOMAIN|CSRF_COOKIE_PATH|CSRF_COOKIE_SECURE|CSRF_COOKIE_HTTPONLY|MESSAGE_STORAGE|LOGGING_CONFIG|LOGGING|DEFAULT_EXCEPTION_REPORTER_FILTER|TEST_RUNNER|TEST_NON_SERIALIZED_APPS|FIXTURE_DIRS|STATICFILES_DIRS|STATICFILES_STORAGE|STATICFILES_FINDERS|MIGRATION_MODULES|SILENCED_SYSTEM_CHECKS|SECURE_BROWSER_XSS_FILTER|SECURE_CONTENT_TYPE_NOSNIFF|SECURE_HSTS_INCLUDE_SUBDOMAINS|SECURE_HSTS_SECONDS|SECURE_REDIRECT_EXEMPT|SECURE_SSL_HOST|SECURE_SSL_REDIRECT)'
'name': 'support.constant.django.settings'
}
{
'include': 'source.python'
}
]
# This is copied from the language-python package, could not find a way to
# include repository from a included/another grammar
'repository':
'keyword_arguments':
'begin': '\\b([a-zA-Z_][a-zA-Z_0-9]*)\\s*(=)(?!=)'
'beginCaptures':
'1':
'name': 'variable.parameter.function.python'
'2':
'name': 'keyword.operator.assignment.python'
'end': '\\s*(?:(,)|(?=$\\n?|[\\)\\:]))'
'endCaptures':
'1':
'name': 'punctuation.separator.parameters.python'
'patterns': [
{
'include': '$self'
}
]
'function-call-arguments':
'begin': '(\\()'
'beginCaptures':
'1':
'name': 'punctuation.definition.arguments.begin.python'
'contentName': 'meta.function-call.arguments.python'
'end': '(?=\\))'
'patterns': [
{
'include': '#keyword_arguments'
}
{
'include': 'source.python'
}
]
'scopeName': 'source.python.django'
Attached is a pic of the settings page
[Enter steps to reproduce below:]
Atom Version: 1.1.0
System: Microsoft Windows 10 Home
Thrown From: atom-django package, v0.3.0
Uncaught TypeError: this.textEditor.displayBuffer.getMaxScrollTop is not a function
At /C:/Users/Carter/.atom/packages/minimap/lib/minimap.coffee:169
TypeError: this.textEditor.displayBuffer.getMaxScrollTop is not a function
at Minimap.module.exports.Minimap.getTextEditorMaxScrollTop (C:\Users\Carter\.atom\packages\minimap\lib\minimap.coffee:200:46)
at Minimap.module.exports.Minimap.getTextEditorScrollRatio (C:\Users\Carter\.atom\packages\minimap\lib\minimap.coffee:216:36)
at Minimap.module.exports.Minimap.getCapedTextEditorScrollRatio (C:\Users\Carter\.atom\packages\minimap\lib\minimap.coffee:223:50)
at Minimap.module.exports.Minimap.getScrollTop (C:\Users\Carter\.atom\packages\minimap\lib\minimap.coffee:334:17)
at atom-text-editor-minimap.MinimapElement.update (C:\Users\Carter\.atom\packages\minimap\lib\minimap-element.coffee:343:73)
at C:\Users\Carter\.atom\packages\minimap\lib\minimap-element.coffee:323:8
{
"core": {}
}
# User
atom-django, v0.3.0
autocomplete-python, v0.6.3
file-icons, v1.6.10
minimap, v4.13.4
# Dev
No dev packages
The format for the model template is extremely old. Django admin is now a separate app, so the Admin subclass is handled outside of the model.
try to disabled and restart Atom and AND enabled again.
I work with django_templates and autocomplete_python
its very importent to me because i still a newbe i have alot of syntax problem and then i stuck for a days because i didnt find the problem...
waht can i do ????
Please, add features list into README.md
. I can't understand why do I need this package.
To reproduce just add
from django.shortcuts import render
at the top, or any other point of a file.
I guess it's because it identifies render as a function so it should have the parenthesis right after it, but I'm pretty sure you cant import a function that way.
python3.4
is hardcoded into the project in /django_extractors/django_path.py
. I think that's not so great of an idea. Can we swap that out with a more universal alternative?
I've tried enabling and reenabling it and it doesn't work.
Other packages installed:
atom-beautify
autocomplete-python
django-templates
ide-python
intentions
linter
linter-pycodestyle
liner-ui-default
python-tools
When hit Cmd + i to run python script get this error.
"Commnad not configured for Python(Django)"
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
another package: https://github.com/benjohnson/atom-django-templates#default-grammar has a method of determining html files from django template files, will your package support that?
Hey guys @zacharytamas @benjohnson @jpells @gilsondev,
Currently we have 4 different Atom packages for Django and all of them are very similiar. Why we don't merge them all into one package? The idea would be to join the effort to create a single package that is really good and includes all the nice features from each package. It would be easier to Atom users to pick the best package and we would be able to have full Django support from only one package.
@zacharytamas package is currently the most downloaded one, also atom-django seems the most appropriated name in my opinion, so I think it would make sense to merge everything into his package.
We could have one package with:
I would be happy to make the pull requests to accomplish this.
Then we should mention all you guys as contributors in the README and point to this package in the other's README.
What you guys think?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.