mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-21 15:40:58 +00:00
1 line
2.7 KiB
JSON
1 line
2.7 KiB
JSON
[{"user_id": 8490, "stars": [], "topic_id": 12812, "date_created": 1300032398.5171969, "message": "In my views.py I check if a class issubclass of an other class. This works in my views.py but if I run the same code with my tests.py the model gets perpended with the app name.", "group_id": 81, "id": 341413}, {"user_id": 8490, "stars": [], "topic_id": 12812, "date_created": 1300032446.847656, "message": "The model is abstract.", "group_id": 81, "id": 341422}, {"user_id": 8490, "stars": [{"date_created": 1300044059.2996149, "user_id": 141}], "topic_id": 12812, "date_created": 1300032476.935118, "message": "Also asked the same question on SO: http://stackoverflow.com/questions/5290250/django-tests-py-adds-project-name-to-class", "group_id": 81, "id": 341424}, {"user_id": 141, "stars": [], "topic_id": 12812, "date_created": 1300043788.5165761, "message": "if it's mywork/appname/ alongside mywork/website/ (what I usually call the project) there's no way the app will get loaded as website.appname.models etc.", "group_id": 81, "id": 342721}, {"user_id": 141, "stars": [], "topic_id": 12812, "date_created": 1300043419.296195, "message": "@Enome seems like that would mean the python module loading path when you run the tests is preferring to find the app modules through the project directory, instead of having the app package's parent directory itself on the path first.", "group_id": 81, "id": 342655}, {"user_id": 141, "stars": [], "topic_id": 12812, "date_created": 1300044043.0000679, "message": "putting the project dir and its parent dir in the module path always seemed a bit hinky to me. plus I usually err on the side of thinking I'll distribute my app, which if it's installed as a third party package puts it in the module path, not in somebody's project dir, so it had better already work that way.", "group_id": 81, "id": 342779}, {"user_id": 141, "stars": [], "topic_id": 12812, "date_created": 1300043513.463388, "message": "are you running the tests through manage.py? I must confess it's been a while since I tried to use django tests so I'm not sure why that would be.", "group_id": 81, "id": 342665}, {"user_id": 141, "stars": [], "topic_id": 12812, "date_created": 1300043602.447962, "message": "one thing I usually do so I don't have to worry about where the app is loaded from is to put the app outside the project directory and install it as an editable package in the python module path.", "group_id": 81, "id": 342676}, {"user_id": 8490, "stars": [{"date_created": 1300076380.3292911, "user_id": 141}], "topic_id": 12812, "date_created": 1300056398.8930409, "message": "Thanks for the info mark. For now I solved it after reading that you should have skinny views and fat models. So I moved a lot of logic to my models.", "group_id": 81, "id": 343907}] |