The workhorse is the function build_files_set(). In_dir1, in_dir2 = compare_directories(dir1, dir2) Return (files_set1 - files_set2, files_set2 - files_set1) Relative_path = root_to_subtract.sub('', full_path, count=1) Root_to_subtract = re.compile(r'^.*?' + rootdir + r'')įor (dirpath, dirnames, filenames) in os.walk(rootdir):įull_path = os.path.join(dirpath, filename) Then comparison is just a matter of set subtraction. My solution uses the set() type to store relative paths. serving Django static files with Docker, nginx and gunicorn.Django/Visual Studio Tutorial - objects method error.Analyzing high WSGI/Response time data of django with mod_wsgi on NewRelic.Add form fields to django form dynamically.Redirect to next URL in django FormView.
0 Comments
Leave a Reply. |