Code Monkey home page Code Monkey logo

edge's Introduction

{% comment "This comment section will be deleted in the generated project" %}

Build Status

A Fantastic Django project starter.

Features

  • Ready Bootstrap-themed pages
  • User Registration/Sign up
  • Better Security with 12-Factor recommendations
  • Logging/Debugging Helpers
  • Works on Python 3 and Django 2
  • Formatted with Black

More information at: http://django-edge.readthedocs.org/ Contribute using: Edge Dev Tools ✨ 🍰 ✨

Quick start:

Before creating a new project from this template, you need to create a fresh virtual environment and install Django:

  1. $ python -m venv ./myenv
  2. $ source ./myenv/bin/activate.fish (use the appropriate activate script based on your shell)
  3. $ python -m pip install -U pip django

Create your new edgy django project:

  1. $ django-admin.py startproject --template=https://github.com/arocks/edge/archive/master.zip --extension=py,md,html,env my_proj
  2. $ cd my_proj
  3. $ pip install -r requirements.txt
  4. $ cd src
  5. $ cp my_proj/settings/local.sample.env my_proj/settings/local.env
  6. $ python manage.py migrate
  7. $ python manage.py createsuperuser
  8. $ python manage.py runserver

Recommended Installation (with pipenv)

  1. $ pip install --user --upgrade pipenv (Install pipenv system-wide or locally but outside a virtualenv)

  2. $ mkdir my_proj (choose a better name than my_proj for your project)

  3. $ django-admin.py startproject --template=https://github.com/arocks/edge/archive/master.zip --extension=py,md,html,env my_proj .

    If you get an SSL error, then download the zip file and mention it after --template=, like this: django-admin.py startproject --template=~/Downloads/master.zip --extension=py,md,html,env my_proj .

  4. $ pipenv install --dev

  5. $ pipenv shell

  6. $ cp src/my_proj/settings/local.sample.env src/my_proj/settings/local.env (or rename this file)

  7. $ cd src

  8. $ python manage.py migrate

  9. $ python manage.py createsuperuser

  10. $ python manage.py runserver

If you need to keep requirements.txt updated then run

pipenv lock --requirements > requirements/base.txt
echo "-r base.txt" > requirements/development.txt
pipenv lock --requirements --dev >> requirements/development.txt

Rest of this README will be copied to the generated project.


{% endcomment %}

{{ project_name }}

{{ project_name }} is a short description. It is built with Python using the Django Web Framework.

This project has the following basic apps:

  • App1 (short desc)
  • App2 (short desc)
  • App3 (short desc)

Installation

Quick start

To set up a development environment quickly, first install Python 3. It comes with virtualenv built-in. So create a virtual env by:

1. `$ python3 -m venv {{ project_name }}`
2. `$ . {{ project_name }}/bin/activate`

Install all dependencies:

pip install -r requirements.txt

Run migrations:

python manage.py migrate

Detailed instructions

Take a look at the docs for more information.

edge's People

Contributors

arocks avatar parvjain avatar rickwargo avatar sanjeev29 avatar slmjy avatar sydhenry avatar vaishwadeanurag avatar vharsh 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  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

edge's Issues

how to send activation email

currently, after sign-up user automatically get's logged in.
i think the most common use case is to send him an activation mail

profile model

adding a model in account with one-to-one relation to User model to be used as user profile, and letting profile filled in registration form is very needed :)

keep up the good work!

Admin related foreign key popup

When in the Django Admin and ForeignKeys are present, the '+' (add button) does not open a pop-up or separate window for user's to enter what they are wanting to add.

local env

Hello Arun,

Maybe the local.env file be added in .gitignore and the project can be generated: local.env.sample file and copied to local.env for deploy and local settings.

What do you guys think?

error while installing django-authtools

