Coder Social home page Coder Social logo

pinax's Introduction

Pinax

Table of Contents

About Pinax

Pinax is an open-source platform built on the Django Web Framework. It is an ecosystem of reusable Django apps, themes, and starter project templates. This collection can be found at http://pinaxproject.com.

Overview

This repository contains documentation for the Pinax project.

Documentation

Updating Online Documentation

The docs live online at http://pinaxproject.com/pinax/.

After a pull request is merged, checkout your local master branch:

git checkout master

Pull the update into your local master branch:

git pull origin master

Push the update live to gh-pages:

mkdocs gh-deploy

Publishing a Distribution

projects.json

distribution.json

Change Log

Contribute

For an overview on how contributing to Pinax works read this blog post and watch the included video, or read our How to Contribute section. For concrete contribution ideas, please see our Ways to Contribute/What We Need Help With section.

In case of any questions we recommend you join our Pinax Slack team and ping us there instead of creating an issue on GitHub. Creating issues on GitHub is of course also valid but we are usually able to help you faster if you ping us in Slack.

We also highly recommend reading our blog post on Open Source and Self-Care.

Code of Conduct

In order to foster a kind, inclusive, and harassment-free community, the Pinax Project has a code of conduct. We ask you to treat everyone as a smart human programmer that shares an interest in Python, Django, and Pinax with you.

Connect with Pinax

For updates and news regarding the Pinax Project, please follow us on Twitter @pinaxproject and check out our Pinax Project blog.

License

Copyright (c) 2012-2018 James Tauber and contributors under the MIT license.

pinax's People

Contributors

bmihelac avatar brosner avatar d0ugal avatar dnx avatar dstufft avatar endlesslupita avatar ethankent avatar gitter-badger avatar grahamu avatar iepathos avatar issackelly avatar jacobwegner avatar jezdez avatar jpic avatar jtauber avatar julien-duponchelle avatar katherinemichel avatar lukeman avatar micheledallatorre avatar mroswell avatar nduthoit avatar nealmcb avatar paltman avatar shoshseiden avatar tubaman avatar winhamwr avatar yashj0511 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  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

pinax's Issues

Consider django-pipeline over webpack

I'm opening this issue to begin a discussion of the standard/default staticfiles build process for pinax. It is a subject worth discussing and reaching consensus on.

I have used django-pipeline for a few years and have only recently begun working with webpack. I have yet to find any advantages to using webpack over pipeline and I am interested to hear from webpack users what those may be. I'll list my experiences (from a pipeline user perspective) to start the discussion.

  1. Django documents that reusable app developers may bundle their assets in the static folder, but Webpack cannot find static files that are bundled this way (particularly external apps installed in site-packages but also for internal apps as well). This is a limitation of webpack perforing its static builds outside of the django.contrib.staticfiles ecosystem. The pinax build process hasn't worked around this limitation of webpack yet..
  2. When a static file is updated and saved, a quick refresh of the browser works as expected when developing locally with pipeline in DEBUG mode. With webpack, npm run watch must be running in another terminal process. On the project I am using webpack with there is a delay between saving and when the compilation is complete. The delay is noticeable, a few seconds and I have to wait until I can refresh to see the changes. Probably the speed could be improved with webpack if it didn't minimize and compress locally.
  3. To handle cache invalidation, webpack relies on changing a value in a Django template (which needs to be committed to git) . Pipeline uses the staticfiles cache manifest, so this is transparent when caching is enabled via STATICFILES_STORAGE.
  4. Pipeline uses the Django standard of collectstatic to build the files for production, webpack uses npm build media.
  5. Pipeline is a Django app, so developers can reference familiar documentation on readthedocs to learn how it works and for reference when issues arise. Pipeline has matured a lot over the last year, many people use it and the development is active. I haven't hit any troubling issues or limitations since upgrading from 1.3 to 1.4 and the current version is 1.5.5. It may simply be my lack of use with webpack, but I struggled getting started because It wasn't clear to me what the recommended way to use it was.
  6. With either pipeline or webpack, staticfiles may be collected, minified and compressed locally or on the server. If local, the changes need to be commited and pushed to the server.
  7. Webpack handles the installation of npm dependencies such as LESS, CoffeScript, CSSMin, etc. Pipeline expects those libraries to be installed on the system in advance.
  8. Pipeline works with Jinja, but it also allows for javascript templates: http://django-pipeline.readthedocs.org/en/latest/templates.html#using-it-with-your-favorite-template-library It also works with custom storage backends, S3 Cloudfiles, etc. It also supports embedding fonts and images directly in compiled css, rewriting urls in css files to full relative path and wrapping all javascript output in an anonymous function to avoid namespace pollution.
  9. Pipeline allows a user to define configuration in settings.py and with the addition of django-bower, js dependencies may also be listed in settings.py. There is more configuration code to maintain for webpack. A pipeline configuration looks like this::
BOWER_PATH = "/usr/lib/node_modules/bower/bin/bower"
BOWER_COMPONENTS_ROOT = "bower_components"
BOWER_INSTALLED_APPS = [
    "bootstrap#3.3.4",
    "font-awesome#4.4.0",
    "html5shiv",  # always the latest
    "jquery#2.1.4",
]
PIPELINE_ENABLED = True
PIPELINE_SASS_BINARY = "sassc"
STATICFILES_STORAGE = "pipeline.storage.PipelineCachedStorage"
PIPELINE_COMPILERS = (
    "pipeline.compilers.less.LessCompiler",
    "pipeline.compilers.coffee.CoffeeScriptCompiler",
    "pipeline.compilers.sass.SASSCompiler",
)
PIPELINE_CSS_COMPRESSOR = "pipeline.compressors.cssmin.CSSMinCompressor"
PIPELINE_JS_COMPRESSOR = "pipeline.compressors.uglifyjs.UglifyJSCompressor"
PIPELINE_CSS = {
    "styles": {
        "source_filenames": (
            "bootstrap/less/bootstrap.less",
            "font-awesome/less/font-awesome.less",
            "less/mysite.less",
        ),
        "output_filename": "styles.css",
    },
}
PIPELINE_JS = {
    "scripts": {
        "source_filenames": (
            "jquery/dist/jquery.js",
            "jquery-file-upload/js/vendor/jquery.ui.widget.js",
            "jquery-file-upload/js/jquery.iframe-transport.js",
            "jquery-file-upload/js/jquery.fileupload.js",
            "django_summernote/summernote.min.js",
            "js/mysite.js",
        ),
        "output_filename": "scripts.js",
    },
}

