Question: I am having trouble with setting up the flow of my site with manytomany relationships.

For example, there are many models that have many types and vice versa. I have my URL set up site/model/typed/detail

Since typed and model are ManyToMany i can't pass on to my detail page.

I am thinking I can circumvent this by creating variables that literally link the model to type to let it be used as a unique identifier foreign key by detail. It would look something like: site/model/model\_type/detail

However, I am having trouble pulling the values. If there is an easier way to solve this problem please let me know!

```
class typed(models.Model):
typed = models.CharField(max_length=200, help_text='Enter MFG - Type')

model = models.ForeignKey('model', on_delete=models.SET_NULL, null=True)

model_type = model + typed

def get_absolute_url(self):
    return reverse('typed-detail', args=[str(self.model), str(self.model_type)])

def __str__(self):
    return self.model_type

```

I get this error: TypeError: unsupported operand type(s) for +: 'ForeignKey' and 'CharField'

Answer: 
you can do this

```
class typed(models.Model):
typed = models.CharField(max_length=200, help_text='Enter MFG - Type')

model = models.ForeignKey('model', on_delete=models.SET_NULL, null=True)

def get_absolute_url(self):
    return reverse('typed-detail', args=[str(self.model), "%s%s" % (self.model,self.typed)])

```
What is your `__str__` method for the `model` Model?
If it's something like `return self.title` you can try this:

```
def __str__(self):
    return str(self.model)+ ' ' + str(self.typed)

```