Re: Problems in Django login authentication

2023-07-30 Thread Mh Limon
abstract base user model in your user >> model and after that define auth.model in settings.py hope its work >> >> Sent from my iPhone >> >> On 30-Jul-2023, at 10:45 AM, Abdulrahman Abbas >> wrote: >> >>  >> Can you login with superuser?

Problems in Django login authentication

2023-07-29 Thread Mh Limon
Views.py file from django.shortcuts import render,HttpResponse,redirect from .models import registration from django.contrib.auth import authenticate,login def home(request): return render(request,'home.html') def log_in(request): if request.method == 'POST': username = request.

User log in authentication problem in Django

2023-07-29 Thread Mh Limon
This is my views.py code. when providing the correct username and password, the system consistently displays an error message stating "You have incorrect Username or password." from django.shortcuts import render,HttpResponse,redirect from .models import registration from django.contrib.auth impo

Re: Page Integration

2022-11-10 Thread Mh Raffi
In views.py on that def On Fri, Nov 11, 2022, 12:37 AM Pooja Kumari wrote: > Where I have to use save() method? In models or somewhere else? > > On Thu, Nov 10, 2022, 9:19 PM Lakshyaraj Dash < > dashlakshyaraj2...@gmail.com> wrote: > >> Please see that if you're calling the .save() method or not

Re: STATIC FILE

2022-11-09 Thread Mh Raffi
Media url in settings I have. On Thu, Nov 10, 2022, 8:50 AM ritik sahoo wrote: > You must import media url > > On Wed, 9 Nov, 2022, 8:58 pm Mh Raffi, wrote: > >> Hi, >> I run cmd to collect static files but files are stored in c:\ but not in >> the actual projec

Re: STATIC FILE

2022-11-09 Thread Mh Raffi
I have that configuration setup. Images are not loading and collect static is collecting in c drive but my project is in desktop. On Thu, Nov 10, 2022, 8:50 AM ritik sahoo wrote: > You must import media url > > On Wed, 9 Nov, 2022, 8:58 pm Mh Raffi, wrote: > >> Hi, >&

STATIC FILE

2022-11-09 Thread Mh Raffi
Hi, I run cmd to collect static files but files are stored in c:\ but not in the actual project folder. My project folder is on the desktop. while running the command am into that root folder of the project. and i have images that are also not stored. I have an app in railway host and debug in a fa

Re: Hi need a solution

2022-11-08 Thread Mh Raffi
my images and png files are not working after switching to postgres database.* *Any solution will be appreciated.* Thanks & Regards Mohammed Raffi.J +91 8939326407 On Mon, Nov 7, 2022 at 11:15 PM 'Kasper Laudrup' via Django users < django-users@googlegroups.com> wrote: > On

Hosting Django App

2022-11-08 Thread Mh Raffi
Hi, I Am trying to host my app with postgres and railway. But I am not able to understand the concept. Due to it i deleted db sqlite. Is there any other option or anybody can help me to host a project. Thanks & Regards Mohammed Raffi.J -- You received this message because you are subscribed to t

Hi need a solution

2022-11-07 Thread Mh Raffi
I have deployed to post g res p g admin4 and deleted db. s q lite from Django. and set my allowed host =['*'] Am getting server [500]. if any help will be appreciated need a solution after deleting s q .lite d b from Django project and used allowed host to * . am getting 500 server request. LOO

Re: my project doesnt insert into the database

2022-11-01 Thread Mh Raffi
Hi Sorry Looking for thread to my problem. Landed here. Am new to django and python. I need to deploy my app live. i have got a domain name in hostiger. How to deploy in rail with connecting to hostinger. Hope i will find the solution here Thanks & Regards Mohammed Raffi.J +91 8939326407 On Tu

Re: How to trigger a function with an update view

2022-02-13 Thread &#x27;MH' via Django users
self).save(commit=False) > instance.flag1 = 'flag1' in self.cleaned_data['multi_choice'] # etc > if commit: > instance.save() > return instance > > > 'MH' via Django users schrieb am Sa., 12. > Feb. 2022, 22:11: > >>