webpack like this:
package.json

{
  "repository": {
    "type": "git",
    "url": "https://github.com/myorg/myproject.git"
  },
  "scripts": {
    "build": "./node_modules/.bin/webpack --config=static/webpack.config.js -p",
    "watch": "./node_modules/.bin/webpack --config=static/webpack.config.js -w"
  },
  "dependencies": {
    "bootstrap": "^3.3.5",
    "css-loader": "^0.15.6",
    "font-awesome": "^4.4.0",
    "jquery": "^2.1.4",
    "less": "^2.5.1",
    "less-loader": "^2.2.0",
    "webpack": "^1.10.5"
  }
}

webpack.config.js

var ExtractTextPlugin = require("extract-text-webpack-plugin");
var HtmlWebpackPlugin = require("html-webpack-plugin");
var path = require("path");
var webpack = require("webpack");
var projectTemplatesRoot = "../../mysite/templates/";

module.exports = {
    cache: true,
    context: path.resolve(__dirname, "src"),
    entry: {
        app: "./js/main.js"
    },
    output: {
        path: path.resolve(__dirname, "dist"),
        filename: "js/site.js?[hash]",
        publicPath: "/site_media/static"
    },
    module: {
        loaders: [
            {
                test: /\.(gif|png|ico|jpg|svg)$/,
                include: [
                    path.resolve(__dirname, "src/images")
                ],
                loader: "file-loader?name=/images/[name].[ext]"
            },
            { test: /\.less$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader!less-loader") },
            {
                test: /\.(woff|woff2|ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
                include: [
                    path.resolve(__dirname, "src/fonts"),
                    path.resolve(__dirname, "../node_modules")
                ],
                loader: "file-loader?name=/fonts/[name].[ext]?[hash]"
            },
            { test: /\.jsx?$/, loader: "babel-loader", query: {compact: false} },
        ]
    },
    resolve: {
        extensions: ["", ".js", ".jsx"],
    },
    plugins: [
        new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
        new ExtractTextPlugin("css/site.css?[hash]"),
        new HtmlWebpackPlugin({
            filename: projectTemplatesRoot + "_styles.html",
            templateContent: function(templateParams, compilation) {
                var link = "";
                for (var css in templateParams.htmlWebpackPlugin.files.css) {
                    link += "<link href='" + templateParams.htmlWebpackPlugin.files.css[css]  + "' rel='stylesheet' />\n"
                }
                return link;
            }
        }),
        new HtmlWebpackPlugin({
            filename: projectTemplatesRoot + "_scripts.html",
            templateContent: function(templateParams, compilation) {
                var script = "";
                for (var js in templateParams.htmlWebpackPlugin.files.js) {
                    script += "<script src='" + templateParams.htmlWebpackPlugin.files.js[js]  + "'></script>\n"
                }
                return script;
            }
        })
    ]
};

main.js

require("../less/site.less");

window.jQuery = window.$ = require("jquery");

require("bootstrap");
require("./theme");

\\ site js follows

An advantage that webpack may have is that it could be more easily discarded in favor of another solution. In python some options are django-pipeline or django-compressor and in javascript options include webpack, browserify and grunt/gulp. Maybe the solution is for pinax to support both the js way and the python way.

django strict version pin issues

New user, initial first impressions...

pip install pinax-cli
pinax start account mysite

loads django-1.11.4

cd mysite
pip install -r requirements.txt

uninstalls django-1.11.4 and installs v1.9.8

My solution was to unpin them, but that may not be a production solution for you.

FWIW, and this is strictly just my opinion, worth every cent you paid for it....

Doing strict pip freeze pinning is often suboptimal -- we should take advantage of semantic versioning to pick up the latest "fix" release of a package that will still maintain the API we're relying on.

For example given django's promises: django>=1.11.4,<1.12 or django>=1.11.4,<2.0 is almost always going to do the right thing for the user.

Checklist for 16.04 candidate apps

Update URLs to use namespaces

Five changes must be made.

  1. Change the URL names themselves, removing "pinax" or the application name (i.e. "announcements") and using a <model>_<action> name pattern.
  2. Update the urlname references to include the namespace. These are typically found used by reverse(), redirect(), and {% url ... %}.
  3. Update the project documentation to reference the namespace.
  4. Update associated Pinax Starter Projects project_name/urls.py to use the namespace.
  5. Update the project tests/urls.py to include the namespace:

Here is an example of messages/urls.py:

from django.conf.urls import url

from . import views

urlpatterns = [
    url(r"^thread/(?P<pk>\d+)/delete/$", views.ThreadDeleteView.as_view(),
        name="thread_delete"),
    ...
]

New URL reference example:

reverse("pinax_messages:thread_delete", pk=thread_id)

Project tests/urls.py example:

from django.conf.urls import include, url


urlpatterns = [
    url(r"^", include("pinax.messages.urls", namespace="pinax_messages")),
]

Update views from function-based to Django generic Class-Based-Views (CBV)

In some cases this requires updating form inheritance to use forms.ModelForm.

Make generic CBV-based class names consistent

Let's make our Pinax view class names consistent across apps using the following convention:

class <model name><action>View():

For example, use class AnnouncementCreateView(). Do not use CreateAnnouncement or AnnouncementCreate.

Explicitly specify view templates

If a view uses Django's generic class-based views and requires a template, specify the template explicitly because Django's template loader will use an incorrect path.

For instance, pinax-messages needs a "thread_confirm_delete.html" template. If you do not specify the template path in views.ThreadDeleteView(), the template loader attempts to find pinax_messages/thread_confirm_delete.html by default. This does not work; the path you should explicitly use is pinax/messages/thread_confirm_delete.html.

Update testing and Travis CI configuration

Both .travis.yml and tox.ini should only include Django versions 1.8, 1.9, and master.

Relocate templates

Move template files out of app "templates" directory to pinax-theme-bootstrap.

Rename templatetags file(s)

Templatetag files should follow the naming convention, pinax_<appname>_tags.py. For instance, pinax_testimonials_tags.py.

Create initial migration

Create an initial migration if the application has concrete models and no "migrations" directory with 0001_initial.py.

Create private beta tutorial

Private Beta Tutorial

  • put templates for waiting list, cohorts and kaleo in PTB

Step 1. (pinax-project-waitinglist)

  • waiting list

Step 2.

  • accounts with closed signup
  • cohorts UI / staff-driven invites

Step 3.

  • user-driven invites

ValueError

(Using Virtualenv, Python2.6) I got this error while installting:

Traceback (most recent call last):
File "manage.py", line 8, in
startup.run()
File "/var/lib/stickshift/525592544382ec622f0000a5/app-root/data/641659/juga_site/juga_site/startup.py", line 20, in run
autoload(["receivers"])
File "/var/lib/stickshift/525592544382ec622f0000a5/app-root/data/641659/juga_site/juga_site/startup.py", line 13, in autoload
import_module("{}.{}".format(app, submodule))
ValueError: zero length field name in format

Describe how a new user can install a new application

So far the Quick Start section in our Pinax documentation only shows how you can create a new project based on pinax-project-account. Pinax projects are just Django projects and Pinax apps are just Django apps so you can add any Django app or any Pinax app to a Pinax starter project. We think it would be nice to show our users how to add one or two Pinax apps to their project after they got pinax-project-account up and running with the help of our Quick Start.
We'd like to give someone who has never contributed to open source before a chance to tackle this task in order to make their first OSS contribution. If you have contributed to open source before, please let someone else take this one. Below you can find some guidelines and instructions on what you need to do:

  • Read this blog post (especially the "how to make a pull request section") to learn what you need to to do set everything up.
  • Watch this video and read this blog post (especially the "adding apps to starter projects" section) to learn more about pinax-project-account (what apps it consists of etc.) and how you can add apps to a Pinax project (or really any Django project).
  • Open the forked pinax/pinax repository in your text editor, then open the docs folder, and finally open the quick_start.md file.
  • At the very bottom of the file you should see this "TODO: Then add one more app". You can remove this line and add your description on how to add an app to a Pinax starter project. Don't forget to save your changes. Please note that we use Markdown syntax for our documentation.
  • Let's see what our changes look like. To do so type mkdocs serve into your terminal. Make sure you cd'd into the folder in which you copied your forked repository first. Then type 127.0.0.1:8000/ into your browser and you should see the Pinax documentation including the changes you made. Awesome!
  • Press the ctrl+c keys in order to stop the server, then follow the instructions ("how to make a pull request" section) here to learn how to push your changes to your forked repository on GitHub and make a pull request.
  • Celebrate! You are now an open source contributor! πŸŽ‰

One of us will then review your pull request and if everything looks great we will merge it (you will receive an email notification from GitHub). If you need to make additional changes, we will comment on your pull request and help you figure out the next steps. Don't worry, this is totally normal and doesn't mean that your pull request isn't awesome. Sometimes it just happens that a few things need to be tweaked.

If you have any questions or need help, comment on this issue and mention me @ossanna16 (I will receive a notification this way). One of us will then reply and help you. It's even better if you would join our Pinax Slack channel (it's free). Someone is always there to help and answer any questions. If you'd like to reach me personally mention me @anna in our Pinax project Slack channel. Please remember that there are no stupid questions. We want to help you succeed and want to help you make your first open source contribution. 😊

Create a Pinax Dashboard

It is very hard to stay on top of being as responsive as we'd like when there are 60+ repos full of issues and pull requests. Yes, some are more active than others, but all issues and pull requests should receive the same level of attention and response.

We can do better but need some tooling to help things not fall between the cracks.

Part of helping us being responsive, I propose we track different metrics of responsiveness and publicly display them. In addition, displaying metrics over time will be useful in seeing how we are improving.

I envision the landing page being aggregate metrics with one or two levels of drill down (e.g. click on the "# of open issues without a response" metric to see a list of issues across all of Pinax that you can then easily click on to go see the details on GitHub).

Metrics worth tracking (as a strawman proposal):

Point in Time

  • of issues without a response

  • of pull requests without a response

  • of issues needing a response (as determined by it's open and last response was by someone other people who have direct push rights, or maybe better, by the original poster)

  • of pull requests needing a response

  • of open issues

  • of open pull requests

Vanity Metrics (because why not)
  • of total stars

  • of total watchers

Interval

  • of issues closed in past 30 days

  • of pull requests merged in past 30 days

  • of issues opened in past 30 days

  • of pull requests received in past 30 days

  • of contributors in past 30 days

These can be a grid of decent sized divs to be "stat boxes" of a sort.

Then we can also reveal a time-series graph showing how these metrics have performed on a monthly basis over the past 12-24 months, by clicking on each stat box. Clicking on a details link for any stat box dealing with issues or pull requests should show a table listing those issues or pull requests with GitHub links to their details.

We could host this dashboard at something like http://dashboard.pinaxproject.com/

I propose the creation of #pinax-karma. Upvotes, Downvotes and karma

A upvote, downvote and karma system like reddit and Stackoverflow.

A per model upvote, downvote like pinax-likes.

And per user Karma of the sum of total upvotes and downvotes a user has

People building forums with upvotes and downvotes, commenting system with upvotes and downvotes, Stack Overflow, reddit, hackernews etc clones can use these

Maybe optional options for adding additional karma for things like badges

But I don't know if it's better to keep upvotes and downvotes as a separate app instead of having upvotes and downvotes in the karma app

Maybe have #pinax-UpvotesandDownvotes app and then a #pinax-karma which intergrates the #pinax-UpvotesandDownvotes and adds karma points to users

I think #pinax-likes and #pinax-ratings can be modified to add up and downvotes

Pinax reddit clone

ImportError

Hi,
I'm very interested in the project and while I was testing it I has a problem when I wanted to make a pinax zero new app

The code error

(pinax)amisca@amisca-laptop pinax$ pinax start zero mysite
Traceback (most recent call last):
  File "/home/amisca/Envs/pinax/bin/pinax", line 9, in <module>
    load_entry_point('pinax-cli==0.4', 'console_scripts', 'pinax')()
  File "/home/amisca/Envs/pinax/local/lib/python2.7/site-packages/pkg_resources.py", line 356, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/amisca/Envs/pinax/local/lib/python2.7/site-packages/pkg_resources.py", line 2431, in load_entry_point
    return ep.load()
  File "/home/amisca/Envs/pinax/local/lib/python2.7/site-packages/pkg_resources.py", line 2152, in load
    raise ImportError("%r has no %r attribute" % (entry, attr))
ImportError: <module 'pinax' from '/home/amisca/Envs/pinax/local/lib/python2.7/site-packages/pinax/__init__.pyc'> has no 'main' attribute

My pip freeze:

Django==1.9.1
argparse==1.2.1
click==5.1
django-appconf==1.0.1
django-bootstrap-form==3.2
django-user-accounts==1.3.1
jsonfield==1.0.3
metron==1.3.7
pinax-cli==0.4
pinax-eventlog==1.1.1
pinax-theme-bootstrap==7.2.0
pytz==2015.7
requests==2.7.0
six==1.10.0
wsgiref==0.1.2

Start Hosting Monthly Pinax Hangouts

We should leverage Google Hangouts to host a monthly time to take 30-60 minutes and cover some aspect of Pinax with a live audience that can interrupt and ask questions and contribute to the conversation.

We should record these so we can post them on the Pinax blog.

I propose the 3rd Thursday of every month at Noon US/Central time, for lack of a better recurring calendar time.

@ossanna16 had mentioned using Google Hangout on Air and https://tlk.io for help chat.

Where is a good place for Pinax discussions?

Hi. I've been through the blog and the docs and can't find a reference for a good place to have a discussion on Pinax projects. Have I missed something or maybe we could reference a place to discuss or ask about Pinax projects

Python 3 support

Does Pinax app support Python 3.x.
Can one use higher versions of django like 1.5 or 1.6beta with Pinax apps.

Document Release Process

We should document our release process.

  • how to make a release
  • see #113 for app requirements
  • consistent tagging
  • CHANGELOG
  • up-to-date AUTHORS
  • ensure tests are passing

fix django_compressor requirements entry

Ok, this is a small issue, but quite annoying. I was writing a bash script to diff the current requirements files and "pip freeze" output, the full script is as follow:

diff <(cat requirements/base.txt requirements/project.txt | egrep -v "^#|^--|^$" | sort) <(pip freeze|sort)

One of the diff is this:

6c8
< django_compressor==1.1.2

---
> django-compressor==1.1.2

that is, django_compressor's entry in pinax's requirements/base.txt is not the same as what pip freeze's outputs.

This should be quick to fix wouldn't it?

start account fails with tarfile.ReadError on PythonAnywhere

Originally reported at https://www.pythonanywhere.com/forums/topic/9094/

Traceback (most recent call last):
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/bin/pinax", line 11, in <module>
    sys.exit(main())
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/click/core.py", line 700, in __call__
    return self.main(*args, **kwargs)
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/click/core.py", line 680, in main
    rv = self.invoke(ctx)
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/click/core.py", line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/click/core.py", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/click/core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/click/decorators.py", line 63, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/click/core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/pcli.py", line 98, in start
    start_project(projects[project], name, dev)
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/pcli.py", line 35, in start_project
    call_command("startproject", name, **kwargs)
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 130, in c
all_command
    return command.execute(*args, **defaults)
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/django/core/management/base.py", line 345, in execute
    output = self.handle(*args, **options)
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/django/core/management/commands/startproject.py", line 34, in handle
    super(Command, self).handle('project', project_name, target, **options)
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/django/core/management/templates.py", line 126, in handle
    base_subdir)
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/django/core/management/templates.py", line 213, in handle_template
    return self.extract(absolute_path)
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/django/core/management/templates.py", line 314, in extract
    archive.extract(filename, tempdir)
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/django/utils/archive.py", line 49, in extract
    with Archive(path) as archive:
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/django/utils/archive.py", line 58, in __init__
    self._archive = self._archive_cls(file)(file)
  File "/home/username/.virtualenvs/tmp-9e86ffb6d8936815/local/lib/python2.7/site-packages/django/utils/archive.py", line 137, in __init__
    self._archive = tarfile.open(file)
  File "/usr/lib/python2.7/tarfile.py", line 1665, in open
    raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully

May be due to the limitations of a PythonAnywhere free account, the most likely of which is the Internet access being restricted to a whitelist -- does the pinax start account command try to access any external sites (that aren't on that list)?

Wrong STATICFILES_DIR ?

STATICFILES_DIR has os.path.join(PACKAGE_ROOT, "static").

PACKAGE_ROOT is project_name/project_name.

Why is there project_name/static directory in the default template ?

Proposal: pinax command line

Purpose

Having a pinax command line utility will help users more easily get started with Pinax starter projects, allow for better discovery, and enable us to provide a richer bootstrapping experience.

Commands

projects start

There could very well be many commands, but initially, we'll focus on just a single command and that is starting a project:

pip install pinax
pinax projects start account

or:

pip install pinax
pinax projects start

Then you get a list of available projects with a short one line description and the ability to pick one.

Project Registry

The project registry should be JSON or YAML hosted either in the pinax/pinax repo or the pinax/pinax-starter-projects repo and start initially with the following format:

{
    "zero": {
        "url": "https://github.com/pinax/pinax-starter-projects/zipball/zero",
        "args": "-n webpack.config.js",
    },
    "account": {
        "url": "https://github.com/pinax/pinax-starter-projects/zipball/account",
        "args": "-n webpack.config.js",
    },
}

We can eventually add more things like a requirements dict to each project, other variables to setup, etc. that extend the Django project template feature.

apps start
projects list
apps list

Lots of tests are failing on initial `basic` installation

While on the zero project everything runs smooth, on basic setup there are failing tests right after initializing the project. It's kind of hard to be sure in your project when there are lots of fails and errors in the tests, right?

$ python manage.py test
Creating test database for alias 'default'...
...................................................................................................F....................................................................................................................................................................E............EEE..EEE.EE...FE.............................................................F....
======================================================================
ERROR: test_authenticated_password_change_view (pinax.apps.account.tests.test_change_password.ChangePasswordTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/pinax/apps/account/tests/test_change_password.py", line 43, in test_authenticated_password_change_view
    response = self.client.post(reverse("acct_login"), data)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/test/client.py", line 449, in post
    response = super(Client, self).post(path, data=data, content_type=content_type, **extra)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/test/client.py", line 259, in post
    return self.request(**r)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/pinax/apps/account/views.py", line 73, in login
    fallback_url = reverse(settings.LOGIN_REDIRECT_URLNAME)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 391, in reverse
    *args, **kwargs)))
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 337, in reverse
    "arguments '%s' not found." % (lookup_view_s, args, kwargs))
