Git Product home page Git Product logo

pinax-starter-projects's Introduction

Pinax Starter Projects

Join us on Slack

Pinax

Pinax is a collection of Django project templates that we call starter projects as well as apps and themes. This collection can be found at http://pinaxproject.com.

Documentation

The pinax-starter-projects documentation is available at http://pinaxproject.com/pinax/pinax_starter_projects/. The Pinax documentation is available at http://pinaxproject.com/pinax/.

Contribute

See this blog post including a video, or our How to Contribute section for an overview on how contributing to Pinax works. 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 Open Source and Self-Care blog post.

Code of Conduct

In order to foster a kind, inclusive, and harassment-free community, the Pinax Project has a code of conduct, which can be found here http://pinaxproject.com/pinax/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.

Pinax Project Blog and Twitter

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

pinax-starter-projects's People

Contributors

brosner avatar paltman 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

Watchers

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

pinax-starter-projects's Issues

@formatically The starter projects here are `django-admin startproject` templates, so you have to install Django first and pass the starter project as a template.

i have created and installed django in a local environment test space. the folder name is "projects" and ive created a folder inside for creating a web application. ive named the folder "WEB_BROWSER". ive created a class "a" to add some functionality and i tested it by printing hello world from that module. unfortunately im not able to connect to the local server .donno why. someone pls help.
image
image

Git Conflicts when update.sh is executed

Branch zero set up to track remote branch zero from origin.
Switched to a new branch 'zero'
Auto-merging README.md
CONFLICT (content): Merge conflict in README.md
Automatic merge failed; fix conflicts and then commit the result.
README.md: needs merge
error: you need to resolve your current index first

The bootstrap-theme included with pinax-account project breaks collectstatic

The webpack configuration provided with pinax account causes collectstatic to fail on production, specifically with respect to the font files, and the way the font files' URLs are generated.

When I run npm run build, I can see that the generated 'site.css' has font files references in the following manner: /site_media/static/.... This does not play well with collectstatic, which requires relative URLs within the static/dist/ folder to properly collect all the files. I tried quite a few things, but being a noob with webpack, I couldn't fix the process completely.

So I generated the files one last time, and manually replaced these references in the site.css files - removed the /site_media/static/ prefix to make them relative. Now collectstatic works well. I've frozen this config for now, but you can see how painful it can be to do this replacement manually each time.

Last but not least, thanks for the great starter project! It saved me tons and tons of time - no doubt about it. I'm new to Django, and I've quite a good production website almost up in less than 2 weeks!

How do we upgrade a site to a newer Pinax release?

Does Pinax have an easy way to upgrade a site which was based on a previous version?
Or are there plans to support something like that?

I.e. is Pinax careful to maintain backwards-compatibility, or document an upgrade path when compatibility breaks, so it can be versioned and managed like a code library?

Or is it just intended to be a template that we fork from, in which we forever own maintenance, fixing security issues, etc?

I don't see responses to the questions about this on the mailing list. E.g.:

I guess this is related to pinax/pinax#84 but it's hard to even find the right issues thread to ask this question on.

Update documents starter project for outlined changes in pinax-documents

After the following issues are done in pinax-documents, update the starter project with the new release:

HINT: It's probably easier to make all the above updates in context of updating an instance of the starter project. What'd I'd do is create an instance of the project, add it to git and commit. That way you can more easily track the changes you make to it as you update it for the new app.

missing files in fresh installation

related to issue: #49

after installing pinax as described here I started the server and I got the following errors:

[13/Sep/2017 14:11:26] "GET /account/login/ HTTP/1.1" 200 4570
[13/Sep/2017 14:11:26] "GET /site_media/static/css/app.css HTTP/1.1" 404 1668
[13/Sep/2017 14:11:26] "GET /site_media/static/pinax/js/theme.js HTTP/1.1" 304 0
[13/Sep/2017 14:11:26] "GET /site_media/static/js/site.js HTTP/1.1" 404 1665

[Team Wiki] AttributeError: type object 'Membership' has no attribute 'STATE_MEMBER'

I'm on the team-wiki branch and out of the box when you try to join a team, this error shows up:

