Go to File -> Settings -> Tools -> Terminal and change Shell path based on the the installed git version.
for 64bit:
"C:\Program Files\Git\bin\sh.exe" --login -ifor 32bit:
"C:\Program Files (x86)\Git\bin\sh.exe" --login -i| watcher.on('change', (file) => { | |
| setTimeout(()=>{ | |
| if (file.endsWith('.vue')) { | |
| handleVueReload(file); | |
| } | |
| },100) | |
| }); |
Go to File -> Settings -> Tools -> Terminal and change Shell path based on the the installed git version.
for 64bit:
"C:\Program Files\Git\bin\sh.exe" --login -ifor 32bit:
"C:\Program Files (x86)\Git\bin\sh.exe" --login -i| var data = JSON.parse(/*paste stringified JSON from clipboard*/); | |
| Object.keys(data).forEach(function (k) { | |
| localStorage.setItem(k, data[k]); | |
| }); |
| def raw_headers_to_dict(raw:str)->dict: | |
| header_dict = {} | |
| header_list = raw.split('\n') | |
| for each in header_list: | |
| key, value = each.split(': ') | |
| header_dict.update({f"{key}": f"{value}"}) | |
| return header_dict | |
| # Usage: | |
| dict_headers = raw_headers_to_dict(raw_headers) |
Django allows you to define custom UniqueConstraints to specify which combinations of values are allowed in a row, but removing these later can be problematic when some ForeignKey is involved, at least with MySQL it may throw a Cannot drop index '...': needed in a foreign key constraint at you.
The example below shows you how to resolve such a situation in 3 small individual migrations:
class MyModel(models.Model):
other_model = models.ForeignKey("OtherModel", on_delete=models.CASCADE)
name = models.CharField(Max_length=128)