NoReverseMatch: Reverse for 'what_next' with arguments '()' and keyword arguments '{}' not found.

======================================================================
ERROR: testRecoverAccountBadUsername (django_openid.tests.auth_tests.AccountRecoveryTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/tests/auth_tests.py", line 132, in testRecoverAccountBadUsername
    response = self.client.get('/openid/recover/')
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/test/client.py", line 439, in get
    response = super(Client, self).get(path, data=data, **extra)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/test/client.py", line 241, in get
    return self.request(**r)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 136, in get_response
    response = response.render()
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/response.py", line 97, in render
    self._set_content(self.rendered_content)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/response.py", line 73, in rendered_content
    template = self.resolve_template(self.template_name)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/response.py", line 51, in resolve_template
    return loader.get_template(template)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/loader.py", line 157, in get_template
    template, origin = find_template(template_name)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/loader.py", line 138, in find_template
    raise TemplateDoesNotExist(name)
TemplateDoesNotExist: django_openid/recover.html

======================================================================
ERROR: testRecoverAccountByUsername (django_openid.tests.auth_tests.AccountRecoveryTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/tests/auth_tests.py", line 147, in testRecoverAccountByUsername
    'recover': 'noopenids'
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/test/client.py", line 449, in post
    response = super(Client, self).post(path, data=data, content_type=content_type, **extra)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/test/client.py", line 259, in post
    return self.request(**r)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/consumer.py", line 157, in __call__
    return router(request, path_override = rest_of_url)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/utils.py", line 67, in __call__
    return self.handle(request, path_override)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/utils.py", line 64, in handle
    return callback(request, *callback_args, **callback_kwargs)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/auth.py", line 307, in do_recover
    self.send_recovery_email(request, user)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/auth.py", line 391, in send_recovery_email
    'theuser': user,
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/response.py", line 113, in _get_content
    raise ContentNotRenderedError('The response content must be rendered before it can be accessed.')
ContentNotRenderedError: The response content must be rendered before it can be accessed.

======================================================================
ERROR: testLoginWithPassword (django_openid.tests.auth_tests.AuthTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/tests/auth_tests.py", line 58, in testLoginWithPassword
    'password': 'incorrect-password',
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/test/client.py", line 449, in post
    response = super(Client, self).post(path, data=data, content_type=content_type, **extra)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/test/client.py", line 259, in post
    return self.request(**r)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 136, in get_response
    response = response.render()
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/response.py", line 97, in render
    self._set_content(self.rendered_content)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/response.py", line 73, in rendered_content
    template = self.resolve_template(self.template_name)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/response.py", line 51, in resolve_template
    return loader.get_template(template)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/loader.py", line 157, in get_template
    template, origin = find_template(template_name)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/loader.py", line 138, in find_template
    raise TemplateDoesNotExist(name)
TemplateDoesNotExist: django_openid/login_plus_password.html

======================================================================
ERROR: testLoginCancel (django_openid.tests.consumer_tests.ConsumerTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/tests/consumer_tests.py", line 83, in testLoginCancel
    openid_consumer.request_cancelled_message in response.content
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/response.py", line 113, in _get_content
    raise ContentNotRenderedError('The response content must be rendered before it can be accessed.')
ContentNotRenderedError: The response content must be rendered before it can be accessed.

======================================================================
ERROR: testLoginDiscoverFail (django_openid.tests.consumer_tests.ConsumerTest)
E.g. the user enters an invalid URL
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/tests/consumer_tests.py", line 42, in testLoginDiscoverFail
    self.assert_(openid_consumer.openid_invalid_message in str(response))
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/http/__init__.py", line 515, in __str__
    + '\n\n' + self.content
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/response.py", line 113, in _get_content
    raise ContentNotRenderedError('The response content must be rendered before it can be accessed.')
ContentNotRenderedError: The response content must be rendered before it can be accessed.

======================================================================
ERROR: testLoginFailure (django_openid.tests.consumer_tests.ConsumerTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/tests/consumer_tests.py", line 95, in testLoginFailure
    self.assert_('Failure: ' in response.content)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/response.py", line 113, in _get_content
    raise ContentNotRenderedError('The response content must be rendered before it can be accessed.')
ContentNotRenderedError: The response content must be rendered before it can be accessed.

======================================================================
ERROR: testLoginSetupNeeded (django_openid.tests.consumer_tests.ConsumerTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/tests/consumer_tests.py", line 106, in testLoginSetupNeeded
    self.assert_(openid_consumer.setup_needed_message in response.content)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/response.py", line 113, in _get_content
    raise ContentNotRenderedError('The response content must be rendered before it can be accessed.')
ContentNotRenderedError: The response content must be rendered before it can be accessed.

======================================================================
ERROR: testLoginSuccess (django_openid.tests.consumer_tests.ConsumerTest)
Simulate a successful login
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/tests/consumer_tests.py", line 55, in testLoginSuccess
    'You logged in as http://simonwillison.net/' in response.content
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/response.py", line 113, in _get_content
    raise ContentNotRenderedError('The response content must be rendered before it can be accessed.')
ContentNotRenderedError: The response content must be rendered before it can be accessed.

======================================================================
ERROR: testRegisterWithPassword (django_openid.tests.auth_tests.RegistrationTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/tests/auth_tests.py", line 95, in testRegisterWithPassword
    'password2': 'password',
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/test/client.py", line 449, in post
    response = super(Client, self).post(path, data=data, content_type=content_type, **extra)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/test/client.py", line 259, in post
    return self.request(**r)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/consumer.py", line 157, in __call__
    return router(request, path_override = rest_of_url)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/utils.py", line 67, in __call__
    return self.handle(request, path_override)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/utils.py", line 64, in handle
    return callback(request, *callback_args, **callback_kwargs)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/registration.py", line 155, in do_register
    return self.confirm_email_step(request, user)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/registration.py", line 182, in confirm_email_step
    self.send_confirm_email(request, user)
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/registration.py", line 202, in send_confirm_email
    'newuser': user,
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/template/response.py", line 113, in _get_content
    raise ContentNotRenderedError('The response content must be rendered before it can be accessed.')
ContentNotRenderedError: The response content must be rendered before it can be accessed.

======================================================================
FAIL: test_shortcut_view (django.contrib.contenttypes.tests.ContentTypesTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/contrib/contenttypes/tests.py", line 70, in test_shortcut_view
    response._headers.get("location")[1])
AssertionError: u'http://example.com/users/john/' != 'http://example.com/profiles/profile/john/'

======================================================================
FAIL: testInvalidRegistrationWithPassword (django_openid.tests.auth_tests.RegistrationTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django_openid/tests/auth_tests.py", line 84, in testInvalidRegistrationWithPassword
    'User with this Username already exists' in str(response)
AssertionError: False is not true

======================================================================
FAIL: tests (pagination)
Doctest: pagination.tests
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/django/test/_doctest.py", line 2180, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for pagination.tests
  File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/pagination/tests.py", line 0, in tests

----------------------------------------------------------------------
File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/pagination/tests.py", line 65, in pagination.tests
Failed example:
    t.render(Context({'var': range(21), 'request': HttpRequest()}))
Expected:
    u'\n\n<div class="pagination">...
Got:
    u'\n\n\n<div class="pagination">\n    <ul>\n        \n            <li class="prev disabled"><a>\u2190 Previous</a></li>\n        \n        \n            \n                <li class="active"><a href="?page=1">1</a></li>\n            \n        \n            \n                <li class=""><a href="?page=2">2</a></li>\n            \n        \n            \n                <li class=""><a href="?page=3">3</a></li>\n            \n        \n            \n                <li class=""><a href="?page=4">4</a></li>\n            \n        \n            \n                <li class="disabled"><a href="#">\u2026</a></li>\n            \n        \n            \n                <li class=""><a href="?page=8">8</a></li>\n            \n        \n            \n                <li class=""><a href="?page=9">9</a></li>\n            \n        \n            \n                <li class=""><a href="?page=10">10</a></li>\n            \n        \n            \n                <li class=""><a href="?page=11">11</a></li>\n            \n        \n        \n            <li class="next"><a href="?page=2">Next \u2192</a></li>\n        \n    </ul>\n</div>\n'
----------------------------------------------------------------------
File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/pagination/tests.py", line 69, in pagination.tests
Failed example:
    t.render(Context({'var': range(21), 'request': HttpRequest()}))
Expected:
    u'\n\n<div class="pagination">...
Got:
    u'\n\n\n<div class="pagination">\n    <ul>\n        \n            <li class="prev disabled"><a>\u2190 Previous</a></li>\n        \n        \n            \n                <li class="active"><a href="?page=1">1</a></li>\n            \n        \n            \n                <li class=""><a href="?page=2">2</a></li>\n            \n        \n        \n            <li class="next"><a href="?page=2">Next \u2192</a></li>\n        \n    </ul>\n</div>\n'
----------------------------------------------------------------------
File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/pagination/tests.py", line 72, in pagination.tests
Failed example:
    t.render(Context({'var': range(21), 'request': HttpRequest()}))
Expected:
    u'\n\n<div class="pagination">...
Got:
    u'\n\n\n<div class="pagination">\n    <ul>\n        \n            <li class="prev disabled"><a>\u2190 Previous</a></li>\n        \n        \n            \n                <li class="active"><a href="?page=1">1</a></li>\n            \n        \n            \n                <li class=""><a href="?page=2">2</a></li>\n            \n        \n        \n            <li class="next"><a href="?page=2">Next \u2192</a></li>\n        \n    </ul>\n</div>\n'
----------------------------------------------------------------------
File "/home/kiril/workspace/pinax_advanced_text/env/local/lib/python2.7/site-packages/pagination/tests.py", line 75, in pagination.tests
Failed example:
    t.render(Context({'var': range(21), 'by': 20, 'request': HttpRequest()}))
Expected:
    u'\n\n<div class="pagination">...
Got:
    u'\n\n\n<div class="pagination">\n    <ul>\n        \n            <li class="prev disabled"><a>\u2190 Previous</a></li>\n        \n        \n            \n                <li class="active"><a href="?page=1">1</a></li>\n            \n        \n            \n                <li class=""><a href="?page=2">2</a></li>\n            \n        \n        \n            <li class="next"><a href="?page=2">Next \u2192</a></li>\n        \n    </ul>\n</div>\n'


----------------------------------------------------------------------
Ran 359 tests in 11.712s

FAILED (failures=3, errors=10)
Destroying test database for alias 'default'...

Fix custom base project path

Hey,
I've tried to use pinax with a custom-made base project using this command inside my virtualenv :

$ pinax-admin setup_project -b ../path/to/custom/project newprojectname

Ending with this exception :

Traceback (most recent call last):
  File "/home/vash/workspace/test/droid/droidware/ortodellacultura/bin/pinax-admin", line 8, in <module>
    load_entry_point('Pinax==0.9b1.dev10', 'console_scripts', 'pinax-admin')()
  File "/home/vash/workspace/test/droid/droidware/ortodellacultura/lib/python2.6/site-packages/pinax/core/management/__init__.py", line 105, in execute_from_command_line
    runner.execute()
  File "/home/vash/workspace/test/droid/droidware/ortodellacultura/lib/python2.6/site-packages/pinax/core/management/__init__.py", line 94, in execute
    self.loader.load(command).run_from_argv(argv)
  File "/home/vash/workspace/test/droid/droidware/ortodellacultura/lib/python2.6/site-packages/pinax/core/management/base.py", line 45, in run_from_argv
    self.handle(*args, **options.__dict__)
  File "/home/vash/workspace/test/droid/droidware/ortodellacultura/lib/python2.6/site-packages/pinax/core/management/commands/setup_project.py", line 66, in handle
    self.setup_project(args[0], options["base"], options)
  File "/home/vash/workspace/test/droid/droidware/ortodellacultura/lib/python2.6/site-packages/pinax/core/management/commands/setup_project.py", line 130, in setup_project
    installer = ProjectInstaller(source, destination, project_name, user_project_name)
UnboundLocalError: local variable 'source' referenced before assignment

So I managed to get pinax working using :

# pinax/core/management/commands/setup_project.py (lines 112-127)

# check the base value (we could later be much smarter about it and
# allow repos and such)
if base in [p.replace("_project", "") for p in self.project_list()]:
    project_name = "%s_project" % base
    source = os.path.join(PROJECTS_DIR, project_name)
else:
    if not os.path.exists(base):
        raise CommandError(
            "Project template does not exist the given "
            "path: %s" % base
        )
    else:
        project_name = os.path.basename(base)
        source = base #just add this line

installer = ProjectInstaller(source, destination, project_name, user_project_name)

Basically in this particular case the source variable was not passed to the ProjectInstaller() method

Proposal for Pinax Distribution Versioning

Unlike monolithic open source projects like Django or Python, Pinax is collection of separately developed components with complex dependency relationships. In many respects, it's more akin to something like Ubuntu than a project like Django.

I'm proposing we do (potentially time-based) releases of "Pinax distributions", so there'd be (to borrow from Ubuntu's numbering) a "Pinax 16.4" which would just be a certain combination of apps, themes, and starter projects.

This would enable us to have a support policy, a minimum bar for documentation and localization, etc that just applies at the "distribution" level, not the individual app level.

Work could freely happen on apps, themes, and starter projects at any time but there'd be some documented process and timeline (TBD) to snapshot particular versions of each of these components to become a versioned Pinax distribution.

Add simple style tweak how tos

  • where to go to edit LESS and how to rebuild CSS
  • where to go to edit footer
  • how to change the site name in the top left
  • how to change the top left to be a logo
  • how to add left nav bar

Release Pinax Templates as a package on https://www.npmjs.com/

We have had pinax-theme-bootstrap for quite sometime now, only recently separating out the vendored statics. These leaves a few bits and pieces but mostly just a set of templates, mostly using bootstrap class names.

I'd like to propose we start a pinax-theme project that does the following:

  • full semantic markup
  • templates for most, if not all, pinax apps that require templates
  • release pinax-theme-bootstrap packages on https://www.npmjs.com/ that contain the LESS/SASS that maps our semantic markup to bootstrap rules
  • the pinax-theme-bootstrap npmjs package should also contain any specific rules and js that are now shipped as part of the Python pinax-theme-bootstrap package
  • provide more than one base.html template so as to ship with alternate layout options

This should make it eas(y|ier) to create npmjs packages for Bootstrap 4, Foundation and any other framework. In addition, we can layer in additional npmjs themes for adding more style on top of default style from the framework.

ImportError after Creating First Project - 'module pinax has no main attribue'

Greetings,

I'm new to pinax and I think it's awesome. The following report could be a result of me not knowing what I'm doing. But if it's a bug, then I wanted to give as detailed report as possible.

What happened

  1. Followed instructions to start new starter project. I've tried with several starters, eg, documents, wiki, account, etc.

  2. This works fine, eg, pinax start --dev documents mysite completes and I can start server and view site.

  3. All subsequent use of the pinax command fails with the following trace:

    Traceback (most recent call last):
    File "/home/nick/dev/virtenvs/pindocs/bin/pinax", line 9, in <module>
        load_entry_point('pinax-cli==0.4', 'console_scripts', 'pinax')()
    File "/home/nick/dev/virtenvs/pindocs/local/lib/python2.7/site-packages/pkg_resources.py", line 353, in load_entry_point
        return get_distribution(dist).load_entry_point(group, name)
    File "/home/nick/dev/virtenvs/pindocs/local/lib/python2.7/site-packages/pkg_resources.py", line 2321, in load_entry_point
        return ep.load()
    File "/home/nick/dev/virtenvs/pindocs/local/lib/python2.7/site-packages/pkg_resources.py", line 2053, in load
        raise ImportError("%r has no %r attribute" % (entry,attr))
    ImportError: <module 'pinax' from '/home/nick/dev/virtenvs/pindocs/local/lib/python2.7/site-packages/pinax/__init__.pyc'> has no 'main' attribute
    

What should've happened

I would expect the pinax command to still work, eg, be able to list projects with pinax projects.

Steps to reproduce

Versions: Ubuntu 14.04, Python 2.7.6, virtualenv 1.11.4, pinax 0.4:

lssitepackages | grep pinax_cli
pinax_cli-0.4-py2.7.egg-info

These are the steps I used to get the trace:

mkvirtualenv mysite
pip install pinax-cli
pinax start account mysite
cd mysite
chmod +x manage.py
pip install -r requirements.txt
./manage.py migrate
./manage.py loaddata sites
./manage.py runserver

Server is running, site visible at http://localhost:8000.

Now run pinax projects. Error should appear.

Document static build pipeline in quickstart

The quick start doesn't even mention anything about npm install. While it may not be the place for showing customization of the starter project, it would be good to get people up and running with a single build of the static files.

Proposal for Pinax Commit Dashboard

The dashboard should include:

  • combined view of issues across projects
  • commit stream across projects
  • repo organization
  • contributor highlights (who is active on what projects?)
  • pull request aging
  • issue aging
  • comment stream (show commit comments, issue comments, pull request comments, all in a single stream)
  • labelling of issues, including skill/expertise level (beginner friendly, intermediate, advanced)

Update Pinax Quick Start and pinax/pinax README with new pinax-cli way of starting projects

Right now the Quick Start in the Pinax documentation and the README of this repository still show the "manual" way of starting Pinax starter projects. Since there's now an easier way to do that with the Pinax Command Line (pinax-cli) both of these documents need to be updated. We'd like to give someone who has never contributed to open source before a chance to tackle this task in order to make their first OSS contribution. If you have contributed to open source before, please let someone else take this one. Below you can find some guidelines and instructions on what you need to do:

  • Read this blog post (especially the "how to make a pull request section") to learn what you need to to do set everything up.
  • Watch this video and read this blog post to learn how @brosner uses pinax-cli to install pinax-project-blog.
  • Open the forked pinax/pinax repository in your text editor and update the "Getting Started" section in the README.md file with the new pinax-cli way of starting projects. Don't forget to save your changes. Please note that we use Markdown syntax for our documentation.
  • In your text editor open the docs folder of the pinax/pinax repository and create a new file (right click "New File") named quick_start_manual.md.
  • Open the quick_start.md file, copy the content, and paste it into your new quick_start_manual.md file. At the very top of the file you should change the title "Quick Start" to "Quick Start Manual", then save the file.
  • Go back to the quick_start.md file and update the file the same way you updated the README.md file earlier to showcase the new pinax-cli way of starting projects.
  • We want people to know that there is also a "manual way" of starting a project, not only the pinax-cli way so you should add one sentence to the document letting people know that if they are interested in learning about the manual way of installing a Pinax project, they should visit the "Quick Start Manual" page of the documentation. It would be good if you would link to this page from the quick_start.md page. Don't forget to save your changes.
  • Since you created a new file, you need to add this file to the navigation bar of the documentation. To do that, open the file named mkdocs.yml and add the following line - ["quick_start_manual.md", "Introduction", "Quick Start Manual"] right underneath this line - ["quick_start.md", "Introduction", "Quick Start"]. Save your changes.
  • You also need to add the new file to the table of contents in the documentation. To do that open the index.md file and add the following line * [Quick Start Manaual](quick_start_manual.md) right underneath the following line * [Quick Start](quick_start.md). Don't forget to save your changes.
  • Let's see what our changes look like. To do so type mkdocs serve into your terminal. Make sure you cd'd into the folder in which you copied your forked repository first. Then type 127.0.0.1:8000/ into your browser and you should see the Pinax documentation including the changes you made. Awesome!
  • Press the ctrl+c keys in order to stop the server, then follow the instructions ("how to make a pull request" section) here to learn how to push your changes to your forked repository on GitHub and make a pull request.
  • Celebrate! You are now an open source contributor! πŸŽ‰

One of us will then review your pull request and if everything looks great we will merge it (you will receive an email notification from GitHub). If you need to make additional changes, we will comment on your pull request and help you figure out the next steps. Don't worry, this is totally normal and doesn't mean that your pull request isn't awesome. Sometimes it just happens that a few things need to be tweaked.

If you have any questions or need help, comment on this issue and mention me @ossanna16 (I will receive a notification this way). One of us will then reply and help you. It's even better if you would join our Pinax Slack channel (it's free). Someone is always there to help and answer any questions. If you'd like to reach me personally mention me @anna in our Pinax project Slack channel. Please remember that there are no stupid questions. We want to help you succeed and want to help you make your first open source contribution. 😊

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.