Hi, i'm facing an issue when trying to install requirements, so after i hit :
(py3env)[kaddour@archlinux edge $ pip3 install -r requirements.txt
i get this error :

Collecting django-environ>=0.3.0 (from -r requirements/base.txt (line 2))
  Using cached django-environ-0.3.0.tar.gz
Collecting django-braces>=1.8.0 (from -r requirements/base.txt (line 3))
  Using cached django_braces-1.8.1-py2.py3-none-any.whl
Collecting django-crispy-forms>=1.4.0 (from -r requirements/base.txt (line 4))
Collecting django-admin-bootstrapped>=2.4.0 (from -r requirements/base.txt (line 5))
Collecting django-authtools>=1.2.0 (from -r requirements/base.txt (line 6))
  Using cached django-authtools-1.2.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-pdsxcxi3/django-authtools/setup.py", line 23, in <module>
        long_description='\n\n'.join([read('README.rst'), read('CHANGES.rst')]),
      File "/tmp/pip-build-pdsxcxi3/django-authtools/setup.py", line 10, in read
        return open(os.path.join(os.path.dirname(**file**), fname)).read()
      File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 721: ordinal not in range(128)



Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-pdsxcxi3/django-authtools```

---

So i think this line has to do with utf8 encoding "stuff"
`UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 721: ordinal not in range(128)`

Any help is welcome (i'm an almost perfect **noob**)

would love to see some documentation enhancements.

i can't escape the fact that edge is one of it's kind right now and it is very helpful for any django developer out there, but it need a more better documentions you can add several code snippets and explain them or you can just show how the things actually works by using django api. these changes will be very helpful for a new guy to easily get used to edge code, without going through it.

Thanks.

Social auth

Hi @arocks !

Thank you very much for this template, it is really very useful.

Another very important thing for this project would be to integrate a social login with Facebook and Twitter at least, in addition to maintaining the Edge login; I mean incorporate something like django-allauth.
In this case i don't know how because the User model has been modified to keep the email as a key.

Can you help with that?

Thanks so much.
Regards

Remember me Checked creates an Exception

As raised by @Picatek

If when you login and check the Remember me checkbox you get:
Exception Value:

'NoneType' object has no attribute 'session'
Exception Location: /home/ico/projects/logsiteprj/logterm/src/accounts/forms.py in confirm_login_allowed, line 39
Python Executable: /home/ico/projects/logsiteprj/venv/bin/python3

Startproject zipfile.BadZipfile: File is not a zip file

Hi
When I use the command django-admin.py startproject --template=https://github.com/arocks/edge/archive/master.zip --extension=py,md,html,env example to start a new project which name is example under Python2.7.6, encounter a error: zipfile.BadZipfile: File is not a zip file.

Following is all my verbose error information:
django-admin.py startproject --template=https://github.com/arocks/edge/archive/master.zip --extension=py,md,html,env example
Traceback (most recent call last):
File "/usr/local/bin/django-admin.py", line 5, in
management.execute_from_command_line()
File "/Library/Python/2.7/site-packages/django/core/management/init.py", line 385, in execute_from_command_line
utility.execute()
File "/Library/Python/2.7/site-packages/django/core/management/init.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(_args, *_options.dict)
File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 338, in execute
output = self.handle(_args, *_options)
File "/Library/Python/2.7/site-packages/django/core/management/commands/startproject.py", line 31, in handle
super(Command, self).handle('project', project_name, target, **options)
File "/Library/Python/2.7/site-packages/django/core/management/templates.py", line 122, in handle
base_subdir)
File "/Library/Python/2.7/site-packages/django/core/management/templates.py", line 205, in handle_template
return self.extract(absolute_path)
File "/Library/Python/2.7/site-packages/django/core/management/templates.py", line 299, in extract
archive.extract(filename, tempdir)
File "/Library/Python/2.7/site-packages/django/utils/archive.py", line 49, in extract
with Archive(path) as archive:
File "/Library/Python/2.7/site-packages/django/utils/archive.py", line 58, in init
self._archive = self._archive_cls(file)(file)
File "/Library/Python/2.7/site-packages/django/utils/archive.py", line 181, in init
self._archive = zipfile.ZipFile(file)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 766, in init
self._RealGetContents()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 807, in _RealGetContents
raise BadZipfile, "File is not a zip file"
zipfile.BadZipfile: File is not a zip file

I have installed a django with version 1.7.6 in an virtualenv.

Internationalization

The first thing to say, is to start with a big thank you, I don't know if you receive enough appreciation for this work, but is a great template, and perhaps you deserve more than you get.

After this introduction, the only thing I think the template lacks right now is a good integration with the internationalization core of the Django Framework. As you may see, my mother language is not english, and it implies a lot of unnecessary work to do going to translations, not just within the template, but also from the derivatives, is there a way to integrate the whole templating system with the internationalization underlying side of the framework?

Obviously I don't know if something like that there is a way to do it, but if there is one, perhaps is a "nice to have" feature.

Disable admin styling?

Is there anyway to disable the styling used for the admin section. Its actually quite hard to difficult with, and the form layout is unclear. I'd like to use Django's default styling.

Why do you set APP_DIRS to False in production?

In the production settings, you do:

TEMPLATES[0].update({"APP_DIRS": False})

Why? This is just out of curiosity. Using git blame, I found it had something to do with using cached templates in production, but I'm not really lcear on how that works.

null_technical_500_response() got an unexpected keyword argument 'status_code'

Django: 1.10
Python: 2.7.9

After migrating and launching development server by ./manage.py runserver 0.0.0.0:8002 then visiting the page I receive this:

Traceback (most recent call last):
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 170, in __call__
    response = self.get_response(request)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/base.py", line 124, in get_response
    response = self._middleware_chain(request)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = response_for_exception(request, exc)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/exception.py", line 76, in response_for_exception
    response = debug.technical_500_response(request, *sys.exc_info(), status_code=400)
TypeError: null_technical_500_response() got an unexpected keyword argument 'status_code'

Changed MIDDLEWARE_CLASSES to MIDDLEWARE in base.py, and added

MIDDLEWARE += [
    'debug_toolbar.middleware.DebugToolbarMiddleware',
]

to development.py file

and now I'm receiving:

Traceback (most recent call last):
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 170, in __call__
    response = self.get_response(request)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/base.py", line 124, in get_response
    response = self._middleware_chain(request)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = response_for_exception(request, exc)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/exception.py", line 86, in response_for_exception
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/exception.py", line 128, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
  File "/home/rafal/csgopanel/src/csgopanel/wsgi.py", line 24, in null_technical_500_response
    six.reraise(exc_type, exc_value, tb)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/exception.py", line 39, in inner
    response = get_response(request)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/utils/deprecation.py", line 136, in __call__
    response = self.get_response(request)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = response_for_exception(request, exc)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/exception.py", line 76, in response_for_exception
    response = debug.technical_500_response(request, *sys.exc_info(), status_code=400)
TypeError: null_technical_500_response() got an unexpected keyword argument 'status_code'

django.template.context_processors.request not listed amongst context_processors?

Since I am new to Django, I'm uncertain whether not listing django.template.context_processors.request amongst context_processors in settings/base.py is intentional or not, but I was trying to get referrer redirect working using request.path inside a template and couldn't figure out why this was null until I stumbled across the requirement for this include.

Regards.

TEMPLATE_* settings were deprecated

After fresh install as described in the doc
While migrating on win 8.1 64bit: I got that warning:

WARNINGS:
?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 a
nd the TEMPLATES dictionary takes precedence. You must put the values of the fol
lowing settings into your default TEMPLATES dict: TEMPLATE_DEBUG.

It also appears when typing runserver.

fresh install
python 3.5 64bit
django 1.9

Thanks

Can't make migrations using Postgres

I noticed that if I changed the database to Postgres before doing the initial migrate, it would fail with the error

django.db.utils.ProgrammingError: relation "auth_group" does not exist

After a couple of hours I found the issue. So, I would like to suggest to add to the manual a Note that says that, if using Postgres, you need to run first:

python manage.py migrate auth

and then

python manage.py migrate

This will apply first the dependencies so that the general migration can work. If you don't run it like this, it just won't work.

Regards.

pythonanywhere configuration

I'm fairly new to Django and deploying anything really, so please forgive my ignorance. I'm trying to get your template up and running on pythonanywhere as per your installation in the docs, but get an error:

ImportError: No module named 'cdp_proj.settings'

part of wsgi.py:
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cdp_proj.settings.production")

Plus I'm not sure how to handle the static files. pythonanywhere has its own configuration and I'm not sure if I should ignore it since your settings seems to handle it

Any guidance in regards to seeting up edge on pythonanywhere would be great.

thanks in advance,

Michael
p.s. bought your book, very well written as it's very readable to a beginner like me, very rare

E-mail verification

Hi,
Congratulation for the great job!

Is it visible to implement also e-mail verification? Will be really nice to have this feature out of the box.

utils is not a package

screenshot from 2015-07-03 14 15 43

Failed to get real commands on module "my_proj": python process died with code 1: Traceback (most recent call last):
File "", line 2218, in _find_and_load_unlocked
AttributeError: 'module' object has no attribute 'path'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/pycharm/helpers/pycharm/manage_tasks_provider.py", line 20, in
django.setup()
File "/home/MfM/.pyenv/versions/MfMedge/lib/python3.4/site-packages/django/init.py", line 17, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/home/MfM/.pyenv/versions/MfMedge/lib/python3.4/site-packages/django/conf/init.py", line 48, in getattr
self._setup(name)
File "/home/MfM/.pyenv/versions/MfMedge/lib/python3.4/site-packages/django/conf/init.py", line 44, in _setup
self._wrapped = Settings(settings_module)
File "/home/MfM/.pyenv/versions/MfMedge/lib/python3.4/site-packages/django/conf/init.py", line 92, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/home/MfM/.pyenv/versions/3.4.3/lib/python3.4/importlib/init.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 2254, in _gcd_import
File "", line 2237, in _find_and_load
File "", line 2226, in _find_and_load_unlocked
File "", line 1200, in _load_unlocked
File "", line 1129, in _exec
File "", line 1471, in exec_module
File "", line 321, in _call_with_frames_removed
File "/home/MfM/my_proj/src/my_proj/settings/development.py", line 5, in
from utils.misc import get_git_changeset
ImportError: No module named 'utils.misc'; 'utils' is not a package

Postgres: "auth_group" does not exist error in the testdatabase

See this issue:
#35

My current app order in settings/base.py:
INSTALLED_APPS = (
'django.contrib.auth',
'django_admin_bootstrapped',
'django.contrib.admin',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',

'authtools',
'crispy_forms',
'easy_thumbnails',

'profiles',
'accounts',

)

v2.0 ship list

All these changes are present in the https://github.com/arocks/edge/tree/accounts2profiles feature branch

Models

  • User model customized (thanks to authtools)
    • Use emails as the primary key. username will not be required.
    • Use full names instead of first name and last name.

Profile ✨

  • Profiles app: Each user will have a corresponding profile #2 . The default profile details are:
    • Profile Picture: any image can be uploaded. By default a grey head appears.
    • Bio: a short writeup
    • Email Verification status: whether the user clicked on the link in the verification email. Refer Auth.
  • Show profile: A view to show the user's profile in an attractive page. It has a permalink which can be shared without revealing user's email or database primary key using UUID.
  • Edit profile: A combined view with user editable details and profile editable details in a single view.

Appearance

  • Themed: ships with Bootswatch Lumen theme by default
  • Navbar See Thru: Cover image can be seen through the navbar. Upon scrolling the navbar becomes opaque.
  • Crispy forms: Every form has been styled to look Bootstrap-native using crispy forms.
  • Profile Pic on Navbar: appears next to user's full name
  • Light Navbar: Dark bar was looking too Bootstrap-ish
  • Upgraded to Bootstrap v3.3.2 #8

Admin

  • Switch to site: A button on the admin navbar takes you to the home page quickly
  • Profiles inlined to User: There is no separate admin interface for profiles making it cleaner and less confusing.
  • Permalink: Unique link to every user's profile shown in user list view

Python 2.7 Support 💥

  • Project Template now supports Python 2.7. The super syntax was applied and pathlib library dependency was removed. #4

Environment specific Settings and Requirements files

  • Pip Requirement files are now split into dev, prod etc
  • Settings files have been split into dev, prod etc. #3

Authentication Workflows

  • Signup: fill a simple signup form and it will log you in automatically. There is no email verification step.
  • Login: login form takes the email address and password. Forget password and Remember me features are also implemented.
  • Logout: takes you back to home page
  • Forgot Password: Sends a password reset mail. Clicking on the password reset prompts for a new password (twice). Then you are automatically logged in.
  • Change Password: The edit profile page has a password change link.

All these are class-based views wrapped around standard Django auth functions for easy customization.

Other Changes

  • URL names are namespaced to respective apps: Refer to "accounts:login" rather than "login". The "home" and "about" urls are not namespaced.
  • Test cases now check only if the pages return a success code rather than the exact view function.
  • Added a console backend for email handling while development.
  • Login and Signup form removed from Home page: Most modern websites take users to seperate pages for login and signup. As Login forms added more features it gets clunky to fit in the navbar.
  • Alerts moved to below navbar.

Separate settings file for dev, production and testing

Is there any design decision restricting from maintaining separate settings file for production and development? I usually have prod.py and dev.py both importing common settings from base.py, which all reside inside a settings module. If there're are no objection, would a PR on this be accepted?

v2.2 ship list

All these changes are present in the https://github.com/arocks/edge/tree/1_8 feature branch

Django 1.8

  • Uses the new TEMPLATES setting
  • Changed url patterns syntax
  • Uses new UUIDField for profile.slug

Debugging & Logging

  • Werkzeug debugger support in debug mode for better error pages
  • Added default django and project loggers

Installation

  • Additional step to copy local.sample.env to local.env
  • Removed local.env from git repo for security reasons.
  • Shows Build Passing status from Travis CI

Documentation

TemplateSyntaxError while logging out from admin panel

Traceback (most recent call last): File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 177, in __call__ response = self.get_response(request) File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 230, in get_response response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 289, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/home/sugam/Downloads/blog_app/blog_app/src/blog_app/wsgi.py", line 24, in null_technical_500_response six.reraise(exc_type, exc_value, tb) File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 174, in get_response response = self.process_exception_by_middleware(e, request) File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 172, in get_response response = response.render() File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/template/response.py", line 160, in render self.content = self.rendered_content File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/template/response.py", line 135, in rendered_content template = self._resolve_template(self.template_name) File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/template/response.py", line 90, in _resolve_template new_template = self.resolve_template(template) File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/template/response.py", line 82, in resolve_template return get_template(template, using=self.using) File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/template/loader.py", line 32, in get_template return engine.get_template(template_name, dirs) File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/template/backends/django.py", line 40, in get_template return Template(self.engine.get_template(template_name, dirs), self) File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/template/engine.py", line 190, in get_template template, origin = self.find_template(template_name, dirs) File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/template/engine.py", line 157, in find_template name, template_dirs=dirs, skip=skip, File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/template/loaders/base.py", line 46, in get_template contents, origin, origin.template_name, self.engine, File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/template/base.py", line 189, in __init__ self.nodelist = self.compile_nodelist() File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/template/base.py", line 231, in compile_nodelist return parser.parse() File "/home/sugam/Downloads/blog_app/venv/lib/python2.7/site-packages/django/template/base.py", line 516, in parse raise self.error(token, e) TemplateSyntaxError: 'url' is not a valid tag or filter in tag library 'future'

TemplateSyntaxError in the admin panel

Clicking Change Password and Logout in the admin panel raises the following error :

Traceback (most recent call last):
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 177, in __call__
    response = self.get_response(request)
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/core/handlers/base.py", line 230, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/core/handlers/base.py", line 289, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
  File "/home/abhijith/Code/NITK-Student-Council-Website/src/Student_Council_Website/wsgi.py", line 24, in null_technical_500_response
    six.reraise(exc_type, exc_value, tb)
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/core/handlers/base.py", line 174, in get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/core/handlers/base.py", line 172, in get_response
    response = response.render()
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/template/response.py", line 160, in render
    self.content = self.rendered_content
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/template/response.py", line 135, in rendered_content
    template = self._resolve_template(self.template_name)
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/template/response.py", line 90, in _resolve_template
    new_template = self.resolve_template(template)
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/template/response.py", line 82, in resolve_template
    return get_template(template, using=self.using)
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/template/loader.py", line 32, in get_template
    return engine.get_template(template_name, dirs)
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/template/backends/django.py", line 40, in get_template
    return Template(self.engine.get_template(template_name, dirs), self)
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/template/engine.py", line 190, in get_template
    template, origin = self.find_template(template_name, dirs)
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/template/engine.py", line 157, in find_template
    name, template_dirs=dirs, skip=skip,
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/template/loaders/base.py", line 46, in get_template
    contents, origin, origin.template_name, self.engine,
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/template/base.py", line 189, in __init__
    self.nodelist = self.compile_nodelist()
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/template/base.py", line 230, in compile_nodelist
    return parser.parse()
  File "/home/abhijith/venv/councilwebsite/lib/python2.7/site-packages/django/template/base.py", line 514, in parse
    raise self.error(token, e)
TemplateSyntaxError: 'url' is not a valid tag or filter in tag library 'future'

I'm using Django 1.9.

debug_toolbar.middleware.DebugToolbarMiddleware is missing

following command
$python manage.py migrate
gives error:

SystemCheckError: System check identified some issues:

ERRORS:
?: debug_toolbar.middleware.DebugToolbarMiddleware is missing from MIDDLEWARE_CLASSES.
    HINT: Add debug_toolbar.middleware.DebugToolbarMiddleware to MIDDLEWARE_CLASSES.

I am not sure where to add this

Add steps to Quickstart guide?

Just installed on Ubuntu 14.04.

For installing virtual environment using venv, I ended up using the guides at:

CodeGhar

and

Chapmandu

After the step:

$ pip install -r requirements.txt 

I think that there should be explicit reference to copying local.sample.env to local.env as without this step an exception gets raised about the SECRET_KEY, which can be mysterious.

Thanks.

Using Edge with MySQL

How can edge be migrated so that we can use MySQL as a backend rather than sqlite?

Secret Key Exception on initial setup

Figured it out, simple mistake.

$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "c:\Python34\lib\site-packages\django\core\management__init__.py", line
338, in execute_from_command_line
utility.execute()
File "c:\Python34\lib\site-packages\django\core\management__init__.py", line
330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "c:\Python34\lib\site-packages\django\core\management__init__.py", line
190, in fetch_command
klass = load_command_class(app_name, subcommand)
File "c:\Python34\lib\site-packages\django\core\management__init__.py", line
40, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "c:\Python34\lib\importlib__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 2254, in _gcd_import
File "", line 2237, in find_and_load
File "", line 2226, in find_and_load_unlocked
File "", line 1200, in load_unlocked
File "", line 1129, in exec
File "", line 1471, in exec_module
File "", line 321, in call_with_frames_removed
File "c:\Python34\lib\site-packages\django\core\management\commands\runserver.
py", line 14, in
from django.db.migrations.executor import MigrationExecutor
File "c:\Python34\lib\site-packages\django\db\migrations\executor.py", line 6,
in
from .loader import MigrationLoader
File "c:\Python34\lib\site-packages\django\db\migrations\loader.py", line 10,
in
from django.db.migrations.recorder import MigrationRecorder
File "c:\Python34\lib\site-packages\django\db\migrations\recorder.py", line 9,
in
class MigrationRecorder(object):
File "c:\Python34\lib\site-packages\django\db\migrations\recorder.py", line 23
, in MigrationRecorder
class Migration(models.Model):
File "c:\Python34\lib\site-packages\django\db\migrations\recorder.py", line 24
, in Migration
app = models.CharField(max_length=255)
File "c:\Python34\lib\site-packages\django\db\models\fields__init
.py", line
1081, in init
super(CharField, self).init(args, *kwargs)
File "c:\Python34\lib\site-packages\django\db\models\fields__init
.py", line
161, in init
self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE
File "c:\Python34\lib\site-packages\django\conf__init
.py", line 48, in ge
tattr

self.setup(name)
File "c:\Python34\lib\site-packages\django\conf__init
.py", line 44, in set
up
self.wrapped = Settings(settings_module)
File "c:\Python34\lib\site-packages\django\conf__init
.py", line 113, in i
nit

raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be
empty.

Duplicate </ul> on lines 77, 78

In Firefox HTML preview, line 78 is throwing up a syntax error with a duplicated </ul> just above the </div><!--/.nav-collapse --> line.

Regards.

Adapted for python27

Hi, very nice setup: simple but powerful. Without a lot of packages, but with the basics needed. Great Job!!.
Nevertheless, I’m still using Python27, so I’ve forked your edge and readapted for Python27. I can share this with you, but I do not know how can you offer both.

using edge in pycharm IDE

I can get Edge up and running from the terminal with python manage.py runserver. Now I am trying to start working on Edge from Pycharm and I get this error:
Traceback (most recent call last):
File "", line 5, in
File "/home/MfM/.pyenv/versions/MfMedge/lib/python3.4/site-packages/django/init.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/MfM/.pyenv/versions/MfMedge/lib/python3.4/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/MfM/.pyenv/versions/MfMedge/lib/python3.4/site-packages/django/apps/config.py", line 86, in create
module = import_module(entry)
File "/home/MfM/.pyenv/versions/3.4.3/lib/python3.4/importlib/init.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 2254, in _gcd_import
File "", line 2237, in _find_and_load
File "", line 2224, in _find_and_load_unlocked
ImportError: No module named 'profiles'

EDIT: when i use src instead of my_proj as project folder the error is gone and I can do runserver, so solved.

Ui suggestion

Hey, i'm wondering if the UI doesn't look a little oldish. I would like to see more "flat" buttons.
i'm not very comfortable with css. thank you.

Error installing requirements

$ pip install -r requirements.txt 
Traceback (most recent call last):
  File "/Users/henrik/Sandbox/edge2/p34env/lib/python3.4/site-packages/pip/_vendor/__init__.py", line 61, in load_module
    __import__(name)
ImportError: No module named 'pip._vendor.requests.packages.urllib3.packages.ssl_match_hostname.CertificateError'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/henrik/Sandbox/edge2/p34env/lib/python3.4/site-packages/pip/_vendor/__init__.py", line 78, in load_module
    __import__(real_name)
ImportError: No module named 'requests'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/henrik/Sandbox/edge2/p34env/bin/pip", line 7, in <module>
    from pip import main
  File "/Users/henrik/Sandbox/edge2/p34env/lib/python3.4/site-packages/pip/__init__.py", line 15, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "/Users/henrik/Sandbox/edge2/p34env/lib/python3.4/site-packages/pip/vcs/mercurial.py", line 11, in <module>
    from pip.download import path_to_url
  File "/Users/henrik/Sandbox/edge2/p34env/lib/python3.4/site-packages/pip/download.py", line 30, in <module>
    from pip._vendor import requests, six
  File "/Users/henrik/Sandbox/edge2/p34env/lib/python3.4/site-packages/pip/_vendor/requests/__init__.py", line 58, in <module>
    from . import utils
  File "/Users/henrik/Sandbox/edge2/p34env/lib/python3.4/site-packages/pip/_vendor/requests/utils.py", line 26, in <module>
    from .compat import parse_http_list as _parse_list_header
  File "/Users/henrik/Sandbox/edge2/p34env/lib/python3.4/site-packages/pip/_vendor/requests/compat.py", line 7, in <module>
    from .packages import chardet
  File "/Users/henrik/Sandbox/edge2/p34env/lib/python3.4/site-packages/pip/_vendor/requests/packages/__init__.py", line 3, in <module>
    from . import urllib3
  File "/Users/henrik/Sandbox/edge2/p34env/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py", line 10, in <module>
    from .connectionpool import (
  File "/Users/henrik/Sandbox/edge2/p34env/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 29, in <module>
    from .packages.ssl_match_hostname import CertificateError
  File "/Users/henrik/Sandbox/edge2/p34env/lib/python3.4/site-packages/pip/_vendor/__init__.py", line 81, in load_module
    raise ImportError("No module named '%s'" % (name,))
ImportError: No module named 'pip._vendor.requests.packages.urllib3.packages.ssl_match_hostname.CertificateError'

Django 1.8 support?

Apologies if this is described somewhere; but I could not see if support is offered for the Django LTS version 1.8?

If it is compatible, would it be possible to add a short note to the Quickstart Guide?

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.