Re: Management command scheduling options

2023-10-23 Thread Alessandro Madruga Correia
Django-celery


Em seg., 23 de out. de 2023 às 07:08, Mike Dewhirst 
escreveu:

> Django docs suggest cron or Windows scheduler for running management
> commands.
>
> I would like instead to build an internal Django based scheduler - because
> after migrating to a new server, setting up the new cron task will be
> forgotten.
>
> Is there a daily (approximately) event in a Django project I can hook into
> and test the date?
>
> The task is somewhat database intensive and needs to run quarterly for
> some users, monthly for most and weekly for others depending on their
> preferences.
>
> Ideas anyone?
>
> Thanks
>
> Mike
>
>
> --
> Signed email is an absolute defence against phishing. This email has
> been signed with my private key. If you import my public key you can
> automatically decrypt my signature and be sure it came from me. Your
> email software can handle signing.
>
> --
> 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/7b29b24b-64f0-4f93-9a43-5d8f5e242b57%40dewhirst.com.au
> 
> .
>

-- 
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/CAOofabeYp%2B3kTHm4k5mQRL-jpHtgqtJADqUYPyAi%2BbjW3fh67g%40mail.gmail.com.


Re: Reference data while testing

2023-10-03 Thread Alessandro Madruga Correia
On Mon, Oct 2, 2023 at 11:30 PM Mike Dewhirst  wrote:

>
> This is probably in the docs so please drop me a link if you can.
>
> My project has fifteen or more tables of reference data which determine
> how the software behaves and therefore is critical to unit testing.
>
> Fixtures are unworkable and I  need to respond to the actual reference
> data.
>
> How can i do real lookups (read-only) during tests?
>

You can use Factory Boy https://factoryboy.readthedocs.io/en/stable/