AttributeError at /t/exampleteam/join/
type object 'Membership' has no attribute 'STATE_MEMBER'
Request Method: POST
Request URL:    http://localhost:8000/t/exampleteam/join/
Django Version: 1.8.5
Exception Type: AttributeError
Exception Value:    
type object 'Membership' has no attribute 'STATE_MEMBER'
Exception Location: .../lib/python2.7/site-packages/teams/views.py in team_join, line 106
Python Version: 2.7.5

account - 404 when going to a @login_required page

When using the account starter app, if I hit a @login_required page I get a 404. It looks like it's trying to redirect me to /accounts/login/ which doesn't exist. Here's how to recreate the bug:

  1. mkvirtualenv testloginurl

  2. pip install pinax-cli

  3. pinax start account testloginurl

  4. cd testloginurl

  5. pip install -r requirements.txt

  6. ./manage.py migrate

  7. ./manage.py loaddata sites

  8. add this import to testloginurl/urls.py: from django.contrib.auth.decorators import login_required

  9. add this line to urlpatterns in testloginurl/urls.py: url(r"^protected$", login_required(TemplateView.as_view(template_name="homepage.html")), name="protected"),

  10. ./manage.py runserver

  11. Go to http://localhost:8000/protected <- See the 404

required node version is 10.X

If you try to use pinax with any node version > 10 you get a gyp error compiling node-sass during npm install. Locking the node version to 10X fixes the issue.

Come up with some new starter projects

We need the following in at least one starter project. It can be adding to an existing starter project or coming up with one or more other starter projects as long as we get each of these apps in at least one released starter project:

Let's either get some suggestions going on where to add these to current starter projects or design some that can incorporate mixes of these apps.

Two sets of pinax-waitinglist Templates

We've got two sets of different pinax-waitinglist _list_signup.html and _success.html templates: one in the starter project and one in pinax-templates. Is this by design? Would be great to just have in one place for consistency, imo.

See also: pinax/pinax-templates#9

https://github.com/pinax/pinax-starter-projects/tree/waitinglist/project_name/templates/pinax/waitinglist
https://github.com/pinax/pinax-templates/blob/master/pinax/templates/templates/pinax/waitinglist

'AnonymousUser' object has no attribute '_meta'

Hello!

I've just found the Pinax ecosystem, it looks great. Thank you all for your work.

I've created the 'account' starter project, and when I sign-up for a new account after I click the submit button, I get the following error: 'AnonymousUser' object has no attribute '_meta'. Please help me understand what I am missing, as the traceback seems to be entirely within the Django Code.

Thanks,
Evan

..
TRACEBACK:
Environment:
Django Version: 2.2.4
Python Version: 3.7.3

Request Method: POST
Request URL: http://localhost:8000/account/signup/

Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.staticfiles',
'bootstrapform',
'pinax.templates',
'account',
'pinax.eventlog',
'pinax.webanalytics',
'newapp']
Installed Middleware:
['django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']

Traceback:

File "newapp/lib/python3.7/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)

File "newapp/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
115. response = self.process_exception_by_middleware(e, request)

File "newapp/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
113. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "newapp/lib/python3.7/site-packages/django/views/generic/base.py" in view
71. return self.dispatch(request, *args, **kwargs)

File "newapp/lib/python3.7/site-packages/django/utils/decorators.py" in _wrapper
45. return bound_method(*args, **kwargs)

File "newapp/lib/python3.7/site-packages/django/views/decorators/debug.py" in sensitive_post_parameters_wrapper
76. return view(request, *args, **kwargs)

File "newapp/lib/python3.7/site-packages/django/utils/decorators.py" in _wrapper
45. return bound_method(*args, **kwargs)

File "newapp/lib/python3.7/site-packages/django/utils/decorators.py" in _wrapped_view
142. response = view_func(request, *args, **kwargs)

File "newapp/lib/python3.7/site-packages/django/utils/decorators.py" in _wrapper
45. return bound_method(*args, **kwargs)

File "newapp/lib/python3.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
44. response = view_func(request, *args, **kwargs)

File "newapp/lib/python3.7/site-packages/account/views.py" in dispatch
151. return super(SignupView, self).dispatch(request, *args, **kwargs)

File "newapp/lib/python3.7/site-packages/django/views/generic/base.py" in dispatch
97. return handler(request, *args, **kwargs)

File "newapp/lib/python3.7/site-packages/account/views.py" in post
177. return super(SignupView, self).post(*args, **kwargs)

File "newapp/lib/python3.7/site-packages/django/views/generic/edit.py" in post
142. return self.form_valid(form)

File "newapp/lib/python3.7/site-packages/account/views.py" in form_valid
243. self.login_user()

File "newapp/lib/python3.7/site-packages/account/views.py" in login_user
293. auth.login(self.request, user)

File "newapp/lib/python3.7/site-packages/django/contrib/auth/init.py" in login
126. request.session[SESSION_KEY] = user._meta.pk.value_to_string(user)

File "newapp/lib/python3.7/site-packages/django/utils/functional.py" in inner
257. return func(self._wrapped, *args)

Exception Type: AttributeError at /account/signup/
Exception Value: 'AnonymousUser' object has no attribute '_meta'

New Installation Process Not Smooth

When running pipenv install, a new Pipfile is created in the root directory. If you then install a Pinax starter project, the project directory will also contain a Pipfile. If you try to use the --location flag to install the Pinax starter project in the root directory, the Pipfile already exists, which creates a conflict. I have tried several ways to get the dev version of team-wiki project up and running easily, but couldn't do it. I was not able to use pipenv install a second time to install the dependencies. I had to install some manually.

One possible solution, given by a member of our Slack, is to set the pipenv variable 'PIPENV_NO_INHERIT' in the environment parent directory so that it uses the Pipfile within the current directory. Poetry has also been mentioned but it appears that this replaces Pipfile.

Should _account_bar.html exist in pinax-blog starter?

The pinax starter for pinax-blog contains some html files. I guess that suggests users to customise their own _account_bar, _footer, _scripts, _styles. But I think it's a bad idea to put them there holding place, because these html files can be found by TEMPLATE_LOADERS ahead of those in pinax_theme_bootstrap directory, then affect all pages.
This is what I know about starter for pinax-blog, I don't know if this is common among other starters.

Updates to make to Pinax Starter Projects for new release

Debugging Pinax Starter Projects right now (using Project Account). Making a list of some things that need to be done to update to be in line with new release:

  • Update requirements.txt versions due to ImportError: cannot import name 'six' from 'django.utils'
  • In site_base.html change {% load staticfiles %} to {% load static %} (deprecated in Django 2.1 and removed in Django 3.0)

TypeError after typing "./migrate.py migrate" with Static project/Python 3.6/Django 1.11.7

$ ./manage.py migrate
Traceback (most recent call last):
  File "./manage.py", line 12, in <module>
    execute_from_command_line(sys.argv)
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/site-packages/django/core/management/base.py", line 327, in execute
    self.check()
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/site-packages/django/core/management/base.py", line 359, in check
    include_deployment_checks=include_deployment_checks,
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 62, in _run_checks
    issues.extend(super(Command, self)._run_checks(**kwargs))
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/site-packages/django/core/management/base.py", line 346, in _run_checks
    return checks.run_checks(**kwargs)
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/site-packages/django/core/checks/registry.py", line 81, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/site-packages/django/core/checks/urls.py", line 16, in check_url_config
    return check_resolver(resolver)
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/site-packages/django/core/checks/urls.py", line 26, in check_resolver
    return check_method()
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/site-packages/django/urls/resolvers.py", line 254, in check
    for pattern in self.url_patterns:
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/site-packages/django/utils/functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/site-packages/django/urls/resolvers.py", line 405, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/site-packages/django/utils/functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/site-packages/django/urls/resolvers.py", line 398, in urlconf_module
    return import_module(self.urlconf_name)
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/user/Desktop/workspace/pinax_test/mystatic/mystatic/urls.py", line 5, in <module>
    url(r"^(.*)$", "mystatic.views.static_view"),
  File "/home/user/.virtualenvs/pinax_test/lib/python3.6/site-packages/django/conf/urls/__init__.py", line 85, in url
    raise TypeError('view must be a callable or a list/tuple in the case of include().')