How to trigger a function with an update view

2022-02-12 Thread &#x27;MH' via Django users
Hi I have an update view which enables me via a form to update the data for a particular model object instance (as it should do). However, when a particular field gets changed I would not only need to update the fields in the database, but I would need the save routine of the update view to tr

Re: Developing django apps in jupyter

2021-11-30 Thread &#x27;MH' via Django users
.22, 'MH' via Django users wrote: > > My two questions are: > > 1. Do you use juypter for django development? > > No and I've never heard of it, but now I have. Thanks. > > > 2. If not, which editor or free IDE do you use? > > > > I use Emacs

Developing django apps in jupyter

2021-11-29 Thread &#x27;MH' via Django users
Hi everyone I have built a few django apps, but on a very basic level and only for my own usage. Little helpers for self management. So far I just used vi(m). Now I tried out jupyter for the first time. Looks great and thanks to a few links from Google I could also load the django kernel in jup

svg vs. canvas

2020-06-26 Thread &#x27;MH' via Django users
there should be arrows which connect the circles/box. How would you start? Should I rather turn to svg or canvas? Best regards MH -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emai

Re: How can I access in a template objects, which are in a list inside a dict?

2020-06-21 Thread &#x27;MH' via Django users
Thank you, I will try that. -- 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

How can I access in a template objects, which are in a list inside a dict?

2020-06-21 Thread &#x27;MH' via Django users
Hi I have context variable "convar". And this convar consists of a dictionary. So, it might look like: convar | General case | |- Speical case A | |--Special case B So, the general case and the special cases are the keys. And there values are lists. And in these lists I

How to pass the extra argument to an existing formset

2020-06-12 Thread &#x27;MH' via Django users
Hi I have a formset that is created by an inline formset factory. So, I have seen that during the creation I can pass the extra argument in order to create more blank forms. Fine :) But I also have the case where I want to pre-populate a formset based on entries in the database. In a way I tho

Re: How to add entries dynamically

2020-06-05 Thread &#x27;MH' via Django users
ing for "inline formsets" because that's what you want. You can > of course choose some other tutorial - but I think this one explains it ok. > You will also need to do some javascript to get it working. > > Regards, > > Andréas > > > Den fre 5 juni 2020 k

How to add entries dynamically

2020-06-05 Thread &#x27;MH' via Django users
Hi I am coding a personal cookbook just for fun. On one site I want to be able to enter the ingredients, including the corresponding amount. So, I don't want to put all of that in one textarea, but in separate fields, so that I could recalculate the ingredient's amount if I have to cook for mo

UpdateView and def post()

2020-06-02 Thread &#x27;MH' via Django users
Hi I want to modidy my view that is based on UpdateView and it should work when called via post method. This is what I have so far and I am not sure if it makes sense or if it could be done in an easier way. class GD_Update(UpdateView): # setting the model, form_class and template_name mod

Access filefield's/imagefield's url in template

2020-05-08 Thread &#x27;MH' via Django users
Hi I just saw that when I pass not an object, but a queryset with values_list to a template, I cannot access a filefield like object.field_name.url, as url is a property. Can you give me advice how to get from the values_list to the url property? Best regards MH -- You received this

Pass post data to UpdateView

2020-04-26 Thread &#x27;MH' via Django users
Hi I do not know how to access request.POST, when I call UpdateView. Just to avoid a misunderstanding: I do not want to process the data after updating a model, but I want to pass a parameter to the UpdateView, which is not model related when the page opens. But I get a NameError that request

Re: How to generate breadcrums

2020-04-16 Thread &#x27;MH' via Django users
PS: I was just asking myself if I could somehow tell django what the hierarchy of views might be instead of defining the breadcrumbs for each view manually. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and sto

How to generate breadcrums