-- 
  ,= ,-_-. =.   [] Alessandro Madruga Correia
 ((_/)o o(\_))  [http://counter.li.org]   Debian User# 342751
   `-'(. .)`-'"O fanatismo é a única forma de força de vontade
   \_/acessível aos fracos." (Friedrich Nietzsche)

-- 
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/CAOofabfi%3DErk535OgDo5nPU%3DwM1pVp%3D93muppuGMt1c6M2vSZA%40mail.gmail.com.


Re: Looking for a Learning Buddy

2023-06-19 Thread Alessandro Madruga Correia
I’m interested too and seems like more people

How about in this case create a separate group with meetings in zoom?

Em sex., 16 de jun. de 2023 às 19:00, John Ayodele 
escreveu:

> Hi! It's John.
>
> I am currently looking for a learning buddy, for Machine Learning.
> I have little experience in Django and I code in Python.
>
> The learning buddy would have one-on-one meetings with me so we can share
> ideas and learn together.
> It is really going to be a fun experience.
> The reason I am looking for a learning buddy is because I find it more fun
> learning with people rather than just being self-taught alone.
> I will be going to university later this year or next year.
> 
> If this sounds like you, please do not hesitate to contact me.
> 
>
> Thanks.
> John Ayodele
>
> --
> 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/CAP7pJ3gsn_bkOfP-8k-SNZ%2BmmJ8riuc1cdUVXzoQXN31BS4W4g%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAP7pJ3gsn_bkOfP-8k-SNZ%2BmmJ8riuc1cdUVXzoQXN31BS4W4g%40mail.gmail.com?utm_medium=email_source=footer>
> .
>
-- 
  ,= ,-_-. =.   [] Alessandro Madruga Correia
 ((_/)o o(\_))  [http://counter.li.org]   Debian User# 342751
   `-'(. .)`-'"O fanatismo é a única forma de força de vontade
   \_/acessível aos fracos." (Friedrich Nietzsche)

-- 
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/CAOofabcBeChjWqdRi0JhZP6E1RqSWM3NGd2COmOC2rJwTCirMg%40mail.gmail.com.


Re: Migration of database

2020-12-15 Thread Alessandro Madruga Correia
Em ter., 15 de dez. de 2020 às 03:40, Dhruvil Shah 
escreveu:

> I have already made my project in Django and used built-in database Sqlite
> and now I want it in production on heroku so how can I switch all data from
> Sqlite database to Postgresql database?
>
>

In the source server

python manage.py dumpdata contenttypes --indent=2 --natural-foreign >
contenttype.json

python manage.py dumpdata --indent=2 --natural-foreign --exclude
contenttypes  > everything_else.json



In the destination server


python manage.py loaddata contenttype.json

python manage.py loaddata everything_else.json



-- 
  ,= ,-_-. =.   [] Alessandro Madruga Correia
 ((_/)o o(\_))  [http://counter.li.org]   Debian User# 342751
   `-'(. .)`-'"O fanatismo é a única forma de força de vontade
   \_/acessível aos fracos." (Friedrich Nietzsche)

-- 
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/CAOofabc9%3DUTOKL%2B6ni5aa_zLGJX5Lruy9HUJ0xcY8VUZB2N5dA%40mail.gmail.com.


Re: Django REST in Docker

2019-04-09 Thread Alessandro Madruga Correia
You can use https://github.com/pydanny/cookiecutter-django as a start point.

On Tue, Apr 9, 2019 at 5:54 AM Shubham Joshi  wrote:

> FROM python:3
> ENV PYTHONUNBUFFERED 1
> RUN mkdir /code
> WORKDIR /code
> COPY requirements.txt /code/
> RUN pip install -r requirements.txt
> COPY . /code/
>
>
> On Tue, Apr 9, 2019 at 1:30 PM PASCUAL Eric  wrote:
>
>> Hi,
>>
>> Working in contenerized context does not change anything from other
>> modes.
>>
>> You just need to include the appropriate pip install command in the
>> Dockerfile, so that all the dependencies are installed in the image. They
>> will then available to your app the same way they are on you dev machine.
>>
>> Could you show the content of your Dockerfile to check if there would not
>> be some other problem ?
>>
>> Eric
>>
>> --
>> *From:* django-users@googlegroups.com  on
>> behalf of Shubham Joshi 
>> *Sent:* Tuesday, April 9, 2019 07:30
>> *To:* Django users
>> *Subject:* Django REST in Docker
>>
>> I had set up django in Docker, now I am trying to install pip packages ,
>> like rest_framework and added in installed apps too.
>> but it throws ModuleNotFoundError: No module named 'rest_framework' ,
>> whats the generic way of installing the pip packages in existing dockerized
>> django project
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/656cff9e-50f9-4d5a-bafc-05eaa99778d7%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/656cff9e-50f9-4d5a-bafc-05eaa99778d7%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/AM0P193MB030871AA27CDB1B3923B785E8C2D0%40AM0P193MB0308.EURP193.PROD.OUTLOOK.COM
>> <https://groups.google.com/d/msgid/django-users/AM0P193MB030871AA27CDB1B3923B785E8C2D0%40AM0P193MB0308.EURP193.PROD.OUTLOOK.COM?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> *Shubham Joshi*
> Business Developer | Terse Software
> M: 8390246938
>
> E: shub...@tersesoft.com 
> www.tersesoft.com
> [image: linkedin] <https://www.linkedin.com/in/rajkumartiwari/> [image:
> github] <https://github.com/rajqumar>
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGJdmX63xQ1kS1z_i5MhkXS0hKkno1_fGnfx5344ShpY-aZv3Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAGJdmX63xQ1kS1z_i5MhkXS0hKkno1_fGnfx5344ShpY-aZv3Q%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
  ,= ,-_-. =.   [] Alessandro Madruga Correia
 ((_/)o o(\_))  [http://counter.li.org]   Debian User# 342751
   `-'(. .)`-'"O fanatismo é a única forma de força de vontade
   \_/acessível aos fracos." (Friedrich Nietzsche)

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOofabfZKAHXF0YT-jWCL3apfhvnbze6_cJBT0WFdq2urmh-bQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: about book

2018-07-11 Thread Alessandro Madruga Correia
On Tue, Jul 10, 2018 at 8:29 AM tribhuvan kishor <
tribhuvankishor...@gmail.com> wrote:

> can any one suggest me a better book for django
>


You didn't describe what exactly you are looking for, but..
This is a good introductory book
https://www.amazon.com/Lightweight-Django-Using-WebSockets-Backbone/dp/149194594X





-- 
  ,= ,-_-. =.   [] Alessandro Madruga Correia
 ((_/)o o(\_))  [http://counter.li.org]   Debian User# 342751
   `-'(. .)`-'"O fanatismo é a única forma de força de vontade
   \_/acessível aos fracos." (Friedrich Nietzsche)

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOofabenhbwCOtEeCHEOtxUC6Wm7VpztP%3DXyQrq85sS8LqFxVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Revert database scheme based on django migrations

2017-09-12 Thread Alessandro Madruga Correia
Hi there

To go to a specific migration just run

$ python manage.py migrate  

About your data I think is better you make backup.



Em 11 de set de 2017 20:11, "Luis Zárate"  escreveu:

Hello people,

I really would like you to help me with some thing I need to solve.

I have an app that do automated deployment of django apps, that also can
update existing deployments. So I need to revert my database to last state
if something went wrong.

So, my question is, how can I revert all the migrations that were applied
after run the migrate command?
It can have more than one migration and in different apps, so how can I
know where to go back and how to leave the database in the previous state
without having to do a backup of database and a restore? (some databases
can have a lot of registers).  How can I make a restore point of my
migrations or indicate django to go back in my database scheme?

Thanks in advance for the help you can provide me.

-- 
"La utopía sirve para caminar" Fernando Birri


-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/
msgid/django-users/CAG%2B5VyN2r8w_h0iXouY5PnCdxTBqx7eNv6D8r95nB8
QVnHH1cQ%40mail.gmail.com

.
For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOofabfysKtwCMdZ%2Bhfa-ZpdNaytmOU2XjCtEPEgULoi%3Dn-pOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: No module named MySQLdb

2016-09-20 Thread Alessandro Madruga Correia
pip install MySQL-python

On Tue, Sep 20, 2016 at 12:12 PM, Carlos Andre <eucan...@gmail.com> wrote:

> 1º install setuptools;
> 2º install PyMySQL;
>
>
> 1º --> https://pypi.python.org/pypi/setuptools
> 2º --> https://github.com/PyMySQL/PyMySQL
>
>
> 2016-09-20 11:01 GMT-03:00 fossildoc <doctortra...@gmail.com>:
>
>> I am a newbie to Django. I am running Django 1.10.1, Python 3.5.2, and
>> MySQL server 5.7.15. When I run migrate, I get the message "No module named
>> MySQLdb". There are various posts which say that MySQLdb is not supported
>> by Python 3, and there are a couple of posts which offer solutions, but
>> only for older versions of Django. Any help, please.
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/django-users/b0a88c18-faa9-4d0e-ac7b-1a8be1fb8070%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/b0a88c18-faa9-4d0e-ac7b-1a8be1fb8070%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CAA8yBMxrhHZfw5j_agwUD_24%2BFeTqU3dz6mO5E1Zm0gqeEN4Vw%
> 40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAA8yBMxrhHZfw5j_agwUD_24%2BFeTqU3dz6mO5E1Zm0gqeEN4Vw%40mail.gmail.com?utm_medium=email_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
  ,= ,-_-. =.   [] Alessandro Madruga Correia
 ((_/)o o(\_))  [http://counter.li.org]   Debian User# 342751
   `-'(. .)`-'"O fanatismo é a única forma de força de vontade
   \_/acessível aos fracos." (Friedrich Nietzsche)

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOofabd8H2DCLRmbHJOo1Vyyw-YHmBc1-Kf7o1N910wU9u4AYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to send parameters in url tag?

2016-09-20 Thread Alessandro Madruga Correia
>
> {%url url_name url_params%}
>
> where url_params as 'pk=object.id' or 'page=page.number'
>

Here have an example
https://docs.djangoproject.com/en/1.10/topics/http/urls/#reverse-resolution-of-urls


-- 
  ,= ,-_-. =.   [] Alessandro Madruga Correia
 ((_/)o o(\_))  [http://counter.li.org]   Debian User# 342751
   `-'(. .)`-'"O fanatismo é a única forma de força de vontade
   \_/acessível aos fracos." (Friedrich Nietzsche)

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOofabfH%3DM7Mcrcr7nOTPkwztut1s8uDFATGm_7V8zJX5wEbmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: cannot import name SortedDict

2016-09-20 Thread Alessandro Madruga Correia
On Tue, Sep 20, 2016 at 7:29 AM, Etienne Robillard <tkad...@yandex.com>
wrote:

> Hi,
>
> I'm trying to run Satchmo on Django 1.10. I have removed from the
> app_plugins.templatetags.app_plugins
>
> module the deprecated import of SortedDict. Could this import statement be
> cached by the  Django cache backend ?
>
> I have replaced the only occurence of SortedDict by
> collections.OrderedDict in app_plugins.library.py.
>
> Is there something obvious I'm missing ?
>


I don't know this lib, but did you can try this
https://github.com/aljosa/django-tinymce/issues/114


-- 
  ,= ,-_-. =.   [] Alessandro Madruga Correia
 ((_/)o o(\_))  [http://counter.li.org]   Debian User# 342751
   `-'(. .)`-'"O fanatismo é a única forma de força de vontade
   \_/acessível aos fracos." (Friedrich Nietzsche)

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOofabcsTH7CYLZyBB8UtqJf1jvH2YZDav%3DD18WBd88s5VVXrQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.