Git Product home page Git Product logo

Comments (19)

regit avatar regit commented on July 16, 2024

Hi,

It is supposed to be fixed by f8c5b84. From line number it seems you are not using the latest version. Can you check this please ?

from scirius.

drew1kun avatar drew1kun commented on July 16, 2024

sorry could you tell me how can I check? I'm new to git...

from scirius.

drew1kun avatar drew1kun commented on July 16, 2024

'About' tab says v1.1

from scirius.

regit avatar regit commented on July 16, 2024

If you have run a 'git clone' to create the directory of sicirius, the run 'git pull' to update the source

from scirius.

drew1kun avatar drew1kun commented on July 16, 2024

Well after doing:

$ cd /usr/local/var/www/scirius
$ git pull

instead of "login page" I'm getting this:
1
I've tried it two times and seems like your last commits broke everything... lol
Now I can't even use it))

from scirius.

regit avatar regit commented on July 16, 2024

It did not break anything, you just need to migrate the db via django utilities :)

It will be direct with older django. On newer, a few commands may be needed.

from scirius.

drew1kun avatar drew1kun commented on July 16, 2024

but it didn't say to run "migrate"…

$ /usr/local/bin/python /usr/local/var/www/scirius/manage.py runserver
/usr/local/lib/python2.7/site-packages/django_tables2/tables.py:175: RemovedInDjango19Warning: SortedDict is deprecated and will be removed in Django 1.9.
  attrs["base_columns"] = SortedDict(parent_columns)

/usr/local/lib/python2.7/site-packages/django_tables2/tables.py:197: RemovedInDjango19Warning: SortedDict is deprecated and will be removed in Django 1.9.
  attrs["base_columns"].update(SortedDict(cols))

/usr/local/lib/python2.7/site-packages/django_tables2/tables.py:175: RemovedInDjango19Warning: SortedDict is deprecated and will be removed in Django 1.9.
  attrs["base_columns"] = SortedDict(parent_columns)

/usr/local/lib/python2.7/site-packages/django_tables2/tables.py:197: RemovedInDjango19Warning: SortedDict is deprecated and will be removed in Django 1.9.
  attrs["base_columns"].update(SortedDict(cols))

Performing system checks...

System check identified no issues (0 silenced).
August 05, 2015 - 17:35:58
Django version 1.8, using settings 'scirius.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

from scirius.

regit avatar regit commented on July 16, 2024

Yes, git pull and now it should say it ;)

from scirius.

drew1kun avatar drew1kun commented on July 16, 2024

I ran migrate:

$ python manage.py migrate

and then restarted the server - got the same error in browser and this in the shell:

Quit the server with CONTROL-C.
[05/Aug/2015 17:40:40]"GET / HTTP/1.1" 302 0
/usr/local/lib/python2.7/site-packages/django_tables2/tables.py:178: RemovedInDjango19Warning: SortedDict is deprecated and will be removed in Django 1.9.
  extra = SortedDict()

[05/Aug/2015 17:40:40]"GET /accounts/login/ HTTP/1.1" 500 176421

from scirius.

regit avatar regit commented on July 16, 2024

For info, till now only south based migration were commited. I've now added the migration for django > 1.7.

from scirius.

regit avatar regit commented on July 16, 2024

During migrate you should see something like:

eric@ice-age2:~/git/stamus/scirius (master)$ python manage.py migrate
Operations to perform:
  Synchronize unmigrated apps: suricata, accounts, django_tables2, bootstrap3
  Apply all migrations: admin, rules, contenttypes, auth, sessions
Synchronizing apps without migrations:
  Creating tables...
  Installing custom SQL...
  Installing indexes...
Running migrations:
  Applying rules.0039_auto_20150805_1737... OK

from scirius.

drew1kun avatar drew1kun commented on July 16, 2024

so what should I do now?

$ git pull && python manage.py migrate

?

from scirius.

regit avatar regit commented on July 16, 2024

yes, update the code, then run migration

from scirius.

drew1kun avatar drew1kun commented on July 16, 2024

done it and still got:

You have unapplied migrations; your app may not work properly until they are applied.
Run 'python manage.py migrate' to apply them.

August 05, 2015 - 17:48:46
Django version 1.8, using settings 'scirius.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

done it two times

from scirius.

drew1kun avatar drew1kun commented on July 16, 2024

migration output:

$ python manage.py migrate
/usr/local/lib/python2.7/site-packages/django_tables2/tables.py:175: RemovedInDjango19Warning: SortedDict is deprecated and will be removed in Django 1.9.
  attrs["base_columns"] = SortedDict(parent_columns)

/usr/local/lib/python2.7/site-packages/django_tables2/tables.py:197: RemovedInDjango19Warning: SortedDict is deprecated and will be removed in Django 1.9.
  attrs["base_columns"].update(SortedDict(cols))

Operations to perform:
  Synchronize unmigrated apps: staticfiles, suricata, messages, accounts, django_tables2, revproxy, bootstrap3
  Apply all migrations: admin, rules, contenttypes, auth, sessions
Synchronizing apps without migrations:
  Creating tables...
    Running deferred SQL...
  Installing custom SQL...
Running migrations:
  Rendering model states... DONE
  Applying rules.0001_initial...Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
    utility.execute()
  File "/usr/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 "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 390, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 441, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 221, in handle
    executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 110, in migrate
    self.apply_migration(states[migration], migration, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 147, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/migration.py", line 115, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/operations/models.py", line 59, in database_forwards
    schema_editor.create_model(model)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 282, in create_model
    self.execute(sql, params or None)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 107, in execute
    cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 79, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line 97, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 62, in execute
    return self.cursor.execute(sql)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 316, in execute
    return Database.Cursor.execute(self, query)
django.db.utils.OperationalError: table "rules_category" already exists

from scirius.

regit avatar regit commented on July 16, 2024

OK, looks like starting from scratch (remove db file) would be the easier method as migration were not included for django > 1.6 :/

from scirius.

drew1kun avatar drew1kun commented on July 16, 2024

could you please be more precise what should I do step by step

from scirius.

regit avatar regit commented on July 16, 2024

This procedure will loose your data:

rm db.sqlite3
python manage.py syncdb
python manage.py migrate

from scirius.

drew1kun avatar drew1kun commented on July 16, 2024

Ok. Seems like everything works now, so this should be closed but there are some troubles with VRT and Community rules and not only them... I'll explain here #38

from scirius.

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.