Re: Get experience letter and job opportunities

2024-02-10 Thread Yeboah Dominic
I am interested, I am a professional developer currently working as a
backend developer for a fintech company.
Email me if possible to discuss further details. Below is my linkedin
profile.
https://www.linkedin.com/in/dominic-yeboah/

On Tue, 6 Feb 2024 at 08:03, machine learning 
wrote:

> anyone here to help me in our django project and in return we will give
> you access to software that will apply 100s of job for you and also hand on
> work experience.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKKYCB4FFeSCpDQEoYDDwO2Yz%2B93F7DL_LhcgBxiPe4Lzd0scQ%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPVAach4JyEVeQxFHvk0ej_33rDH-nuXO3muP9KDLE7oKbDe%2BQ%40mail.gmail.com.


Re: Location identification with login

2022-12-25 Thread Yeboah Dominic
This can be done GeoIP but it can be done in a different way I have done
one before that was with REST API, all you have to do if you don't want to
depend on any third library is to have a device model which stores the user
and IP then whenever the user login saves it.
So with this, you have all the user's IPs so when they log in again then
you compare their previous IPs with the current if different you can send a
warning mail or you just send an OTP to verify before logging in.
What I did was for one company I worked with so I can share the code I am
sorry for that.

On Sun, 25 Dec 2022 at 20:58, 'Kasper Laudrup' via Django users <
django-users@googlegroups.com> wrote:

> On 25/12/2022 20.52, tristant wrote:
> > Is there a mechanism in Django where we can identify the location of
> > login? Any reading sources regarding this functionality would be much
> > appreciated.
> >
>
> What you're looking for is something called geoip. To the best of my
> knowledge there's no such thing build into Django (wouldn't really make
> much sense anyway) but it should be trivial to query some geoip database
> from your code and get a somewhat reliable idea on where that IP is
> coming from.
>
> There's no way that can be accurate but it might be useful for something
> like detecting a locale (that the user can then change) or similar.
>
>
> > Along the same line, is there a way to prevent a login attempt if the
> > location is within certain blacklisted IP subnets?
> >
>
> It is trivial to spoof a source IP address once you reach the Django
> application part of the communication. That's more of a feature than a
> bug actually because of things like proxies etc.
>
> If you want to blacklist IPs you have to do that on a lower level. For a
> single server running Linux something like netfilter/iptables might be
> used but I'm sure there are some more convenient scripts/services etc.
> that might be used. The main point is that you cannot do this from your
> Django code.
>
> Hope that helps you in the right direction.
>
> Kind regards,
> Kasper Laudrup
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e83a7b85-6fd3-ced8-b4bf-fdf77650cfe8%40stacktrace.dk
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPVAacgu6LE_%2BN%2BFknaeZsFCYvOTpsz2TkjeJhy6tcMZx7oAKg%40mail.gmail.com.


Re: Starting Django project with Docker

2022-09-26 Thread Yeboah Dominic
I think you have to give that user permission.
Like 'sudo chown -R root:root /home/dominic/app' or sudo chown -R
dominic:dominic /home/dominic/app




On Mon, 26 Sept 2022 at 08:12, Prabakaran Balaji 
wrote:

