(fields.E300) Field defines a relation with model which is either not installed, or is abstract
You should add the app name to the related model name in the FK definition:
czas = models.ForeignKey('firstapp.Godzina')
A generic information when using the models from one app to another app is
model_variable = models.ForeignKey('the_appname.the_model_class_name')
In this case,for the Django-project “aplikacja”, for the second app(UserProfile) it should be :
czas = models.ForeignKey(‘Godzina.Godzina')
After this I suggest you remove all the files in the migrations folder(under the apps you created: Godzina and UserProfile) except the init file. Also remove the SQLite file. Then run Python manage.py makemigrations and python manage.py migrate. These steps should most probably fix the problem.