Giter Site home page Giter Site logo

Demo project not work about django-plans HOT 7 OPEN

vuducmanh11 avatar vuducmanh11 commented on July 21, 2024
Demo project not work

from django-plans.

Comments (7)

jkaeske avatar jkaeske commented on July 21, 2024

Same problem here

from django-plans.

jkaeske avatar jkaeske commented on July 21, 2024

python demo/manage.py syncdb is now python demo/manage.py migrate
That was the initial problem.
But even after making it work, the given test1/test1 user/password combination does not seem to work for the login.

from django-plans.

PetrDlouhy avatar PetrDlouhy commented on July 21, 2024

@vuducmanh11 I have corrected the information at least at https://github.com/django-getpaid/django-plans/blob/master/docs/source/installation.rst

@jkaeske Please send a link to where in the documentation is mentioned that user/password for me to be able to fix the documentation problem.
I have found, that the user is part of a initial_data.json fixture. So to load it in to database you should run:

 python manage.py loaddata example/foo/fixtures/initial_data.json

from django-plans.

jkaeske avatar jkaeske commented on July 21, 2024

Shouldn't the command to clone be:
git clone https://github.com/django-getpaid/django-plans.git

instead of:
git clone git://github.com/cypreess/django-plans.git

since the repo is in django-getpaid now?

When trying to execute python manage.py loaddata example/foo/fixtures/initial_data.json the following error occurs, which is weird since the database is completely empty it that point:
Could not load plans.Plan(pk=5): duplicate key value violates unique constraint "plans_plan_default_38b10231_uniq" DETAIL: Key ("default")=(f) already exists.

I got it to work by just creating a new superuser, but the test1/test1 (specified in the sign-in view -> picture below) does not seem to work for me.

image

from django-plans.

jkaeske avatar jkaeske commented on July 21, 2024

Any news on this?
I think the initial error still occurs for the demo project when trying to migrate or start the server
ModuleNotFoundError: No module named 'plans'

from django-plans.

vhsantos avatar vhsantos commented on July 21, 2024

Any news on this? I think the initial error still occurs for the demo project when trying to migrate or start the server ModuleNotFoundError: No module named 'plans'

Hi

you need to install the django-plans

pip install django-plans

from django-plans.

vhsantos avatar vhsantos commented on July 21, 2024

When trying to execute python manage.py loaddata example/foo/fixtures/initial_data.json the following error occurs, which is weird since the database is completely empty it that point: Could not load plans.Plan(pk=5): duplicate key value violates unique constraint "plans_plan_default_38b10231_uniq" DETAIL: Key ("default")=(f) already exists.

There is a error with the initial_data.json because it try to setup differents plans with the "default" fields as "false" and default field is a unique field, so, this generate a error.

edit the example/foo/fixtures/initial_data.json and remove the 4 lines where related to default on plan.plan

--- a/demo/example/foo/fixtures/initial_data.json
+++ b/demo/example/foo/fixtures/initial_data.json
@@ -74,7 +74,6 @@
       "visible": true,
       "description": "Most recommended",
       "created": "2012-05-05T15:36:31Z",
-      "default": false,
       "customized": null,
       "order": 1,
       "name": "Premium"
@@ -88,7 +87,6 @@
       "visible": true,
       "description": "Professional plan",
       "created": "2012-07-12T13:07:23Z",
-      "default": false,
       "customized": null,
       "order": 2,
       "name": "PRO"
@@ -102,7 +100,6 @@
       "visible": true,
       "description": "Custom for test1",
       "created": "2012-07-12T17:33:30.112Z",
-      "default": false,
       "customized": 1,
       "order": 4,
       "name": "Custom"
@@ -116,7 +113,6 @@
       "visible": true,
       "description": "Custom test 2",
       "created": "2012-07-24T12:51:57.438Z",
-      "default": false,
       "customized": 2,
       "order": 5,
       "name": "Custom 2"

from django-plans.

Related Issues (20)

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.