# Naming conflicts

{% hint style="success" %}
This is the official documentation of the `forestadmin-agent-django` and `forestadmin-agent-flask` Python agents.
{% endhint %}

#### Collection naming collisions

When importing collections to an admin panel, you may encounter naming collisions.

You can tackle them by renaming the collection that is causing issues.

There are two ways to rename collections: either provide a plain object which maps the old names to the new names, or a function which does the same.

Don't worry about leaving naming collisions: your development agent will warn you and crash at startup.

```python
from flask_sqlalchemy import SQLAlchemy
from forestadmin.datasource_sqlalchemy.datasource import SqlAlchemyDatasource

from .utils import to_pascal_case

db = SQLAlchemy()
with app.app_context():
    db.init_app(app)
    agent.add_datasource(SqlAlchemyDatasource(db), {
        "rename": {
            "Customer": "CustomerFromSQLAlchemy",
            "Store": "StoreFromSQLAlchemy",
        }
    })

    # Renaming collection can also be done by providing a function.
    # All collections will be renamed (the handler is called once per collection)
    agent.add_datasource(SqlAlchemyDatasource(db), {
        "rename": lambda name: to_pascal_case(name)
    })

```

#### Field naming collisions

You can tackle them by renaming the fields that are causing issues too.

Use the [renameField method](/developer-guide-agents-python/agent-customization/fields/import-rename-remove.md#renaming-and-removing-fields-and-relations) to change the name inside your forestadmin-schema.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.forestadmin.com/developer-guide-agents-python/data-sources/getting-started/naming-conflicts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