2020-04-16 Thread &#x27;MH' via Django users
Hi there I need some advice how to implement breadcrumbs in a base.html. I have already installed django-bootstrap-breadcrumbs, registered it in the apps and so on. So far I would say, it's working, Just for testing purposes it looks like this: {% load django_bootstrap_breadcrumbs %}

How many apps do you serve with one gunicorn instance?

2020-04-14 Thread &#x27;MH' via Django users
This is not strictly related to the other question about third party app integration, but I also want to write another little, which does not necessarily has anything to do with the first two that I wrote. Therefore I was wondering if it would make more sense to start a new project for that or

Re: Using external libraries for analytics

2020-04-14 Thread &#x27;MH' via Django users
Thank you very much. I will read about plotly (and dash just to see what that is :)). Best regards -- 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

Using external libraries for analytics

2020-04-13 Thread &#x27;MH' via Django users
. https://www.highcharts.com/blog/tutorials/create-a-dashboard-using-highcharts-and-django/). But perhaps I misunderstood that. If you have any experience with libraries for the visualization of analytical data, what would you recommend that renders the data on premise? Best regards MH -- You

Re: Integrate a third pary app in Django and Gunicorn

2020-04-13 Thread &#x27;MH' via Django users
Friendly push :) On Wednesday, April 8, 2020 at 6:09:21 PM UTC+2, MH wrote: > > Hi everyone > > I created two first, very small apps with Django and serve them on my NAS > with gunicorn and nginx as reverse proxy. That took me quite a while as I > am not an experienced code

Integrate a third pary app in Django and Gunicorn

2020-04-08 Thread &#x27;MH' via Django users
/gunicorn environment? I always thought that Django could easily take over one or another app just by copying the corresponding folder and registering the app in the settings.py. Best regards MH -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Unable to install / build docx module

2020-03-07 Thread &#x27;MH' via Django users
Dear Kasper Thanks a lot. Yes, this has been too far away from django. But thanks nevertheless! Best regards MH -- 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, sen

Re: Unable to install / build docx module

2020-03-06 Thread &#x27;MH' via Django users
PS: The content of the last mentioned folder looks like this: /usr/local/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.9.3$ ls * crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o libgcc.a libgcc_eh.a libgcov.a finclude: include: arm_acle.h float.h mmintrin.h sani

Re: Unable to install / build docx module

2020-03-06 Thread &#x27;MH' via Django users
Dear Kasper Thank you very much. If you still read this, I would like to ask a question about cross compilation. I found this developers guide from Synology: https://global.download.synology.com/download/Document/Software/DeveloperGuide/Firmware/DSM/All/enu/Synology_NAS_Server_3rd_Party_Apps_Int

Re: django url resolver problem

2020-03-06 Thread &#x27;MH' via Django users
So, I would perhaps try something like url("^token/", TokenView.as_view(), name="token"), url("^revoke_token/", RevokeTokenView.as_view(), name="revoke-token"), -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group a

Re: django url resolver problem

2020-03-06 Thread &#x27;MH' via Django users
Dear Ali I am just new to this myself, but I think it comes to down to the question what is the first pattern that matches for django. As far as I know we can use the ^ in order to tell django/python that a pattern should be at the start of a string that is searched. So I am not mistaken, you c

Re: Unable to install / build docx module

2020-03-06 Thread &#x27;MH' via Django users
No ... I cannot just copy it. Then it is asking for lxml again. ImportError: No module named 'lxml -- 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-user

Re: Unable to install / build docx module

2020-03-06 Thread &#x27;MH' via Django users
>From both folders I tried ./python3 -m pip install docx, but both resulted in an error message. Nevertheless, I know that one of the two works with docx and runserver. So I guess, I installed it somehow in a different way and one of the python3s can use that. Ha, so I found a package in /

Re: Unable to install / build docx module

2020-03-06 Thread &#x27;MH' via Django users
type -a python3 python3 is /opt/bin/python3 python3 is /usr/local/bin/python3 Can this actually be that a command leads to two binaries? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fr

