-
Notifications
You must be signed in to change notification settings - Fork 12
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
Cannot create gloss for fresh install #1270
Comments
I'll look at it. It won't work to start with the "original" signbank db since the migrations have points where they can't migrate from the previous. (That has to do with the populate methods that relied on old fields, then mapped the data to new fields, then removed the old fields. Namely the "name_english" etc fields. So the migrations can't be applied.) I will check it out. In case there is something off about signbank.db (initial database) It could be possible to create an initial db by copying what create test db does. The test database removes content from tables. The tables that remain are necessary to have data in them. We still have the container signbank-test that has not been filled in with anything. |
i think a new initial database might be needed. |
I changed the site name in the "sites" in the admin. |
In the admin, I added a page But there are no menus. |
Maybe make a create or insert sql with the required contents for the tables? |
I added the necessary permissions to the user. Since that didn't work, I created a group Editor and added permissions there, too. It works to add feedback (by typing in the page in the url by hand, since there are no menus) https://signbank4.vlaamsegebarentaal.be/feedback/overview/ It looks like in our Admin python code we did not implement methods for adding glosses or lemmas. (There are no Normally, because creating a gloss involves lots of steps, also some fields need to be filled in before it can be saved. |
The settings file is not properly defined. I typed in this url (by hand since there are no pages): https://signbank4.vlaamsegebarentaal.be/signs/search/ It complains here:
this setting does not exist. Here,
|
For adding a new sign this way: https://signbank4.vlaamsegebarentaal.be/signs/add/ you get this error
For creation of a new signbank, I was able to modify the site "example.com" in the admin. |
https://signbank4.vlaamsegebarentaal.be/dictionary/test_abstract_machine/1/ url to create a gloss (this is an API testing url) with the dataset id 1 (VGT) |
https://signbank4.vlaamsegebarentaal.be/datasets/select/ I created a group Dataset_Manager to view this page: https://signbank4.vlaamsegebarentaal.be/datasets/VGT (That should not require manager group but maybe because other things are missing control flow showed it was necessary. Oh wait, the group needs to exist, but the user does not need to be in it. Let me fix that.) |
@Woseseltops where did the initial database come from? The specific interface languages need to be specified in various places. The database model translation fields (i.e., name_en, name_nl, etc) are created by Django based on the settings. |
Hello @susanodd I was the one that set up https://signbank4.vlaamsegebarentaal.be/ The goal was to move away from an old (~2018) fork of signbank by starting "a new site" from scratch, a clean database and the head of the master branch. -- Using WSL Ubuntu 22.04 Run following commands: Remove 'typing-extensions==3.10.0.0' from requirements.txt Run following command: Copy signbank/settings/server_specific/default.py to signbank/settings/server_specific/server_specific.py Create writable/database/signbank.db (Empty 0kb) Run following commands: |
We're up to Python 3.12 now. For us, it wasn't possible to migrate from the "pre-field-choice" model and the "pre-model-translation" because a "populate" migration was needed to copy the old values to the new fields, before removing the old fields. Since fields were removed, the migrations can't migrate from original databases anymore. If possible you would need to export your original database to an SQL file that could then be used to fill a new database. (With some extra programming to do that.) I browsed at your installation and it looked like you didn't want to show English as a language? (If this is too jargon-sounding, @Woseseltops can also add some comments.) We have a "create test db" script that runs as a command in the virtual environment. I'm not sure what order in which to do things. To make a "starting non-empty" database into which you could import your own glosses, etc. we would need to remove more things from the test database. (For example, all the languages except English and possible Dutch, plus the users. The groups are needed to run signbank, but not the user permissions.) If you can get your virtual environment working, you could try to use the create_test_db command on it. You also need to keep English. This is rambling a bit. See if you can somehow create a test database from your original database. This gives an idea of what tables are needed in order to run. The Field Choices are needed but your old Field Choices table won't work. (So even if you can create an initial database from your old one, it still needs some more changes. Django can generate migrations. so if you can get it running with an old database, then Django can generate migrations.) We can also try to create an initial database. (@Woseseltops has done this before, but I think it was missing some things.) Most import, you need to export your original glosses data in order to be able to import it. Can you identify with show_migrations on your original database where exactly it started from? Internally there should be some Django tables that include the names of the migrations. The above is needed to make sure whatever you start with (without actual glosses), will run. As I write this, I'm guessing that it won't run yet. |
@ROMAN5 I understood it that you had an old signbank from 2018. Is that true? Do you already have data that you want to put in a new signbank? @Woseseltops did you create an empty starting database ever? I know we can make one from the create_test_db but more things need to be removed from it in order for it to be minimal. |
No. As I have mentioned that we wanted "a new site" from scratch, a clean database and the head of the master branch. |
Okay. I was distracted by the 2018. We have ansible scripts for creating a signbank. I will work on making a trimmed down empty database that does not have the interface translations. Ideally, we would make something that can make a fresh install of an empty signbank. |
@ROMAN5 are any of you currently users of signbank? I needed to leave the User table existing in order to login myself in order to delete things by hand. There is a bug in Guardian and most users it does not work to delete them in the Admin. Are there any other users to retain? I've deleted all Datasets except for VGT, tstMH, NGT. (But all glosses are deleted in these datasets.) |
This isn't working at all. For some reason Guardian isn't working correctly. The shorthand Django view:
the variable
instead of what is being tested in the template:
So 'view_permission' does not match "view_dataset" [This is with a simplified "empty" database, where all the content has been removed except for the "non-data" Django management parts] This example is in the "Select Datasets" template. I changed the code to:
and it works. It looks like maybe a mismatch of the guardian version or something. |
Modified permissions. Command to empty tables, command to remove users except for developers.
I modified all the permission tests to match what worked. It seems to be running okay now with an empty database. I made a command to empty the tables. I need to "automate" the other adjustments I made to the database. I removed the datasets except for NGT, VGT, and tstMH. |
Put permissions on database back to what they were.
@ROMAN5 I have the empty database running on |
@susanodd OK, Thank you for letting me know. I will wait for empty database when it is ready for me. |
Fixed permissions that were causing to fail.
@ROMAN5 do you want the glosses of VGT to stay? There are 16928 glosses. |
Here, the dataset VGT https://signbank.cls.ru.nl/datasets/VGT You need to be logged in to see it. |
@susanodd Three years ago is too old. As I have mentioned that we need a new db that working with latest version of Global Signbank (problem was "cannot create gloss for fresh install"). We are installing on a new website. New database and the latest version of Global Signbank -- ready? Thanks. |
The glosses in VGT are just data. The question is whether you want the VGT table to be erased in the new empty database. The empty database is being created from the most recent signbank database. All of the models will be up to date. The VGT data consists of all the Annotations and Lemmas. These are according to the newest models. I ask because empty is empty. |
I don't have a strong preference as the plan is to start from zero. We just need way to start a new website that can be configured anew, and that we have glosses and data added manually from frontend. |
Since there needs to be one dataset in order to work, and there needs to be at least one user that can use the admin, then there needs to already exist some things or it won't work. I can make the dataset be VGT and just leave the glosses that are already there. It also needs to be made public otherwise the site won't work properly. I need to ask @Woseseltops what to do about the users. You will need to have an account that can use the Admin on your site. Or we can do the same divya account. Signbank has NGT as public. To maintain the structure of signbank, the pages need to be there. Nearly all are templates, except for the About menu. Those are in the admin. I am assuming you want to keep being able to pull from master to get new features and bug fixed. I suggest that we add extra migration files for BE and FR (make them conditional) and also generate the "po" files. I need to figure out how to do the model translations to have them conditional. |
It is proving very difficult to leave the dataset in the database. @Woseseltops any help would be appreciated. |
@ROMAN5 there are some problems now with permissions. |
This is a fresh install of Signbank https://signbank4.vlaamsegebarentaal.be/
If you go to the admin, you can log in with these temporary test credentials:
user: divya
pwd: divya!23
When you try to create a gloss, you get an error, though... any idea what's going on there @susanodd ?
PS
For completeness, the VGT admin team agreed with sharing these credentials here, as this is only an empty test installation.
The text was updated successfully, but these errors were encountered: