# Import models from custom folder

**URL:** <https://forum.djangoproject.com/t/import-models-from-custom-folder/30465>\
**Category:** Getting Started\
**Created:** [April 23, 2024, 3:27pm UTC](https://forum.djangoproject.com/t/import-models-from-custom-folder/30465 "2024-04-23T15:27:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jigrain](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/jigrain/32/20819_2.png) [@jigrain](https://forum.djangoproject.com/u/jigrain)\
**Post date:** [April 23, 2024, 3:27pm UTC](https://forum.djangoproject.com/t/import-models-from-custom-folder/30465/1 "2024-04-23T15:27:43Z")

</div>

In the folder of my django application there is a main folder containing settings and in the same directory there is a folder apps which contains all applications with their models and settings for the admin panel.  
For example I wanted to specify AUTH\_USER\_MODEL and for this I wrote the path “apps.user.models.user\_model.User” here:  
user - app name  
models - folder containing all models of a certain application  
user\_model - file containing the model  
User - the very name of the model contained in the file user\_model

When I try to make a migration (this is the first migration in the whole application), I get an error:  
ValueError: Invalid model reference ‘apps\_user.models.user\_model.User’. String model references must be of the form ‘app\_label.ModelName’

I know my teacher managed to do this somehow.