Re: Unable to install / build docx module

2020-03-06 Thread &#x27;MH' via Django users
Hi Omar Thanks for your help again. Indeed, runserver works depending on which python3 I am using. But I guess this is the problem. The python3 from /volume1/@appstore/py3k...and..so..on seems to work with gunicorn, but this is not the same python3 that works with docx. I still try to figure ou

Re: Unable to install / build docx module

2020-03-06 Thread &#x27;MH' via Django users
Dear Kasper Before I do something very difficult like this cross compiling I wanted to try to get gcc to run on the synology diskstation. But there is a general pip issue that I do not understand. ./pip3 search gcc clang-fake-gcc (0.2.1) - A GCC-like compiler interface, but runs Clang

Re: Unable to install / build docx module

2020-03-05 Thread &#x27;MH' via Django users
scripts running that includes serving a document. Best regards MH -- 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...@googlegrou

Re: Unable to install / build docx module

2020-03-05 Thread &#x27;MH' via Django users
Dear Kasper I will google how I can do this cross compiling. Just recently a friend told me that this could not be done, because it would always have to be done on the same machine. I guess there is no way around that. How would an environment help? Best regards MH -- You received this

Re: Unable to install / build docx module

2020-03-05 Thread &#x27;MH' via Django users
So, even as someone who has not so much experience in these things I would say that I lack three things: libxml2, libxslt, and usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc About the first two: I cannot do an apt-get. I am working on a synology diskstation.

Re: Unable to install / build docx module

2020-03-05 Thread &#x27;MH' via Django users
I can also not install lxml via pip3. Here is a short part of the output: cc -I/usr/include/libxml2 -c /opt/tmp/xmlXPathInit80x1qqz_.c -o opt/tmp/ xmlXPathInit80x1qqz_.o unable to execute 'cc': No such file or directory

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH' via Django users
Dear Omar Finally I figured out, which of my gunicorn versions belonged to the right python3 that I invoked earlier. Now it seems to start. I write seems because in the browser it now immediately gives me an error that it cannot find a certain module "docx". I will come back to that in a differ

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH' via Django users
If I am not totally mistaken it could be that gunicorn wants to work with python2.7 while I did everything with python3. But how could I direct gunicorn to take python3? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH' via Django users
Is there anything particular hat I have to write into that wsgi.py file? -- 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.co

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH' via Django users
Dear Omar but would that help me right now? Besides the problem of finding the right pip, I mean? As you can see, even now my gunicorn won't work :( On Thursday, March 5, 2020 at 4:04:46 PM UTC+1, Omar Abou Mrad wrote: > > As of Python 3.3 virtual environments are builtin, it would be wise to

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH' via Django users
gunicorn -w 4 wsgi:application [2020-03-05 15:55:51 +] [4472] [INFO] Starting gunicorn 19.9.0 [2020-03-05 15:55:51 +] [4472] [INFO] Listening at: http://127.0.0.1:8000 (4472) [2020-03-05 15:55:51 +] [4472] [INFO] Using worker: sync [2020-03-05 15:55:51 +] [4483] [INFO] Booting wor

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH' via Django users
/volume1/@appstore/py3k/usr/local/bin$ ./pip install gunicorn Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: gunicorn in /volume1/homes/admin/.local/lib/ python3.5/site-packages (20.0.4) Requirement already satisfied: setuptools>=3.0 in

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH' via Django users
To be quite honest, this is really challenging for me, because the synology OS drove me nuts. I am under the impression that I have multiple installations of python and pip running now. In order to get an overview, I will now try to find every pip on my system and to install gunicorn everywher

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH' via Django users
Dear Omar python -c "import django.core.wsgi" && echo "Yup, works!" Traceback (most recent call last): File "", line 1, in ImportError: No module named django.core.wsgi but python3 manage.py runserver 0:8000 Watching for file changes with StatReloader Performing system checks... System check

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH' via Django users
Somehow I cannot write everything into one post that I wanted to reply. Here comes the rest of my original post. gunicorn -w 4 wsgi:application [... continued ...] Traceback (most recent call last): File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker File

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH' via Django users
Thanks Omar, but do I have to write something into that wsgi file? gunicorn -w 4 wsgi:application [2020-03-05 12:55:09 +] [29297] [INFO] Starting gunicorn 19.9.0 [2020-03-05 12:55:09 +] [29297] [INFO] Listening at: http://127.0.0.1:8000 (29297) [2020-03-05 12:55:09 +] [29297] [INFO]

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH' via Django users
Thanks Omar, but do I have to write something into that wsgi file? gunicorn -w 4 wsgi:application [2020-03-05 12:55:09 +] [29297] [INFO] Starting gunicorn 19.9.0 [2020-03-05 12:55:09 +] [29297] [INFO] Listening at: http://127.0.0.1:8000 (29297) [2020-03-05 12:55:09 +] [29297] [INFO]

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH' via Django users
Could anyone tell me how to start correctly the unicorn (integration)? -- 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.

