Re: Setting up admin in visual studio
I don't get what you mean by admin page. BTW don't get confused 1) Visual Studio 2017 (what I uses for Python projects) 2) Visual Studio Code ( an very versatile editor from MS as well) Both can be used for Python development. *Holger André* Skype: hjoab1 Mobile/Whatsapp/Telegram : +(506) 8883-9645 Website: https://www.linkedin.com/in/hjoab/ San José, Costa Rica, Central America. The information contained in this e-mail is privileged and confidential, this information is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, copy or taking action in reliance upon this email is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and then delete this e-mail in its entirety. On Mon, Nov 5, 2018 at 12:02 PM Saeed Pooladzadeh wrote: > Hello, > > Can anyone help me how to start the admin page in visual studio. > I have tried many methods but none succeeded. > > thanks > > Saeed > > -- > 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/de46c47e-5d27-4ac8-8359-f8bf1e9e838d%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/de46c47e-5d27-4ac8-8359-f8bf1e9e838d%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/CAL0dL5aXjjL4Y5BUSe3LneKOAVCzw%2BHwmCP7WD6UE1EoEzOzLQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Experienced django developer is needed.
Hello Can you give me more detials? regards *Holger André* Skype: hjoab1 Mobile/Whatsapp/Telegram : +(506) 8883-9645 Website: https://www.linkedin.com/in/hjoab/ San José, Costa Rica, Central America. The information contained in this e-mail is privileged and confidential, this information is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, copy or taking action in reliance upon this email is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and then delete this e-mail in its entirety. On Thu, Oct 25, 2018 at 5:27 AM BBG wrote: > I have one project on django1.0 and python 2.7. If anyone is interested > than contact me... > > -- > 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/c3554b00-bf20-4aea-97a4-be485ebc6bea%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/c3554b00-bf20-4aea-97a4-be485ebc6bea%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/CAL0dL5aJO0F9GnSVcpD2Gm471KRo7uDuPyuDFpHK6ZFJtREsUg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: I Suck
Hello Weird !!! I just began the last week and I found it piece of cake. I am using Visual Studio 2017 community (its free) and you can find in MSDN and Microsoft Academy very simple to follow tutorials and samples You can give it a try *Holger André* On Wed, Oct 24, 2018 at 8:35 AM Edson Rodrigues wrote: > This is just an outburst. I have been trying to learn Django for months > and I do not learn. I already paid for a course at Udemy, followed > tutorials on YouTube, followed the Django Project tutorial and nothing > worked to me. I am a failure as a programmer / developer. :( > > -- > 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/15ac9bcf-7b41-40a0-ae59-46fc915e03d2%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/15ac9bcf-7b41-40a0-ae59-46fc915e03d2%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/CAL0dL5YauZn5be6SJiSb38J7MXDe4UPhTp5WV4vgYTWERAwhnA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: SuspiciousOperation errors after upgrading from Django 1.8 -> 1.10
Hi That sounds like a good idea. I will check. Thank you! On Monday, August 7, 2017 at 9:53:10 AM UTC+2, Andréas Kühne wrote: > > Hi, > > This sounds a bit like the problem we had with sessions when we tried > using dynamodb for a session store. We reverted to using redis instead, so > I don't really know how to solve your problem, but I would take a look at > the session store. It could be as easy as some of the sessions were created > with django 1.8 and then being read by django 1.10 it isn't able to read > the information correctly (related to how the session object has been saved > on the server - I don't remember if the store is populated differently in > django 1.8 and django.10?) > > Regards, > > Andréas > > 2017-08-04 16:35 GMT+02:00 holger <mikael.h...@gmail.com >: > >> Hi >> >> After upgrading from Django 1.8 -> 1.10 I get alot of this exception: >> >> Internal Server Error: <> >> >> SuspiciousOperation at <> >> The request's session was deleted before the request completed. The user >> may have logged out in a concurrent request, for example. >> >> >> Unfortunately I am not able to reproduce it which makes it difficult for >> me to locate the error. The exceptions are triggered in the production >> environment. >> >> Anyone had a similar issue and managed to figure out what it was? >> >> >> >> >> -- >> 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...@googlegroups.com . >> To post to this group, send email to django...@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/6eb59d34-184c-49d5-9b46-d66f12b6eb61%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-users/6eb59d34-184c-49d5-9b46-d66f12b6eb61%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/6e5d516c-a4db-42c9-90b6-1c5e6602650c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
SuspiciousOperation errors after upgrading from Django 1.8 -> 1.10
Hi After upgrading from Django 1.8 -> 1.10 I get alot of this exception: Internal Server Error: <> SuspiciousOperation at <> The request's session was deleted before the request completed. The user may have logged out in a concurrent request, for example. Unfortunately I am not able to reproduce it which makes it difficult for me to locate the error. The exceptions are triggered in the production environment. Anyone had a similar issue and managed to figure out what it was? -- 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/6eb59d34-184c-49d5-9b46-d66f12b6eb61%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Getting uploaded images to show
Hi I added the url-pattern and altered the admin_media_prefix and it worked. Thanks a lot for your help! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Getting uploaded images to show
I am new to django and I am trying to get an image upload to work. I am using the admin interface with a ImageField in the model. imagefilename = models.ImageField(upload_to = 'uploads/') My media url is MEDIA_URL = 'http://127.0.0.1:8000/media/' and my media_root is MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media') where project_root points to the root folder for the project So I want the images to be uploaded to http://127.0.0.1:8000/media/uploads/ I can see the images being uploaded to the directory but I can´t access the file through the url in the template. What am I missing? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: NoReverseMatch with Django-Profiles
On 13 Mai, 00:50, Daniel Roseman <roseman.dan...@googlemail.com> wrote: > On May 12, 11:00 pm, Holger Latz <holger.l...@googlemail.com> wrote: > > > > > Hi, > > > I included the Django-Profiles Module as recommended with > > > (r'^profiles/', include('profiles.urls')), > > > in my urls.py and so far it works fine. > > > Now I'd like to make use of an the implemented kwarg 'success_url'. As > > far as I use it within the urls.py it works: > > > url(r'^create/$', views.create_profile, {'success_url': '/status'}, > > name='profiles_create_profile'), > > > But when I call it within the code with the reverse-function like > > > return HttpResponseRedirect(reverse('profiles_create_profile', kwargs= > > { 'success_url': '/status' })) > > > it will raise the following exception: > > > "Reverse for 'profiles_create_profile' with arguments '()' and keyword > > arguments '{'success_url': '/status'}' not found." > > > If I omit the kwargs it works without an error, so > > 'profiles_create_profile' will be found! Who can give me a hint? > > > Cheers > > Holger > > You've misunderstood the link between the extra arguments in the > urlconf, and those in the reverse() function. > > In your url definition, you've hard-coded an extra parameter which is > passed to the view in exactly the same way as one taken from the URL > itself. However, as you've defined it there's no valid URL that > accepts a different value for 'success_url'. But in your reverse() > call, you're trying to dynamically pass a value for success_url, and > there's no URL that matches that. > > As long as you want the value of '/status' which you originally hard- > coded, you can leave out the kwargs in your call to reverse, since the > actual definition of 'profiles_create_profile' doesn't take any > arguments. But if you really want to specify it dynamically in the URL > (and I'd think very hard about the security implications before doing > so) you'll need to change the url definition so that success_url is an > actual dynamic URL parameter. > -- > DR. Hi Daniel, you're absolutely right: a misunderstanding. What I like to do is passing extra options to view functions. But I mixed it with naming URL patterns! It seems that I have to create a *new* pattern (profiles_create_profile_url) in urls.py with the extra option 'success_url' and call it with reverse ('profiles_create_profile_url'). Thanks! Holger --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
NoReverseMatch with Django-Profiles
Hi, I included the Django-Profiles Module as recommended with (r'^profiles/', include('profiles.urls')), in my urls.py and so far it works fine. Now I'd like to make use of an the implemented kwarg 'success_url'. As far as I use it within the urls.py it works: url(r'^create/$', views.create_profile, {'success_url': '/status'}, name='profiles_create_profile'), But when I call it within the code with the reverse-function like return HttpResponseRedirect(reverse('profiles_create_profile', kwargs= { 'success_url': '/status' })) it will raise the following exception: "Reverse for 'profiles_create_profile' with arguments '()' and keyword arguments '{'success_url': '/status'}' not found." If I omit the kwargs it works without an error, so 'profiles_create_profile' will be found! Who can give me a hint? Cheers Holger --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: HTML entities
> > Oh, I just noticed this with Konqueror from KDE 3.5.4: you can have this meta line in your base.html template as long as you want. When you use "./manage.py runserver", it won't be honored, the value from DEFAULT_CHARSET from settings.py takes precedence. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: long-running process. how to do it?
> I wrote a daemonize method that can be called by the view to > spawn a new process that executes your code. Looks very similar to django.utils.daemonize :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: HTML entities
> ä -> > Ö -> > ß -> Do you really need them? Theoretically, you can simply set And then you may use those characters literally. However, I'm not a browser expert and don't know if all modern browsers under the sun understand this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Importing models from each other.
> I try to import like: "import myproject" and then > myproject.auth.models.User but no luck, Django throws error, > that auth has no models class. Is there a way to make this to > work? For this kind of problem it helps sometimes to use the "-v" option to python, e.g. python -v ./manage.py runserver and then look what modules it wants to load. Maybe it's also as simple as a missing empty __init__.py in the myproject/auth directory. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: createsuper user by shell
> In the last svn version I can't use django-admin > createsuperuser name mail passw > > How to add a super user by python shell ? from django.contrib.auth.models import User user = User( username='name', password='sha1$8b4ed$jfhjdhfjhsw4334uhxnxcywjiewwcccf3a6d8326', email='[EMAIL PROTECTED]', is_active=True, is_staff=True, is_superuser=True) user.save() To find out how to create the password, look at the top of django/contrib/auth/models.py --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Why I'm giving up on Django
> I kept running into error messages which told me about > exceptions in the Django source code (this is the top part of > the error page) and I kept thinking "well, where's the bloody > use in that??? I want to know what MY error was! Grmbl.". Django your easily find out if a module name in it's output starts with django. If yes, it could use CSS to make it lighter or gray or whatever. In this case, the user-modules (e.g. urls.py or views.py) would stand out. Easier for the eye to catch :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to create unions (or how to extend a QuerySet)?
I found a way. Using the extra() directive, I create another field, e.g. is_new. I then can use this as a sort criteria. There's no need to output this field: list = Device.objects .extra(select={'is_new': 'name LIKE "New Device%%"'}) .order_by('-is_new', 'parent', 'name') --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
How to create unions (or how to extend a QuerySet)?
I have a list that looks like this: list = Device.objects.all().order_by('parent', 'name') and I use this list in a view. Works fine. However, I want to have the items with a special name at the top of the generated list. I can easily create two lists, which have the two items in it: list1 = Device.objects.all(). filter(name__istartswith='New device') list2 = Device.objects.all(). exclude(name__istartswith='New device'). order_by('parent', 'name') However, I can't find a way to join them into one list. This did not work: pag = ObjectPaginator(list1 or list2, 50) And besides, or would use QuerySet.__or__ which would use QuerySet._combine, and that would merely intermix inter object parameters of the not-yet-evaluated QuerySets. list = [] list.extend(list1) list.extend(list2) pag = ObjectPaginator(list1 or list2, 50) I also can't solve my problem at the template level: {% for item in list1 %} item.foo {% endfor %} {% for item in list2 %} item.foo {% endfor %} ... because this wouldn't work with ObjectPaginator. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: automatically fill in some fields of a form, storing authenticated user
> I think ajax tech will very suit for these things. Because you Recently there where browser exploits that utilized JavaScript. So it *CAN* happen that some people will turn JavaScript off. In this case your Ajax method doesn't work anymore. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: The Holy Grail of Web Development
> knock-on errors)... and lastly... ScrIDE doesn't let me run > manage.py with arguments. It let's you. You can modify manage.py, and then you can change the values in sys.argv to your pleasure. I, for example, do this: if __name__ == "__main__": # Shut up the initial syncdb import sys if len(sys.argv)>1 and sys.argv[1]=="syncdb": sys.argv.append("--noinput") execute_manager(settings) ... and similarly you can do sys.argv.append("runserver") sys.argv.append("127.0.0.1:1234") before calling execute_manager() --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: settings.py help please
> raise ImproperlyConfigured, "Error loading MySQLdb module: > %s" % e django.core.exceptions.ImproperlyConfigured: Error > loading MySQLdb module: No module named MySQLdb Your python installation lacks the python-module name 'MySQLdb' to access MySQL databases. If you were on Debian, you would probably just apt-get install python-mysqldb and be done. But for Mac OS X you should ask the right guru's or search at google for web site ´a la "Installing Django on Mac OS X". --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Multiple Components on One Page
> I am a recovering .NET addict and still very new to Python, so > just talk some heavy python right now and you can probably > make my head explode :-). http://www.diveintopython.org/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---