No. the whole weight will not act on the base of the container 2. If the whole weight had acted on the base of container 2, then the pressure on the base of container 2 would be equal to that of container 1 i.e., mg/A, where mg is the whole weight of the fluid and A is area of the base. But as you know the pressure at a depth depends on the height of the fluid above it, $h\rho g$, they should be different because the heights of the fluid are different.
Another way of thinking is if you observe that when you make the slanting parts more and more slanting, you can easily see that the weight of the whole fluid is still 300kg but the base now bears very less pressure as the fluid above the base has very less height. Weight is always downwards and the whole weight doesn't act on the base. When the sides are slanting, in addition to the base area, there is a component of the area vector of the slanting side in the downward direction providing more surface area for the fluid to exert pressure downward. But for straight cylinder there is no other area vector in the downward direction other than the base so the whole weight acts on the base in this case.
But weighing is different. On weighing you get 300kg because you are measuring the whole mass multiplied by acceleration due to gravity, it doesn't matter what pressure does the base bears. It doesn't have anything to do with the base apart from the support it provides to place it. You can measure it in any position and you will get 300kg.
Consider two cylinders, one longer but small cross-sectional area another shorter but very large cross sectional area so that the latter has larger volume. If both are fully filled with a fluid, $\rho$, then the one which is longer will have more pressure at the base but that doesn't mean that the weight of the whole fluid in it is more. The weight of the second one is more.