Re: Stuck with Django on a Synology Diskstation

2020-03-04 Thread &#x27;MH' via Django users
Hi Omar Actually I do not know why apache is better than the development webserver from django or gunicorn, but I wanted to give it a try. The installation worked. Now I am not sure what I am doing wrong: gunicorn project/wsgi.py:application [2020-03-04 13:46:26 +] [28939] [INFO] Starting

Re: help with creating checkbox form

2020-03-03 Thread &#x27;MH' via Django users
Dear Tosin In my html template I used {% csrf_token %} {{ form.as_p }} and in my views.py in the corresponding view I have a section where I check if the method is POST: if request.method == 'POST': Later I do this: var_list_of_checked_boxes = request.POST.getlist('var_select

Re: Stuck with Django on a Synology Diskstation

2020-03-03 Thread &#x27;MH' via Django users
about that. So far I was happy with development version, but it seems difficult to install other things like mod-wsgi. Best regards MH -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: Stuck with Django on a Synology Diskstation

2020-03-03 Thread &#x27;MH' via Django users
ne 1, in File "/tmp/pip-install-24inw61_/mod-wsgi/setup.py", line 168, in 'missing Apache httpd server packages.' % APXS) RuntimeError: The 'apxs' command appears not to be installed or is not executable. Please check the list of prerequisites in t

Re: help with creating checkbox form

2020-03-03 Thread &#x27;MH' via Django users
Hi I got something like this to work with var_selection = forms.MultipleChoiceField(required=False, widget=forms. CheckboxSelectMultiple, choices=a_list_that_i_prepared_previously,) On Tuesday, March 3, 2020 at 12:46:10 PM UTC+1, Tosin Ayoola wrote: > > Good day guyz, > i'm working on a proj

Django on Synoloy

2020-03-02 Thread &#x27;MH' via Django users
Dear all I have a problem to get my django app from development to production stage on a Synology Diskstation. I installed apache 2.4, but I do not know how to proceed and I am always running into errors. Please give some guidance and I will add specific error messages. Best regards MH PS: I

Stuck with Django on a Synology Diskstation

2020-03-02 Thread &#x27;MH' via Django users
. I also tried to get opkg working. And this did not turn out so well, too. Most packages return an error, when I try to install something. Before this gets too elusive, I would ask you for guidance and then I can provide you with the following error messages. Best regards MH -- You received

tinymce: Reverse for 'tinymce.views.spell_check'

2017-02-03 Thread schaf . mh
Hi All, I'm on Django 1.10.5 using django-tinymce 2.6.0. Before upgrading to Django 1.10.5 I did not have any problems, but now I get an error: NoReverseMatch at /registry/preview/4 > > Reverse for 'tinymce.views.spell_check' with arguments '()' and keyword > arguments '{}' not found. 0 pattern

Re: formset in form_class

