def create_urls(self):
        self._info("    URLs   ")
        self._info("===========")

        # Check if urls.py exists

        if path.exists('{0}{1}/urls.py'.format(self.SCAFFOLD_APPS_DIR, self.app)):

            # If does we need to add urls
            new_urls = ''
            with open("{0}{1}/urls.py".format(self.SCAFFOLD_APPS_DIR, self.app), 'r') as fp:
                for line in fp.readlines():
                    new_urls += line
                    if line in 'urlpatterns':
                        new_urls += URL_EXISTS_CONTENT % {
                            'app': self.app,
                            'model': self.model.lower(),
                        }
            with open("{0}{1}/urls.py".format(self.SCAFFOLD_APPS_DIR, self.app), 'w') as fp:
                fp.write(new_urls)
            self._info('update\t{0}{1}/urls.py'.format(self.SCAFFOLD_APPS_DIR, self.app), 1)
        else:
            with open("{0}{1}/urls.py".format(self.SCAFFOLD_APPS_DIR, self.app), 'w') as fp:
                fp.write(URL_CONTENT % {
                    'app': self.app,
                    'model': self.model.lower(),
                })

            self._info('create\t{0}{1}/urls.py'.format(self.SCAFFOLD_APPS_DIR, self.app), 1)
dataset/ETHPy150Open Tivix/django-common/django_common/scaffold.py/Scaffold.create_urls/swapped operands of `in`