Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening link in new tab, leads to white screen #228

Open
itaditya opened this issue Dec 1, 2017 · 7 comments
Open

Opening link in new tab, leads to white screen #228

itaditya opened this issue Dec 1, 2017 · 7 comments

Comments

@itaditya
Copy link
Contributor

itaditya commented Dec 1, 2017

Whenever a user clicks on link, content fades, white screen appears and then new content is displayed - Good

If a user clicks on a link while holding Ctrl key then white screen appears, relevant link opens in separate tab (inactive) but this tab (active one, from which we clicked the link) still has the white screen. - Bad

To fix this we have to avoid the fading animation when user opens a link while holding Ctrl key

@ubarsaiyan
Copy link

I get this error while running python manage.py syncdb and other python manage.py statements.

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/utkarsh/http_200/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
    utility.execute()
  File "/home/utkarsh/http_200/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 303, in execute
    settings.INSTALLED_APPS
  File "/home/utkarsh/http_200/local/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in __getattr__
    self._setup(name)
  File "/home/utkarsh/http_200/local/lib/python2.7/site-packages/django/conf/__init__.py", line 44, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/utkarsh/http_200/local/lib/python2.7/site-packages/django/conf/__init__.py", line 92, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/utkarsh/http_200/HTTP_200/settings.py", line 123, in <module>
    'HOST': config_keys.HOST,   # Or an IP Address that your DB is hosted on
AttributeError: 'module' object has no attribute 'HOST'

@RishabhJain2018
Copy link
Member

Hey @ubarsaiyan, please use HOST as localhost and port as 3306. Let me know if you still have problems in setting up. :-)

@ubarsaiyan
Copy link

@RishabhJain2018 I just ran the command python manage.py syncdb as mentioned in the docs and it threw the above error. Where should I use HOST as localhost and port as 3306.

@RishabhJain2018
Copy link
Member

The error message shows that on line 123 in settings.py you have to add these details.

@ubarsaiyan
Copy link

I'm sorry but I can't set this up. After plugging in the HOST and port in settings.py, it threw error related to EMAIL_HOST and other variables from line 272 onwards in settings.py. After I plug some constant values to them it shows another long error where the last few lines are

File "/home/utkarsh/http_200/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 27, in <module>
    raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

@RishabhJain2018
Copy link
Member

@ubarsaiyan The error says that you are missing some libraries. Please refer https://stackoverflow.com/a/25906181/6099150 in order to install them and then try to run it again.

@ubarsaiyan
Copy link

@RishabhJain2018 After resolving this and many other errors it finally gives the error that there is no database called "connect"

python manage.py syncdb
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
    utility.execute()
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/core/management/base.py", line 390, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/core/management/base.py", line 440, in execute
    self.check()
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/core/management/base.py", line 478, in check
    include_deployment_checks=include_deployment_checks,
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/core/checks/registry.py", line 72, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/core/checks/model_checks.py", line 28, in check_all_models
    errors.extend(model.check(**kwargs))
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/models/base.py", line 1181, in check
    errors.extend(cls._check_fields(**kwargs))
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/models/base.py", line 1258, in _check_fields
    errors.extend(field.check(**kwargs))
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 934, in check
    errors = super(AutoField, self).check(**kwargs)
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 207, in check
    errors.extend(self._check_backend_specific_checks(**kwargs))
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 306, in _check_backend_specific_checks
    return connection.validation.check_field(self, **kwargs)
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/backends/mysql/validation.py", line 18, in check_field
    field_type = field.db_type(connection)
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 614, in db_type
    return connection.data_types[self.get_internal_type()] % data
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/__init__.py", line 36, in __getattr__
    return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/utils/functional.py", line 60, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 196, in data_types
    if self.features.supports_microsecond_precision:
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/utils/functional.py", line 60, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/backends/mysql/features.py", line 52, in supports_microsecond_precision
    return self.connection.mysql_version >= (5, 6, 4) and Database.version_info >= (1, 2, 5)
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/utils/functional.py", line 60, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 371, in mysql_version
    with self.temporary_connection():
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 462, in temporary_connection
    cursor = self.cursor()
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 162, in cursor
    cursor = self.make_debug_cursor(self._cursor())
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 135, in _cursor
    self.ensure_connection()
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
    self.connect()
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/utils.py", line 97, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
    self.connect()
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 119, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 276, in get_new_connection
    conn = Database.connect(**conn_params)
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "/home/utkarsh/Downloads/http_200/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 193, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
django.db.utils.OperationalError: (1049, "Unknown database 'connect'")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants