# How are fields added to the table in the backend?

**URL:** https://community.baserow.io/t/how-are-fields-added-to-the-table-in-the-backend/1109
**Category:** Technical Help
**Tags:** django, baserow
**Created:** [August 2, 2022, 8:10am UTC](https://community.baserow.io/t/how-are-fields-added-to-the-table-in-the-backend/1109 "2022-08-02T08:10:58Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![alucor-it](https://community.baserow.io/letter_avatar_proxy/v4/letter/a/b9e5f3/32.png) [@alucor-it](https://community.baserow.io/u/alucor-it)
#### Post date: [August 2, 2022, 8:10am UTC](https://community.baserow.io/t/how-are-fields-added-to-the-table-in-the-backend/1109/1 "2022-08-02T08:10:58Z")

</div>

Hi,  
We would like to understand how the fields are added to a table in the backend using Django. As the tables and fields are created on the go and new fields can be added from front-end, how are the fields added to the backend? Is it added to the models.py file? If yes, where can we find it.

Thanks.

---

<div class="post-metadata">

### Author: ![nigel](https://community.baserow.io/user_avatar/community.baserow.io/nigel/32/51_2.png) [@nigel](https://community.baserow.io/u/nigel)
#### Post date: [August 2, 2022, 8:17am UTC](https://community.baserow.io/t/how-are-fields-added-to-the-table-in-the-backend/1109/2 "2022-08-02T08:17:38Z")

</div>

Hi @alucor-it ,

We have a blog post describing how we do this here [How Baserow lets users generate Django models on the fly // Baserow](https://baserow.io/blog/how-baserow-lets-users-generate-django-models).

We don’t modify any files, we instead have metadata tables like `database_field` where we add a row representing the new field and then we literally add a SQL column to the database table used to store a particular tables rows.

---

<div class="post-metadata">

### Author: ![alucor-it](https://community.baserow.io/letter_avatar_proxy/v4/letter/a/b9e5f3/32.png) [@alucor-it](https://community.baserow.io/u/alucor-it)
#### Post date: [August 2, 2022, 9:31am UTC](https://community.baserow.io/t/how-are-fields-added-to-the-table-in-the-backend/1109/3 "2022-08-02T09:31:12Z")

</div>

Thank you for the quick reply. We’ll go through the blog.

---

<div class="post-metadata">

### Author: ![alucor-it](https://community.baserow.io/letter_avatar_proxy/v4/letter/a/b9e5f3/32.png) [@alucor-it](https://community.baserow.io/u/alucor-it)
#### Post date: [August 2, 2022, 10:51am UTC](https://community.baserow.io/t/how-are-fields-added-to-the-table-in-the-backend/1109/4 "2022-08-02T10:51:04Z")

</div>

Is there a link on how to implement this in a fresh django project? I’m trying to understand how it works.

Thanks

---

<div class="post-metadata">

### Author: ![nigel](https://community.baserow.io/user_avatar/community.baserow.io/nigel/32/51_2.png) [@nigel](https://community.baserow.io/u/nigel)
#### Post date: [August 2, 2022, 11:30am UTC](https://community.baserow.io/t/how-are-fields-added-to-the-table-in-the-backend/1109/5 "2022-08-02T11:30:55Z")

</div>

Just to check, what do you mean by “it”? The way Baserow dynamically generates models? We don’t provide any tutorial on how to set this up in a fresh django project, you are going to have to look at our codebase to understand it further (`TableHandler`, `Table`, `Table.get_model` etc).

---

<div class="post-metadata">

### Author: ![nigel](https://community.baserow.io/user_avatar/community.baserow.io/nigel/32/51_2.png) [@nigel](https://community.baserow.io/u/nigel)
#### Post date: [August 2, 2022, 11:31am UTC](https://community.baserow.io/t/how-are-fields-added-to-the-table-in-the-backend/1109/6 "2022-08-02T11:31:30Z")

</div>

Possibly a better question, what are you trying to achieve fundamentally?