2017-02-01 Thread schaf . mh
Hi All, problem solved. The problem was the default value None for the form_class parameter at get_form. It works when changing: def get_form(self, form_class=None): to: def get_form(self, form_class=LayoutFormSet): Cheers Schaf Am Dienstag, 31. Januar 2017 17:55:15 UTC+1 schrieb scha...@gmail.

formset in form_class

2017-01-31 Thread schaf . mh
Hi All, in a view deriving from UpdateView the form_class attribute gets assigned with a formset. the View then overrides the get_form function. class RLFormView(LoginRequiredMixin, StaffuserRequiredMixin, UpdateView): template_name = 'abc/layout.html' form_class = LayoutFormSet fields

Re: Multiple forms in the same template

2017-01-26 Thread schaf . mh
Ohh thanks that helped a lot. Now in one view I still have a problem. It uses the a formset and tries to give that back while overwriting the get_form function: views.py class LayoutFormView(LoginRequiredMixin, StaffuserRequiredMixin, UpdateView ): template_name = 'abc/layout.html' form_c

Re: Multiple forms in the same template

2017-01-24 Thread schaf . mh
HI sorry I wanted to shorten the code before, to not post too much. Here the code: views.py class MFormsView(LoginRequiredMixin, StaffuserRequiredMixin, UpdateView, MFView): template_name = 'temps/cnfg_form.html' form_classes = { 'abc': abcForm, 'md': mdForm, } b

Re: Multiple forms in the same template

2017-01-24 Thread schaf . mh
HI sorry I wanted to shorten the code before, to not post too much. Here the code: views.py class MFormsView(LoginRequiredMixin, StaffuserRequiredMixin, UpdateView, MFView): template_name = 'temps/cnfg_form.html' form_classes = { 'abc': abcForm, 'md': mdForm, } bre

Re: Multiple forms in the same template

2017-01-23 Thread schaf . mh
Hi! And thanks for the answer. > > This stopped working in Django 1.8 > : > > "Class-based views that use ModelFormMixin will raise an > ImproperlyConfigured exception when both the fields and form_class > attributes are spec

Multiple forms in the same template

2017-01-23 Thread schaf . mh
HI All, I'm new in Django and in Web-Development. Therefore I'm a little confused now. I have taken over a Django project and first I want to upgrade it to the actual version. Now I was doing the migration to Django 1.9.12 and struggling with the following problem: Using ModelFormMixin (base c

django-report-tools replacement for Django 1.7 and higher

2016-12-21 Thread schaf . mh
Hi all, I took over a very old Django project and I like to upgrade it to the actual version. I will do a step wise upgrade and from Django 1.6 to 1.7 I have the problem, that the used django-report-tools is no longer supported/compatible because the django.utils.encoding.StrAndUnicode has been

Re: south migration: renaming foreign key and m2m tables

2016-05-13 Thread schaf . mh
HI Michal If you are using South, that would mean you're using a version of > Django that's oldee than 1.7, which means you are using a version > that hasn't received security updates for more than a year. Not good. > > Second, South itself has been deprecated and replaced by the native > djan

south migration: renaming foreign key and m2m tables

2016-05-12 Thread schaf . mh
HI All, I'm new in south and I'm wondering how I can merge two models into one. I have a model book which derives from the model media. So book has a media_id_ptr (which is already a pk). No I would like to merge all attributes from media into book and get rid of media. I was doing the following

south schemamigration merge two tables into one

2016-05-11 Thread schaf . mh
Hi All, this is my first schemamigration and it is done on Django 1.6 with south. I have a model class 'book' which derives from 'media' and extends it. Now I decided that this splitting is not needed. Therefore I decided to merge the data from 'media' into 'book' My idea was to keep the table 'b

emailuser accessor clash after migrating to Django 1.6

2016-04-26 Thread schaf . mh
HI All, In an existing project I got the following error after upgrading to Django 1.6.11 CommandError: One or more models did not validate: emailuser.emailuser: Accessor for m2m field 'groups' clashes with related m2m field 'Group.user_set'. Add a related_name argument to the definition for 'gr

PyCharm not stopping at breakpoint

2016-04-18 Thread schaf . mh
HI All, I have some unit tests (using django-nose). As one was failing I wanted to debug the test (to see what's going on), but pyCharm does not stop at the breakpoint. I'm working with Python 2.7.6, Django 1.5.1, django-node 1.2, nose 1.3.3. PyCharm 4.5.3 Do you have any ideas? Thanks Regards

Re: Running Django-Test fails with TransactionManagementError

2016-04-15 Thread schaf . mh
Hey John, cool it runs now. I had multiple problems: 1.) I granted ALL rights to my user on the test DB. ==> This solved the issue with the TransactionManagementError. 2.) I had to do some changes in my configuration and play around. Afterwards the tests were running. But not all green :-| Tha

