Weimar wasn't the capital, Berlin was. The assembly that came up with the constitution took place in Weimar.