> Hello Django Geeks,
>
> Looking for geeks' insight for docker related issues. I'm not able to run
> the command *"docker-compose run --rm app sh -c "django-admin
> startproject app ."*
>
> Error -
> Traceback (most recent call last):
>   File "/py/bin/django-admin", line 8, in 
> sys.exit(execute_from_command_line())
>   File
> "/py/lib/python3.9/site-packages/django/core/management/__init__.py", line
> 419, in execute_from_command_line
> utility.execute()
>   File
> "/py/lib/python3.9/site-packages/django/core/management/__init__.py", line
> 413, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/py/lib/python3.9/site-packages/django/core/management/base.py",
> line 354, in run_from_argv
> self.execute(*args, **cmd_options)
>   File "/py/lib/python3.9/site-packages/django/core/management/base.py",
> line 398, in execute
> output = self.handle(*args, **options)
>   File
> "/py/lib/python3.9/site-packages/django/core/management/commands/startproject.py",
> line 21, in handle
> super().handle('project', project_name, target, **options)
>   File
> "/py/lib/python3.9/site-packages/django/core/management/templates.py", line
> 160, in handle
> with open(new_path, 'w', encoding='utf-8') as new_file:
> PermissionError: [Errno 13] Permission denied: '/app/manage.py'
>
> Attaching docker related files and directory structure screenshot.
> [image: image.png]
>
> I have followed some links in stackoverflow, which didn't work.
>
> https://stackoverflow.com/questions/73532467/permissionerror-errno-13-permission-denied-app-manage-py
> ,
>
> https://stackoverflow.com/questions/55729645/permissionerror-errno-13-permission-denied-app-manage-py-when-trying-to-c
>
> * Will be waiting for your valuable inputs.*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAK7fxT-m%3D5LMFF%2ByikZ6571eSo3xMuyc6ZGDtLtrE4fd_naz%2BA%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPVAacj%2BdgQG2bbQXTm-fTAOxvgdMLN%3DzeGXJutCDFMveKtgwQ%40mail.gmail.com.


Re: Timeout error in send_mail function

2022-07-05 Thread Yeboah Dominic
This is due to a poor network.

On Mon, 4 Jul 2022 at 22:29, K Wong  wrote:

> If you know that Django is trying to send the email then the problem lies
> in the local operating system and the network.
>
> If you are developing on windows then the windows firewall might be
> blocking you. If you are at home then your router might be blocking you. If
> you are trying to send outside your LAN then your ISP is almost certainly
> blocking you (or else it should be).
>
> Personally, I wouldn't worry about testing the email sending routine on a
> local dev machine. Just output the email contents to the runserver console.
> That's it.
>
> -k
>
> On Thursday, June 23, 2022 at 10:17:50 AM UTC-7 sonasiv...@gmail.com
> wrote:
>
>> Hi.
>> I'm working on a project with django and django rest framework.
>> In one of my views, I tried implementing a simple send_mail, but it gives
>> me a TimeOut error. I configured the settings (Email backend as smtp,
>> email host, password, ...), and also alowed my email to accept 'less
>> secured apps',  but it doesn't seem to work.
>> I also tried the port 25, 587 and 465. None of that seem to work.
>>
>> Here is the error:
>> [WinError 10060] A connection attempt failed because the connected party
>> did not properly respond after a period of time, or established connection
>> failed because connected host has failed to respond
>>
>> Can someone please help?
>> Thanks in advance.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5583023c-d727-4473-b6f6-999f3bfc99edn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPVAachby-gCytV0spAphqzBqw%3D8R1resVksmdnm2ZAaQLz5jw%40mail.gmail.com.


Re: migrations: "no changes detected"

2022-02-08 Thread Yeboah Dominic
I think this has to be like you are trying to add some model whose field is
not recognizable I have the same issue when using geodjango.
If you delete the DB.sqlite3 sometimes it won't work or even deleting the
migrations won't also work.
If that happens just run,
1. python manage.py makeigrations
2. python manage.py sqlmigrate app_name, 0001_initial

this will generate the schemas of the app models just copy the model you
want schemas and open your SQLite DB browser if you don't have you can
download one if you are using Postgres or any DB just open it and paste the
schema there to create that new schema in your DB for you then you are done.

On Tue, 8 Feb 2022 at 10:14, Feroz Ahmed  wrote:

> checkout u not forgot to add app in installed app in settings.py
>
> if still the issue , forward your settings.py
>
>
>
> best practice , try to solve the issue from current configuration
>
>
>
> Regards
>
>
>
> *From:* 'Delvin Alexander' via Django users [mailto:
> django-users@googlegroups.com]
> *Sent:* 08 February 2022 10:12
> *To:* Django users
> *Subject:* migrations: "no changes detected"
>
>
>
> I am trying to run migrations so that i can create a table, but when I
> type out, "python manage.py makemigrations"
>
> it returns this: "no changes detected"
>
>
>
> would anyone know the reason for this?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/639770ea-db24-469a-a123-6f4cb2af3036n%40googlegroups.com
> 
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/62028856.1c69fb81.7aa2d.a900%40mx.google.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPVAachsTeOZvsC6%2BtqjYNt2mbBjCiW%3D%2B%3DJ4mgL6TbrKDBqYdg%40mail.gmail.com.


