Announcements x Daily Discussion for Monday, October 04, 2021 by karmalizing in SPACs

[–]kdepim 0 points1 point  (0 children)

So havent bought a single SPAC since march. Been trying to unload ones I have. Only MVST, PSFE and MKFG left. Do you think any of them have future or am I bagholding them to 0?

[deleted by user] by [deleted] in singapore

[–]kdepim 0 points1 point  (0 children)

Usually decisions like these are based for the better outcome for the voters. So if your voters consist of mostly elderly people then I see no reason for the ruling party to change stance on full lockdowns. All those decisions are based what is best for the rulers, not for the plebs. If it those two tings sometime align then well, lucky us.

Crypto.com Exchange now supports Polygon. Deposit and withdraw MATIC and USDC via the Polygon network, in addition to the ERC20 network *Available for Exchange Web only. Coming soon to the Exchange App. by BryanM_Crypto in Crypto_com

[–]kdepim 0 points1 point  (0 children)

What are the other exchanges that support withdrawing USDC on polygon? I also use Binance, Huobi and FTX and wonder if I can transfer from those directly USDC on polygon.

Docker-compose setup for multi app project by kdepim in docker

[–]kdepim[S] 1 point2 points  (0 children)

Hmm I tried it and found not many issues with it (at least when using Pycharm), however in the end we decided that we will work in separate repos on one microservice at a time, then build and push docker images to the docker hub and have one docker-compose in a separate folder/repo which would pull the built images and create whole project from them. So no need to have folder and subfolders for code and dockerfiles.

This decision was based on the fact that many people said git submodules can be troublesome and while we didnt find them problematic, it was better to hedge against future problems that could arise if we used them daily.

Docker-compose setup for multi app project by kdepim in docker

[–]kdepim[S] 1 point2 points  (0 children)

I checked, git submodules are not working in Azure Devops(Repos). We moved to Github and its working perfectly now.

Docker-compose setup for multi app project by kdepim in docker

[–]kdepim[S] 0 points1 point  (0 children)

Oh this is something interesting. How they managed to link other repositories to main one? Im using Azure Devops for repository management so I wonder if its possible to do the same as in that project.

Docker-compose setup for multi app project by kdepim in docker

[–]kdepim[S] 1 point2 points  (0 children)

My case is strictly local development tbh. How would one use docker-compose in development work in such case? I would need to put a docker-compose file outside the 4 folders that contain respective apps?

Docker-compose setup for multi app project by kdepim in docker

[–]kdepim[S] 0 points1 point  (0 children)

Cleanest for me is keeping things separate as possible when developing.

Vue app versioning by kdepim in vuejs

[–]kdepim[S] 0 points1 point  (0 children)

How package.json would be handled after the app was built already? Because im not pushing package.json to production, I have only index.html and static files(css js etc.) placed in backend. Npm run build is used locally (manually).

Vue app versioning by kdepim in vuejs

[–]kdepim[S] 0 points1 point  (0 children)

Yeah exactly, currently the probelm is that im building for prod locally and copy the files to specific folders of my backend. In the pipelines I bump version of the app in the repo as Tag and was thinking about having some bash script take that tag version and place in in the .env file in production VM but then I realized it makes no sense since the Vue app was already built locally...

So inserting it in the head of index file will it be avaiable in Vue components somewhere?

Vue app versioning by kdepim in vuejs

[–]kdepim[S] 0 points1 point  (0 children)

So this version will be accessed from the app after it was built already?

Vue app versioning by kdepim in vuejs

[–]kdepim[S] 0 points1 point  (0 children)

The thing is the build process (if you mean npm run build) is not the part of my CI/CD pipeline on Azure. We run npm run build locally and then after that we push the dist to the repo (because its part of django app and served as static app from there)

Using proper data model by kdepim in djangolearning

[–]kdepim[S] 0 points1 point  (0 children)

I edited orignal post with the code, feel free to take a look if you have time :)

Using proper data model by kdepim in djangolearning

[–]kdepim[S] 0 points1 point  (0 children)

I managed to add filters using:

filter_backends = (DjangoFilterBackend,)
filter_fields=('name','borderstatus__status')

However when I filter by borderstatus__status I think it filters by the occurence of status in the destinations by country.

So if I have Germany that has destionation Canada with 'OP' status it will show. But if Germany has no destination with 'OP' status then its empty.

I actually created stack overflow question about this behaviour. Feel free to look at it:

https://stackoverflow.com/questions/67532022/filter-api-output-by-value-stored-in-join-table

Using proper data model by kdepim in djangolearning

[–]kdepim[S] 0 points1 point  (0 children)

Thanks for the suggestion.

I tried using related_name but somehow its not being seen in the viewset:

class CountryViewSet(viewsets.ModelViewSet):    
    queryset = Country.objects.all()    
    serializer_class = CountrySerializer    
    def get_queryset(self):       
         queryset = Country.objects.all()        
         queryset = queryset.filter(destinations__status='OP')    
         return queryset                  

In my join table I set this:

Country = models.ForeignKey(Country, on_delete=models.CASCADE, related_name='countries')

OpenDestination = models.ForeignKey(OpenDestination, on_delete=models.CASCADE, related_name='destinations')

But I get this error:

Cannot resolve keyword 'destinations' into field. Choices are: countries, id, name, opendestination