Re: Running Django-Test fails with TransactionManagementError

2016-04-15 Thread schaf . mh
No I have not added a target. The reason is that there is a class deriving from NoseTestSuiteRunner. This class defines the run_tests function which modifies the test_labels passed to the base 'constructor'. If I add a Target for a single test (testclass.testMethod) then just this test method wo

Re: Running Django-Test fails with TransactionManagementError

2016-04-15 Thread schaf . mh
Hi John, I did now comment out those two files, but still get the same error. Maybe I have a wrong configuration or so. I'm quite new in Django / Python. Regards schaf Am Freitag, 15. April 2016 15:11:40 UTC+2 schrieb John Griebel: > > That's what I would try. > > On Fri, Apr 15, 2016 at 9:02 AM

Re: Running Django-Test fails with TransactionManagementError

2016-04-15 Thread schaf . mh
Hi John, thanks, but I did already check for @transaction.commit_manually in the code, but PyCHarm serahc just finds this in the virtualenv/python2.7/site-packages/django_extensions/management/commands. So in my code there is nothing, would you recommend to comment those out, even if it is not

Running Django-Test fails with TransactionManagementError

2016-04-15 Thread schaf . mh
Hi All, I took over some projects written with Python 2.7 / Django 1.5.1. For unit tests the django-nose 1.2 (nose 1.3.3) is used and the project structure has its own tests directory which contains the testrunner.py. As a development environment I use PyCharm. As I wanted to run the unit tests I

Django and MongoDB

2012-10-26 Thread mh
Hi, what is the current recommendation for using MongoDB with Django? I know about the django-nonrel project, but it bases on Django 1.3, and we're heading to Django 1.5 in few weeks, with ubercool custom User feature. Anyone would like to share ideas? Regards, Mateusz -- You received this me

Model validation (not form validation)

2010-06-16 Thread MH
Hi, I'm making a model, that has a bit complex dependencies between the fields, such as date progression (start_date must not be later than finish_date). I'm looking for a way to validate these dependencies while creating (or saving) the model, but I am not sure which approach should I use. The be

Re: edit_inline causing problems with multiple relations

2007-04-04 Thread mh
> the top of my head, but I do know that problems with edit_inline and > manipulators is one of the many reasons that we are introducing > newforms. Good to know. I see there's a branch dedicated to porting the admin to newforms, but sadly there doesn't seem to have been that much activity in the

Re: edit_inline causing problems with multiple relations

2007-04-04 Thread mh
> I thought we fixed this a bit before 0.96 was released. Are you using > the latest release or some older code? Upgraded to 0.96 before I posted here, hoping it'd fix it but it didn't :/. --~--~-~--~~~---~--~~ You received this message because you are subscribed

edit_inline causing problems with multiple relations

2007-04-03 Thread mh
I have two models that (simplified) look like this; class List(models.Model): name =models.CharField(maxlength=128) class Admin: pass class Entry(models.Model): name = models.CharField(maxlength=128, core=True) list = models.ForeignKey(List, edit_inline=models.TABULAR) to = models.Foreign