Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How do I change the location of the _ versions directory?
Post: RE: How do I change the location of the _ versions...

Thank`s for the "large number of answers." The answer was found, the question was closed.
Stas43 Web Scraping & Web Development 1 788 May-10-2023, 07:23 AM
    Thread: How do I change the location of the _ versions directory?
Post: How do I change the location of the _ versions dir...

(Sorry for google translator) When working together Django + TinyMCE + django-filebrowser + grappelli +... image thumbnails are created in the _versions directory at the root of the project. Is it pos...
Stas43 Web Scraping & Web Development 1 788 May-04-2023, 10:46 AM
    Thread: How do I get a slug from a url?
Post: RE: How do I get a slug from a url?

(Apr-21-2023, 11:28 AM)snippsat Wrote: Can eg use urlparse. [python]>>> from urllib.parse import urlparse >>> ............. How do I embed this code in tempates? I have a menu wit...
Stas43 Web Scraping & Web Development 3 1,530 Apr-21-2023, 06:15 PM
    Thread: How do I get a slug from a url?
Post: RE: How do I get a slug from a url?

Thanks!!!
Stas43 Web Scraping & Web Development 3 1,530 Apr-21-2023, 11:46 AM
    Thread: How do I get a slug from a url?
Post: How do I get a slug from a url?

How do I get a slug from a url? Example:... com/page1/ In my case - page1 is a slug and I want to get it in a template for different operations
Stas43 Web Scraping & Web Development 3 1,530 Apr-21-2023, 10:56 AM
    Thread: How to set up uwsgi and nginx?
Post: RE: How to set up uwsgi and nginx?

I understood. Thank you, everything works! **smile**
Stas43 Web Scraping & Web Development 2 1,240 Apr-21-2023, 10:51 AM
    Thread: How to set up uwsgi and nginx?
Post: How to set up uwsgi and nginx?

(sorry for the Google translator) os Ubuntu 20.04 lts server x64 What is done: mkdir django & cd django . env/bin/activate test project django created ~/django/test_site/test_site created ~/dja...
Stas43 Web Scraping & Web Development 2 1,240 Apr-19-2023, 11:10 AM
    Thread: Manually create a hex value
Post: RE: Manually create a hex value

(Feb-25-2020, 08:15 AM)DeaD_EyE Wrote: Try: print (binascii.unhexlify(a).decode())Then it's encoded by default as utf-8. You'll get a different result. Yes. In my case, this is enough
Stas43 General Coding Help 5 3,035 Feb-27-2020, 08:28 AM
    Thread: Manually create a hex value
Post: RE: Manually create a hex value

Here is the right solution, in my case: #!/usr/bin/python3 #coding: utf-8 import binascii a = 'cf' print (binascii.unhexlify(a)) print (binascii.unhexlify(a).decode("cp1251")):~/Python/5$ ./test...
Stas43 General Coding Help 5 3,035 Feb-25-2020, 07:59 AM
    Thread: Manually create a hex value
Post: RE: Manually create a hex value

(Feb-21-2020, 12:18 PM)Larz60+ Wrote: the \x is an escape character which says take the following as hexadecimal number once separated from each other, the \x by itself fails because there is no val...
Stas43 General Coding Help 5 3,035 Feb-25-2020, 06:30 AM
    Thread: Manually create a hex value
Post: Manually create a hex value

Help collect a string for correct conversion: It works correctly: a = '\xcf' t = a.encode("latin-1").decode("cp1251") print (t):~/Python/5$ ./test1.py П And so not right.b = r'\x' + 'cf' t = b.e...
Stas43 General Coding Help 5 3,035 Feb-21-2020, 12:00 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020