TypeError: view must be a callable or a list/tuple in the case of include().

remove uglifyjs in build:js

This must be a hold over from previous versions of package.json. uglifyjs is not needed in build:js as it is already called in the optimize scripts.

This also fixes a bug when browserify fails the script will now exit correctly and not succeed. That left me with a bad deploy to production. Oops.

ImportError: No module named '{{ project_name }}'

I downloaded the account starter project, however I can not get past this error. Has anybody seen this error before?

(pinaxstarter) Tylers-MacBook-Pro:pinax-starter-projects-account Tyler$ ./manage.py migrate
Traceback (most recent call last):
  File "./manage.py", line 12, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/Tyler/Desktop/pinax-starter-projects-account/pinaxstarter/lib/python3.4/site-packages/django/core/management/__init__.py", line 363, in execute_from_command_line
    utility.execute()
  File "/Users/Tyler/Desktop/pinax-starter-projects-account/pinaxstarter/lib/python3.4/site-packages/django/core/management/__init__.py", line 307, in execute
    settings.INSTALLED_APPS
  File "/Users/Tyler/Desktop/pinax-starter-projects-account/pinaxstarter/lib/python3.4/site-packages/django/conf/__init__.py", line 56, in __getattr__
    self._setup(name)
  File "/Users/Tyler/Desktop/pinax-starter-projects-account/pinaxstarter/lib/python3.4/site-packages/django/conf/__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "/Users/Tyler/Desktop/pinax-starter-projects-account/pinaxstarter/lib/python3.4/site-packages/django/conf/__init__.py", line 110, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/Users/Tyler/Desktop/pinax-starter-projects-account/pinaxstarter/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2212, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2224, in _find_and_load_unlocked
ImportError: No module named '{{ project_name }}'

Blog Index Page Design

I think the blog index page design could use an update. It doesn't have the same polished look that the regular Pinax project homepages have imo. I do think it would look better if the bottom weren't cut off at least. Is the footer excluded for a reason?
blog-homepage

flex justification of headings applied too aggressively in stylesheet

_body.scss includes:

// Right align links inside a header
h1, h2, h3, h4 {
  display: flex;
  justify-content: space-between;
  a {
      margin-top: auto;
      @extend .btn;
      @extend .btn-sm;
  }
}

Unfortunately, this doesn't just right align link inside a header but forces all children of an h* to be justified (e.g. <h1><span>A</span> <span>B</span></h1>)

I don't think we can assume this should be the default case for all h* so I think we just have to live with this being triggered by a specific class on the h*.

Create starter project branch for pinax-images

This will take the form of a multi-user image review project called Cloudspotter. The basic idea is composing and viewing collections of cloud images. (Yes, "clouds" == the water vapor atmospheric phenomena.) Images will be contained in collections organized by cloud type, i.e. "cumulus", "nimbus", "unknown".

Authenticated user will be able to create new collections, and add/delete images from their collection(s).
Authenticated user will be able to view list of their own collections.

As the project is built out, user will be able to view all other Cloudspotter users and their collections. Users can "like" a collection. Users will be notified when someone has added an image or a collection. Users can invite other people to Cloudspotter.

This project will incorporate pinax-images, pinax-images-panel, pinax-likes, pinax-announcements, pinax-notifications, pinax-invitations and perhaps pinax-testimonials.

This issue addresses part of #26.

missing files in fresh installation

after installing pinax as described here I started the server and I got the following errors:

[13/Sep/2017 14:11:26] "GET /account/login/ HTTP/1.1" 200 4570
[13/Sep/2017 14:11:26] "GET /site_media/static/css/app.css HTTP/1.1" 404 1668
[13/Sep/2017 14:11:26] "GET /site_media/static/pinax/js/theme.js HTTP/1.1" 304 0
[13/Sep/2017 14:11:26] "GET /site_media/static/js/site.js HTTP/1.1" 404 1665

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.