Hi so i am trying to change the wording of my links.
for example i have links ending with .com but want to replace it with .co.uk
how can i do that ? I have done the following but the query set does not have a update method.Please Help
from testing.models import retailer
amazon = retailer.objects.filter(country="UK",shop="Amazon")
amazon.count()
355
final_links = []
for all in amazon:
final = all.links.replace(".com",".co.uk")
final_links.append(final)
In [15]: for final,amz in zip(final_links,amazon):
...: amz.update(links = final)
...:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In [15], line 2
1 for final,amz in zip(final_links,amazon):
----> 2 amz.update(links = final)
AttributeError: 'retailer' object has no attribute 'update'