Re: Media Files - local network share

2022-02-06 Thread Yeboah Dominic
You can try dropbox that is what I used to serve my media files in django

On Sun, 6 Feb 2022 at 20:07, Swelan Auguste  wrote:

>
> Good day all,
>
>
> I am trying to figure out how to attach a Django app to a local network
> server/share.
>
> I do not want to host the media files on the same server so that the
> server doesn't run out of space and I can and I can grow my media file host
> share/server as it grows.
> Kindly,
>
> Swelan R. Auguste (Mr.)
> KingShip
> Technical Information Officer
> 758-489-3909
> Webpage 
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKj-cedrdvqRmGZ29cMNsk0%2BypXy5fRzRsMx%3DziiPpVr1JOHfA%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPVAacjQwHJ2kUSWhB3FZTTw2c03RMcbiNyP1cpDcvXbGhaKzw%40mail.gmail.com.


Re: Search & replace an object in the database

2022-01-21 Thread Yeboah Dominic
Okay bro try this script hope it works

On Fri, 21 Jan 2022 at 10:05, jools  wrote:

> Dear Django users,
>
> here’s an interesting case and I’m curious whether somebody can point me
> in the right direction.
>
> Here’s the problem:
> My company has a database of customers. Over the years, many duplicates
> have been created. For cleaning up duplicates, I’d like to have a
> search-and-replace functionality.
>
> I.e.: Replace all references in the database to customer  with
> customer .
> The database schema has quite a bit of complexity, so I’m aiming to find a
> very generic solution.
>
> Approach:
> Django has a bit of functionality to find all references to an existing
> object, namely django.db.models.deletion.Collector and I’m using it to
> find all references.
>
> Though, the “replace” logic seems quite hard to get right:
>
>- It has to keep parent links intact
>- It has to recognize references in parent models (Customer model is
>derived from the concrete model Actor)
>- It has to recognize generic relations, built with Django’s content
>types
>
>
> My stub implementation comes below.
>
>
>- Has anybody else implemented sth like this, e.g. in helper library?
>- Do you think the approach is right?
>- What would you differently?
>- Any caveats that you know of?
>
> Best regards
> Jools
>
> Stub implementation:
>
> from django.db.models.deletion import Collector, ProtectedError,
> RestrictedError
>
>
> def replace_object(old_obj, new_obj, using='default'):
> """
> Replace an old object with a new object throughout the database.
> """
> collector = Collector(using)
>
> try:
> collector.collect([old_obj])
> except ProtectedError:
> pass
> except RestrictedError:
> pass
>
> for model, obj in collector.instances_with_model():
> for field_opts in obj._meta.get_fields():
> if __is_qualified(field_opts, new_obj):
> setattr(obj, field_opts.name, new_obj)
> obj.save()
>
> def __is_qualified(field_opts, new_obj):
> if not hasattr(field_opts, 'related_model'):
> return False
>
> # This check is wrong for multi-table inheritance, I suppose?
> if field_opts.related_model != new_obj.__class__:
> return False
> if hasattr(field_opts, 'parent_link') and field_opts.parent_link is
> True:
> return False
>
> return True
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4cd485cd-cc20-481d-a7be-3179bcc5c98bn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPVAacg3ZOELkofUoSHG1T4r6iSiSofUT%2BQRJa%3Doedi_KForGw%40mail.gmail.com.
import hashlib
import requests

seckey = "FLWSECK_TEST-88ebd2a6edb534bbc663d33efcd1211a-X"
hashedseckey = hashlib.md5(seckey.encode("utf-8")).hexdigest()
hashedseckeylast12 = hashedseckey[-12:]
seckeyadjusted = seckey.replace('FLWSECK-', '')
seckeyadjustedfirst12 = seckeyadjusted[:12]

# print(seckeyadjustedfirst12 + hashedseckeylast12)


resp = requests.post("https://tnttukbbvmi.sandbox.verygoodproxy.com/post;,
headers={"Content-type": "application/json"},
json={ "secret_key": "4pXY0grBDyaqeiAAwQ7T5g=="})

print(str(resp.text))