Git Product home page Git Product logo

Comments (3)

leifos avatar leifos commented on September 26, 2024

Hi B.V. I've sorted out the first 3 points.
Hopefully they should be able to work out that the class needs to be
declared before they use it, of course they can look at our repo if they
have major problems.

Re:the tests.. are you using Python 3+ ?

Re the imports of os.environ etc... which file did you add these too?

Thanks
L

On Mon, May 16, 2016 at 3:31 PM, Binary Viking [email protected]
wrote:

Hi,

I am reading through chapter 5, and have a few comments:

Line 332 (chapter5-database-setup.md) with comment: # Print out what we
have added to the user.
should probably be changed to something like # Print out the categories we
have added.

I think lines 337-341 are duplicates of the ones above. But that was also
mentioned in another Issue.

Method in line 349 (chapter5-database-setup.md) does not save the
category, should it. I could make it work without (I guess because of the
foreignkey constraint on the Page class). But when I arrived at the
exercises, it didnt work without adding a c.save(), just before the return.
Rightfully there is a hint to remember, but I wonder if the save should
always be there.

In the screenshot on page 53 (pdf) the ordering of the elements is
different than mine. Not that it matters but might confuse newbies into
thinking they did something wrong.

In the hints for the exercise it is written that you should add a class.
Is it "known" that you have to put the class above the code that registers
the models, or is it worth saying it?

In the rango.tests, I think all the response.content in the assertIn
method calls should be enclosed in str(). I also got a problem with the
response.templates are not populated, but I dont know if that is down to me
missing something or this is a new "feature" in Django 1.9. I also had to
add the following two lines after the imports in the file:

os.environ['DJANGO_SETTINGS_MODULE'] = 'tango_with_django_project.settings'
django.setup()

Hope this helps

Thank you for a great tutorial


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#20

from tango_with_django_19.

kimfalk avatar kimfalk commented on September 26, 2024

I am using python 3.5.1

I added the os.environ etc to the tests.py file.

.Kim

from tango_with_django_19.

leifos avatar leifos commented on September 26, 2024

Hi Kim,

We have just updated the tests.py (
https://github.com/leifos/tango_with_django_19/blob/master/code/tango_with_django_project/rango/tests.py
)

In Python 3, we needed to convert the strings to bytes code (apparently).
So you will see that the strings have a b in front of them. Python 2 will
ignore these, but Python 3 will do the conversion.

If you try these tests now hopefully they should work - there should be no
need to add:
os.environ['DJANGO_SETTINGS_MODULE'] = 'tango_with_django_project.settings'
django.setup()
to the file.

Let me know how you get on.

Cheers
L

On Wed, May 18, 2016 at 1:28 PM, Binary Viking [email protected]
wrote:

I am using python 3.5.1

I added the os.environ etc to the tests.py file.

.Kim


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#20 (comment)

from tango_with_django_19.

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.