Re: Question about `_meta` API's naming

2024-02-21 Thread Jason
https://forum.djangoproject.com/ would be a better place to ask, FYI. as far as why keep private... lets flip it around. Why make it public? what's the benefit of this change? Having it private means that the API internals can change if necessary On Tuesday, February 20, 2024 at 10:15:43 AM U

Re: Question re: input

2023-04-01 Thread Robin Riis
You can check out rabbitMQ if it can fit your needs. Theres a plugin in django that simplifies integration. On Sat, Apr 1, 2023, 19:06 o1bigtenor wrote: > On Sat, Apr 1, 2023 at 9:51 AM Robin Riis wrote: > > > > What kind of environment are we talking about? > > Me designed software - - - phys

Re: Question re: input

2023-04-01 Thread o1bigtenor
On Sat, Apr 1, 2023 at 9:51 AM Robin Riis wrote: > > What kind of environment are we talking about? Me designed software - - - physically challenging (possible outdoors, possible inclement conditions + ) > > But i guess you mean that you have a server in one location and multiple > clients from

Re: Question re: input

2023-04-01 Thread Robin Riis
What kind of environment are we talking about? But i guess you mean that you have a server in one location and multiple clients from diffrent locations that should be able to upload some kind of data to the server. SSH is great to connect to a remote machine in a secure manner. And scp to send fi

Re: ?? question ,its urgent

2022-06-26 Thread Wazed Khan
Thanks On Mon, Jun 27, 2022, 4:44 AM Ryan Nowakowski wrote: > An alternative to storing all values in a single model field is to use EAV: > > > https://en.m.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model > > On June 20, 2022 1:46:42 AM CDT, Abhinandan K > wrote: >> >> how to st

Re: ?? question ,its urgent

2022-06-26 Thread Ryan Nowakowski
An alternative to storing all values in a single model field is to use EAV: https://en.m.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model On June 20, 2022 1:46:42 AM CDT, Abhinandan K wrote: >how to store the data in django databse table if user append fields >according to their

Re: ?? question ,its urgent

2022-06-23 Thread Soumen Khatua
Better use JSON Field to store all the informations On Mon, Jun 20, 2022 at 12:16 PM Abhinandan K wrote: > how to store the data in django databse table if user append fields > according to their need > for example i have 1 one field 1) name 2) age 3) salary and the sign('+) > if user click on +

Re: ?? question ,its urgent

2022-06-20 Thread Wazed Khan
You could make the fields as not required like name = models.CharField(blank =True) I could be wrong or Didn't get your question if I'm in one of them ignore the suggestion. On Mon, Jun 20, 2022 at 12:47 PM Abhinandan K wrote: > how to store the data in django databse table if user append field

Re: ?? question ,its urgent

2022-06-20 Thread Seelam Mahesh
Use quarey set On Mon, 20 Jun, 2022, 12:17 pm Abhinandan K, wrote: > how to store the data in django databse table if user append fields > according to their need > for example i have 1 one field 1) name 2) age 3) salary and the sign('+) > if user click on + sign row append one plus in form..my

Re: ?? question ,its urgent

2022-06-20 Thread Paul Kudla (SCOM.CA Internet Services Inc.)
Just an fyi your email showed up as suspect ?? spf=softfail (google.com: domain of transitioning abhinan...@snakescript.com does not designate 2607:f8b0:4864:20::62b as permitted sender) might want to get that fixed Happy Monday !!! Thanks - paul Paul Kudla Scom.ca Internet Services

Re: ?? question ,its urgent

2022-06-20 Thread Abhishek Choudhury
Hi Abhinandan, You can create a JSON field as dict and accordingly add key values to that dictionary (provided by the + add option in frontend). Hope this helps. Thanks and regards, Abhishek On Mon, 20 Jun 2022 at 12:17 PM, Abhinandan K wrote: > how to store the data in django databse table if

Re: Question about from integer models

2022-05-30 Thread Hansel Johansyah
Hi Thank you for response anyway I have trying your tips, but It not works On Monday, May 30, 2022 at 8:08:02 PM UTC+7 chir...@gmail.com wrote: > Hi, > > As per my understanding, the thing you want to achieve can be done using > the below code. > > > {% for i in number %} >{{i}} >

Re: Question about from integer models

2022-05-30 Thread Chiranjeevi Kodati
Hi, As per my understanding, the thing you want to achieve can be done using the below code. {% for i in number %} {{i}} {% endfor %} In that way, if the queryset contains 1 to 6 integers, you will loop over them and create 6 li items and place it inside ul tag element.

Re: Question regarding adding language support to webapp based on Django

2022-03-27 Thread Antonis Christofides
Hello, I'm not really an expert, but I'm replying since no-one else did. If the user request the translation zh-hk and a string isn't available, then I think that it will fallback on another zh-, but I don't know which (but I think you only have zh-hant, so presumably that will be it). Even if

Re: Question regarding organizing models

2021-11-18 Thread Twizerimana Emmanuel
hy yooo i got problem in python quadratic equation in python how to operate delta that is less than 0 using complex function On Sun, Nov 14, 2021 at 9:24 PM Peter of the Norse wrote: > You can put a string with the name of a class that is yet to be defined in > the ForeignKey. > https://docs.dja

Re: Question regarding organizing models

2021-11-14 Thread Peter of the Norse
You can put a string with the name of a class that is yet to be defined in the ForeignKey. https://docs.djangoproject.com/en/3.2/ref/models/fields/#foreignkey In this case you would do created_by_id = models.ForeignKey(

Re: Question regarding organizing models

2021-09-23 Thread bnmng
Are you saying a user can only have one company? If a user can have more than one company then just define the foreign key in company. Then there will automatically be query set attached to each user called company_set. Otherwise, you can define a OneToOneField in User. You can create a thir

Re: 'Question' object has no attribute 'choice_text'

2021-05-12 Thread UK Accounts
Hi Daniel, Thank you for getting back to me. Please find models as follows Need all_Questions and all_Choices to reflect for each other. I was reading MDN docs on django they recommend ManyToManyField. Please advise. Thank You Rishipal import datetime from django.db import models from djang

Re: 'Question' object has no attribute 'choice_text'

2021-05-07 Thread Daniel Hepper
Hi Rishi, please share your models.py, otherwise it will be difficult to help you. Cheers, Daniel Rishipal Singh schrieb am Fr. 7. Mai 2021 um 15:19: > Hi Daniel, > I am working on same tutorial and stuck at Tutorial # 4.. > > I have checked your code too.. > Still getting below error > > 'Que

Re: 'Question' object has no attribute 'choice_text'

2021-05-07 Thread Rishipal Singh
Hi Daniel, I am working on same tutorial and stuck at Tutorial # 4.. I have checked your code too.. Still getting below error 'Question' object has no attribute 'choice_set' selected_choice = question.choice_set.get(pk=request.POST['choice']) Can you advice Regards Rishi On Monday, 25 Decembe

Re: Question about models. test

2021-05-02 Thread Peter of the Norse
This kind of script can be dangerous. It’s possible for malicious websites to create a page that can use up too many resources or otherwise act strangely. URLValidator

Re: Question about models. test

2021-02-25 Thread Ryan Nowakowski
On Thu, Feb 25, 2021 at 01:06:00AM -0500, dupakoor kannan wrote: > I have the following model > > class Publication(models.Model): > name = models.CharField(max_length=25, blank=True, null=False) > publication_url = models.TextField(blank=True) Once you clean out all the bad data, you mig

Re: Question about permissions for django.git

2020-10-31 Thread Christopher Keith
Hey Kasper- Many thanks! Tried your suggestion and it works. Does this mean that my specific git configuration is such that the 'git' URL will not work? If so, it is possible that https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/working-with-git/ could be updated to s

Re: Question about permissions for django.git

2020-10-31 Thread Kasper Laudrup
Hi Chris, On 31/10/2020 17.02, Christopher Keith wrote: Folks - I am following the instructions from https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/working-with-git/ . However, when I try to 'git fetch' the source repo, I get 'Permission denied' PS C:\Users\chr

Re: Question about django.utils.autoreload

2020-07-20 Thread Chetan Ganji
RE: os.path.join(BASE_DIR, 'reactapp', 'src') It seems that the source code of react app is inside the django folder, so if src code of django is changed, react app would be rebuild! Try keeping the src code of django and react app if different folders, that might solve it. Regards, Chetan Ganj

Re: Question on migrations vs postgres database

2020-06-21 Thread Mike Dewhirst
On 22/06/2020 8:04 am, Ram wrote:   self.cursor.execute("DELETE from django_migrations WHERE app = %s", % app) There should not be a comma in that line -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop r

Re: Question on migrations vs postgres database

2020-06-21 Thread Ram
Hi all, Anyone has a clue on this? I appreciate if someone look into this and help us unblocking this? Thanks, ~Ram On Sun, Jun 14, 2020 at 3:23 PM Ram wrote: > Hi, > > I tried replacing square bracket with % and ran this command the result is > returned as follows. Hope I'm not missing anythi

Re: Question on migrations vs postgres database

2020-06-14 Thread Ram
Hi, I tried replacing square bracket with % and ran this command the result is returned as follows. Hope I'm not missing anything. I tried to use app name in the command but the result is same. > > (x) xxxenv@2332333223:~/xxx/xxxv$ python3 manage.py reset_migrations >> Traceback (most recent

Re: Question on migrations vs postgres database

2020-06-12 Thread Integr@te System
Hi Ram, Plz check line #44 in reset_migrations.py try replace square bracket by percent sign. Or check temp file before your actions execute commands migration. Goodluck. On Sat, Jun 13, 2020, 12:31 PM Ram wrote: > Hi, > > We clone our project repository from GIT hub and deployed our web > ap

Re: Question regarding Interactive Python shell response and django

2020-04-30 Thread Derek
Again; the issue is why are you mixing up the console/shell with the web-facing aspect? These are designed for different ways of interacting with Django. Its almost like you are asking "how to hit in a screw with a a hammer?". What is the underlying problem you are trying to solve? On Wednesd

Re: Question regarding Interactive Python shell response and django

2020-04-29 Thread Michael Karikari
I'm not sure if DRF will work for me. I guess I should rephrase my question: If I'm using an imported module from a Django view that requires responding to executing from the console, is there a where to surface that request through the web app to end-user can do the input? On Tuesday, April 28

Re: Question regarding Interactive Python shell response and django

2020-04-28 Thread Michael Karikari
Ill have to look at the DRF option, the python API I'm connecting assumes you are doing this from shell, so I was trying to work around that fact On Monday, April 27, 2020 at 10:51:10 AM UTC-4, Derek wrote: > > I think you are better off creating a proper API for your Django project, > using som

Re: Question regarding Interactive Python shell response and django

2020-04-27 Thread Derek
I think you are better off creating a proper API for your Django project, using something like DRF. The Django shell is meant for direct use by an administrator working on the server. On Sunday, 26 April 2020 16:05:02 UTC+2, Michael Karikari wrote: > > So I find myself in a pickle. > I'm using

Re: Question regarding Interactive Python shell response and django

2020-04-26 Thread Ryan Nowakowski
On Sun, Apr 26, 2020 at 05:43:33AM -0700, Michael Karikari wrote: > So I find myself in a pickle. > I'm using an external python API with Django, and as part of that > interaction, it asks for an input from the Django python shell window. What > I am trying to figure out is how can I get form in

RE: Question about Guest users and AnonymousUser best practices

2020-03-28 Thread Mike Dewhirst
First an apology for top-posting. Blame my stupid phone.I like django-auth and group permissions to segregate functionality and hide/reveal stuff.I also like your notion of auto-creation of a fresh user.I think it might be worthwhile doing a Django 3rd party app which plugs into the existing aut

Re: Question

2019-12-12 Thread Dvs Khamele
Hi Reply to Hire worlds first affordable Python, Django Based Startup. So we may help you in this and related tasks / projects immidiately mere at $7 per hour. On Wed, 27 Nov 2019 at 01:17, kennedy musyoki wrote: > I am new in Django and programming as well, I am to run the following code > in c

RE: Question

2019-11-30 Thread Allaberdi Yazhanow
No problem)) Sent from Mail for Windows 10 From: kennedy musyoki Sent: Saturday, November 30, 2019 10:15 PM To: django-users@googlegroups.com Subject: Re: Question Thanks, it has worked. On Wed, Nov 27, 2019 at 8:36 AM Allaberdi Yazhanow wrote: If you want to run django Server you have to

Re: Question

2019-11-30 Thread kennedy musyoki
Thanks, it has worked. On Wed, Nov 27, 2019 at 8:36 AM Allaberdi Yazhanow < allaberdi16yazha...@gmail.com> wrote: > If you want to run django Server you have to write command like this ( cd > “location file manage.py “ then ( python manage.py runsever > > Sent from my iPhone > > On Nov 26, 2019,

Re: Question

2019-11-26 Thread Allaberdi Yazhanow
If you want to run django Server you have to write command like this ( cd “location file manage.py “ then ( python manage.py runsever Sent from my iPhone > On Nov 26, 2019, at 4:52 PM, kennedy musyoki > wrote: > > I am new in Django and programming as well, I am to run the following code in

Re: Question

2019-11-26 Thread Olumayowa Hephyang
You have not selected the right directory On Tue, Nov 26, 2019, 8:47 PM kennedy musyoki wrote: > I am new in Django and programming as well, I am to run the following code > in cd but getting the error below, please advise > > C:\Users\Kennedy>py Mysite.py runserver > C:\Users\Kennedy\AppData\Lo

Re: Question

2019-11-26 Thread Elico
Hi Kennedy, What is Mysite.py? You should run $ python manage.py runserver You run this from the directory where manage.py is located. On Tue 26. Nov 2019 at 20:47, kennedy musyoki wrote: > I am new in Django and programming as well, I am to run the following code > in cd but getting the erro

Re: Question about form_valid: how to automatically set multiple fields when users input data via CreateView supported form?

2019-11-22 Thread techguy
SimpleHumble I need your help with this common commment fault On Sunday, April 28, 2019 at 3:35:23 PM UTC-4, SimpleHumble wrote: > > Sorry there was a mistake in previous mail please ignore. > form_valid function will not work use post function above it in > ArticleCommentCreateView > Find atta

Re: Question about makemigrations

2019-06-21 Thread Rob W
"Migrate is basically the old syncdb but it takes into account all the migrations made by makemigrations. You should run the command -migrate- after adding a new app under the INSTALLED APPS section in the settings.py file in order to synchronize the database state with your current set of model

Re: Question about makemigrations

2019-06-21 Thread Martin Kong
Hello I make python manage.py migrate instead,but that should be the next step tho Regards Martin On Fri, 21 Jun 2019 at 7:45 PM, Sebastian Jung wrote: > Hello, > > Do you make python3 manage.py migrate after makemigrations? > > Regards > > Martin Kong schrieb am Fr., 21. Juni 2019, 13:25: >

Re: Question about makemigrations

2019-06-21 Thread Sebastian Jung
Hello, Do you make python3 manage.py migrate after makemigrations? Regards Martin Kong schrieb am Fr., 21. Juni 2019, 13:25: > Hello > I am new to django, and i am following the tutorial provide in github, > from the tutorial. > The tutorial I am following is > https://github.com/django/django

Re: Question about form_valid: how to automatically set multiple fields when users input data via CreateView supported form?

2019-04-29 Thread Atsunori Kaneshige
Hi, Britto, Sorry for my late reply. Thank you so much! I learnt a lot. Looks like you created a function called get_context_data and put all comment data from Comment database into context with key 'comments'. You then called 'comments' in the template. Now I don't need reated_name='comment' i

Re: Question about form_valid: how to automatically set multiple fields when users input data via CreateView supported form?

2019-04-28 Thread Atsunori Kaneshige
Hi, Britto, Wow, it's working as expected! Thank you so much. (*So sorry, one more question below, please find it!*) Basically, you added blank=True for author field and article field in Comment model. In this way, I don't need to set author/article field in CommentCreateView. Instead, we have

Re: Question about form_valid: how to automatically set multiple fields when users input data via CreateView supported form?

2019-04-28 Thread Britto .
If you don't want to display article and author in the template. Use custom form design instead of {% form.as_p %} tag. Something like this will render only comment field on template. You should not remove those fields as those are required to process form. Share the code as zip will exam it and

Re: Question about form_valid: how to automatically set multiple fields when users input data via CreateView supported form?

2019-04-28 Thread chirag soni
Please share the form and form template as well. On Sun, 28 Apr 2019, 02:37 Atsunori Kaneshige I really appreciate if anybody could give me an advice about form_valid. > > Here is what I want to do. > I am making a simple blog. > I am making simple features: > 1) only superuser can create article

Re: Question about form_valid: how to automatically set multiple fields when users input data via CreateView supported form?

2019-04-27 Thread Britto .
set form.instance.article = request.POST.get('article') and add article in fields too like fields = ('comment', 'article') it should work flawlessly. Regards Britto On Sun, 28 Apr 2019 at 09:30, Atsunori Kaneshige wrote: > Hi, Britto, > > Thank you very much for your reply! > I tried form.ins

Re: Question about form_valid: how to automatically set multiple fields when users input data via CreateView supported form?

2019-04-27 Thread Atsunori Kaneshige
Hi, Britto, Thank you very much for your reply! I tried form.instance.article = *self.*request.POST.get('article'), I still got an error shown below. RelatedObjectDoesNotExist at /articles/2/comment/ Comment has no article. Request Method: POST Request URL: http://127.0.0.1:8000/articles/2/c

Re: Question about form_valid: how to automatically set multiple fields when users input data via CreateView supported form?

2019-04-27 Thread Britto .
The best way to debug it is add a print function with dir function just before the error occurring line and see what are available attributes in request.POST object like this print(dir("", request.POST, "")) . Also without dir function will show what is available in POST. Look at th

Re: Question about form_valid: how to automatically set multiple fields when users input data via CreateView supported form?

2019-04-27 Thread Atsunori Kaneshige
Sorry, when I make a comment, I get this error. Any advice would be really appreciated! AttributeError at /articles/2/comment/ 'WSGIRequest' object has no attribute 'article' Request Method: POST Request URL: http://127.0.0.1:8000/articles/2/comment/ Django Version: 2.1.5 Exception Type: Attr

Re: [Question] Django 2 - how to sum values based on filter and group by Year-Month

2018-07-27 Thread Melvyn Sopacua
On vrijdag 27 juli 2018 04:25:56 CEST Charles Sartori wrote: > I need to Sum() the values filtering it with > 1 - sum(values) where date < first day of the month > 2 - sum(values) where date < last day of the month > > Expected result(something like that): > [ > {'year-month': '2018-01'}, {'sum_

Re: [Question] Django 2 - how to sum values based on filter and group by Year-Month

2018-07-26 Thread Gerald Brown
I am having a similar problem where I want to get the total (SUM) of about 20 - 30 items in a current day.  I can get the list of customers names and payments in a html table but so far haven't been able to get the SUM of those payments.  I have tried using Django ORM AGGREGATE SUM('integer fie

Re: Question about Getting URL segment into a View

2018-03-16 Thread RisenFenix
Thank You!!! That got me going. I have been working on this for days and you got me going in a few minutes! I can't thank you enough! On Friday, March 16, 2018 at 11:51:28 AM UTC-4, Matthew Pava wrote: > > Use self.kwargs.get(‘gwpk’) > > > https://docs.djangoproject.com/en/2.0/topics/class-

RE: Question about Getting URL segment into a View

2018-03-16 Thread Matthew Pava
Use self.kwargs.get(‘gwpk’) https://docs.djangoproject.com/en/2.0/topics/class-based-views/generic-display/#dynamic-filtering From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of RisenFenix Sent: Friday, March 16, 2018 7:55 AM To: Django users Subject: Question

Re: Question about dot notation syntax (Django source)

2018-02-23 Thread drone4four
Hi Andreas! Thank you for your reply. You said: The dot notation (as you call it) references a class that you can find if > you look in the django package, under folder contrib, folder auth, file > password_validation.py you will find a class class > UserAttributeSimilarityValidator. See t

Re: Question about dot notation syntax (Django source)

2018-02-16 Thread Andréas Kühne
Like Juan says, Read the documentation for modules and dictionaries and I think you will be better off. However, here is a quick rundown of your questions: AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation. UserAttributeSimilarityValidator', }, {

Re: Question about dot notation syntax (Django source)

2018-02-15 Thread Juan Pablo Romero Bernal
Hi, You must read: https://docs.python.org/3/tutorial/modules.html and https://docs.python.org/3/tutorial/datastructures.html#dictionaries Cheers, On Thu, Feb 15, 2018 at 8:06 PM, drone4four wrote: > In, “Password management in Django >

Re: 'Question' object has no attribute 'choice_text'

2017-12-24 Thread Daniel Hepper
Are you sure your polls/models.py is correct? I assume you are at „Part 2: Playing with the API“. Here is what your polls/models.py should look like at this point of the tutorial: https://github.com/consideratecode/django-tutorial-step-by-step/blob/2.0/2.4/mysite/polls/models.py My guess is that

Re: Question about m2m and forms

2017-04-02 Thread Carlo Ascani
Il giorno sabato 18 febbraio 2017 11:02:25 UTC+1, Carlo Ascani ha scritto: > > > > Il giorno venerdì 17 febbraio 2017 20:09:15 UTC+1, Matthew Pava ha scritto: >> >> Hi Carlos, >> You probably want to create a new widget and override its >> label_from_instance method. >> >> class BModelMultiple

Re: Question about m2m and forms

2017-02-18 Thread Carlo Ascani
Il giorno venerdì 17 febbraio 2017 20:09:15 UTC+1, Matthew Pava ha scritto: > > Hi Carlos, > You probably want to create a new widget and override its > label_from_instance method. > > class BModelMultipleChoiceField(forms.ModelMultipleChoiceField): > def label_from_instance(self, obj

RE: Question about m2m and forms

2017-02-17 Thread Matthew Pava
Hi Carlos, You probably want to create a new widget and override its label_from_instance method. class BModelMultipleChoiceField(forms.ModelMultipleChoiceField): def label_from_instance(self, obj): return "%s (%s)" % (obj, obj.count_a) And then you'll want to change your

Re: Question Is Django Rest Framework only for APIs or can i Use it to create Users for a website?

2017-01-10 Thread Melvyn Sopacua
On Friday 06 January 2017 23:13:12 Robert librado wrote: > Thanks i guess i will go with djangi all auth instead kind of leaning > towards a social network Yeah, you should, cause it's the opposite of what Django Rest Framework does. Django All Auth connects an *external API* to *your applicati

Re: Question Is Django Rest Framework only for APIs or can i Use it to create Users for a website?

2017-01-06 Thread Robert librado
Thanks i guess i will go with djangi all auth instead kind of leaning towards a social network On Jan 6, 2017 10:39 PM, "M Hashmi" wrote: > Django RestAPI is a layer that exposes part of your application or your > whole website to other platforms for connectivity. Once it is integrated > then wh

Re: Question Is Django Rest Framework only for APIs or can i Use it to create Users for a website?

2017-01-06 Thread M Hashmi
Django RestAPI is a layer that exposes part of your application or your whole website to other platforms for connectivity. Once it is integrated then whatever tasks you've specified for DjangoRestFramwork to carry to another platform will act for everything what that application tend to present. So

Re: question about returning file (pdf,image,zip...) in a request that made from temporary URL

2016-10-31 Thread Stefano Probst
You could use a whole deployment setup. Forward Django though nginx by using WSGI (Gnuicorn, etc). Then everything should work. -- 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, se

Re: question about returning file (pdf,image,zip...) in a request that made from temporary URL

2016-10-30 Thread ali Eblice
thanks for reply i setup the x-sendfile but there's a problem : django return a x-sendfile response successfully but since i'm using django development area and the development area runs on port 8000 the return response will be on port 8000 but the apache web server runs on port 80 so the resp

Re: question about returning file (pdf,image,zip...) in a request that made from temporary URL

2016-10-29 Thread Stefano Probst
Hello, you can use X-Accel-Redirect. See django-downloadview and "Nginx, Django, and X-Accel-Redirects". Best regards Am Freitag, 28. Oktober 2016 16:59:53 U

Re: Question has mediated relation to the Django.

2016-07-22 Thread Derek
I don't know how to do this in "raw" Python; but my view is that the Python universe is full of very smart programmers who have wrapped their knowledge into libraries for you to use - so why not make use of them, rather than reinventing the wheel yourself? In short: https://pythonhosted.org/Py

Re: Question about admin.StackedInline

2016-04-23 Thread Camilo Torres
On Friday, April 22, 2016 at 12:37:40 PM UTC-4:30, Said Akhmedbayev wrote: > > Thank you in advance! > > I am new to Django, trying to build a small app for my friend. The app > mock-up is here > > Basically, the app will include Units/Lessons with Subsection, eac

Re: Question about users system

2016-04-15 Thread Luis Zárate
I thing Sites framework do something similiar to you problem, so you could study how is implemented. https://docs.djangoproject.com/en/1.9/ref/contrib/sites/ El viernes, 15 de abril de 2016, Eduardo Leones < edua...@ypytecnologia.com.br> escribió: > Javier, thanks for the answer. > Very inter

Re: Question about users system

2016-04-15 Thread Eduardo Leones
Javier, thanks for the answer. Very interesting "multi-Tenat" solution, including found this really cool below: https://github.com/bernardopires/django-tenant-schemas What worried me was his observation that is not a simple implementation to be done in Django. What is the biggest difficulty in

Re: Question about users system

2016-04-15 Thread Javier Guerra Giraldez
On 15 April 2016 at 12:17, Eduardo Leones wrote: > I am developing a system in which my clients are companies. Every company > needs to have its isolated from other business data. google for "multi-tenant" web applications. warning: there are quite strong opinions about how it should be done. i

Re: Question re django.forms.models.BaseModelFormSet.save_existing_objects()

2015-12-21 Thread Mike Dewhirst
On 22/12/2015 4:22 AM, Tim Graham wrote: Hi Mike, see if the documentation at the bottom of https://docs.djangoproject.com/en/stable/topics/forms/formsets/#django.forms.formsets.BaseFormSet.can_delete helps. Yes it does. Thank you Tim. "If you call formset.save(commit=False), objects will not

Re: Question re django.forms.models.BaseModelFormSet.save_existing_objects()

2015-12-21 Thread Tim Graham
Hi Mike, see if the documentation at the bottom of https://docs.djangoproject.com/en/stable/topics/forms/formsets/#django.forms.formsets.BaseFormSet.can_delete helps. On Monday, December 21, 2015 at 4:00:36 AM UTC-5, James Schneider wrote: > > > > That is true. However, if commit was False that

Re: Question re django.forms.models.BaseModelFormSet.save_existing_objects()

2015-12-21 Thread James Schneider
> That is true. However, if commit was False that object wouldn't be deleted but it would still appear in the self.deleted_objects list. My concern - or more accurately lack of understanding - is that the object would remain in existence AND appear in the deleted list. This was precisely what happe

Re: Question re django.forms.models.BaseModelFormSet.save_existing_objects()

2015-12-20 Thread Mike Dewhirst
On 21/12/2015 6:10 PM, James Schneider wrote: I have just been digging into django.forms.models.py to debug my own code and found something which confuses me in both 1.8 and 1.9 django.forms.models.BaseModelFormSet.save_existing_objects() puts

Re: Question re django.forms.models.BaseModelFormSet.save_existing_objects()

2015-12-20 Thread James Schneider
> > I have just been digging into django.forms.models.py to debug my own code > and found something which confuses me in both 1.8 and 1.9 > > django.forms.models.BaseModelFormSet.save_existing_objects() puts objects > (child model instances) into the BaseModelFormSet.deleted_objects list > whether

Re: Question about using a model as a member in another model.

2015-12-18 Thread Eliot
It looks like you need a ForeignKey relationship. So your SignUp model would have an extra field, looking something like this: class SignUp(models.Model): #...other fields... elective = models.ForeignK

Re: Question about Django Tutorial Part 5

2015-10-15 Thread Vijay Khemlani
The "create" method (as in Question.objects.create) saves the object to the database On Thu, Oct 15, 2015 at 6:08 AM, Shun Liang wrote: > Dear All, > > In the 5th part of the Django Tutorial ( > https://docs.djangoproject.com/en/1.8/intro/tutorial05/#testing-our-new-view > ), there is a helper f

Re: Question about squashing django migrations

2015-08-10 Thread Richard Brockie
Hi Carl, Thanks for pointing this out - it's right there! I don't know how I missed it... Thanks again, R. On Mon, Aug 10, 2015 at 11:12 AM, Carl Meyer wrote: > Hi Richard, > > On 08/01/2015 06:27 PM, Richard Brockie wrote: > > Can someone please explain the implications of this note about squ

Re: Question about squashing django migrations

2015-08-10 Thread Carl Meyer
Hi Richard, On 08/01/2015 06:27 PM, Richard Brockie wrote: > Can someone please explain the implications of this note about squashing > migrations in the documentation? > > From: https://docs.djangoproject.com/en/1.7/topics/migrations/ > > "Once you’ve squashed a migration, you should not th

Re: Question: standalone django application

2015-05-12 Thread Tom Evans
On Tue, May 12, 2015 at 4:01 PM, Abhijit Chatterjee wrote: > Idk if this is the right forum to post this question but I have been > fiddling around with: > > https://pypi.python.org/pypi/django-standalone > > Is django-standalone is only to test ORM? Or we can also test our controller > function a

Re: Question on auto-generating username while using django registration

2015-04-30 Thread Babatunde Akinyanmi
Yes it is and very easy. Create a form without a username field and do something like this: def autogenerate_username (): # some logic new_user=User.objects.create_user(autogenerate_username (), self.cleaned_data['email'], s

Re: Question about run bash scripts on Django-Python

2015-04-20 Thread Larry Martell
On Mon, Apr 20, 2015 at 10:31 AM, David Pineda wrote: > Hello > I'm a begginner in django and i need to work with a form (send a file) and > when the file it's ok run a bash scripts to process that. > > I investigate and the common recomendation si use 'subprocess' an 'sys' > So, i can set the pa

Re: Question on Extending the existing User model documentation

2015-04-11 Thread Larry Martell
On Sat, Apr 11, 2015 at 9:27 AM, Mike Dewhirst wrote: > On 10/04/2015 11:06 PM, Larry Martell wrote: >> >> Reading this: >> https://docs.djangoproject.com/en/1.7/topics/auth/customizing/#extending-the-existing-user-model >> >> I see this: >> >> These profile models are not special in any way - the

Re: Question on Extending the existing User model documentation

2015-04-11 Thread Mike Dewhirst
On 10/04/2015 11:06 PM, Larry Martell wrote: Reading this: https://docs.djangoproject.com/en/1.7/topics/auth/customizing/#extending-the-existing-user-model I see this: These profile models are not special in any way - they are just Django models that happen to have a one-to-one link with a Use

Re: Question about form security.

2015-02-19 Thread Carl Meyer
On 02/19/2015 04:03 PM, Chen Xu wrote: > what if I have two addresses, id is 1 and 2, and I want to update 2, how > I should distinguish 2 from 1, I mean, if I have addressid in the form, > and someone modify it from 2 to 1, and that will update 1, right? How to > prevent this? Your server-side co

Re: Question about form security.

2015-02-19 Thread Chen Xu
what if I have two addresses, id is 1 and 2, and I want to update 2, how I should distinguish 2 from 1, I mean, if I have addressid in the form, and someone modify it from 2 to 1, and that will update 1, right? How to prevent this? On Thu, Feb 19, 2015 at 6:01 PM, Mario Gudelj wrote: > Because t

Re: Question about form security.

2015-02-19 Thread Mario Gudelj
Because the user must be logged in to update their username you can get the current user from the request. You don't need to have their id inside the form. On 20/02/2015 9:49 am, "Chen Xu" wrote: > Hi > I am implementing a feature while building a website using Django, > basically, I want user to

Re: Question about subdomains.

2015-02-11 Thread Sergiy Khohlov
Also one project can serve few domain names. 10 лют. 2015 17:22, користувач "Chen Xu" написав: > Hi > I am using Django to build a website. > > I saw some websites have www.ABC.com, support.ABC.com, and career.ABC.com. > I wonder how this is achieved. Are these 3 different apps in 1 project, or >

Re: Question about subdomains.

2015-02-11 Thread Tom Evans
On Tue, Feb 10, 2015 at 3:22 PM, Chen Xu wrote: > Hi > I am using Django to build a website. > > I saw some websites have www.ABC.com, support.ABC.com, and career.ABC.com. I > wonder how this is achieved. Are these 3 different apps in 1 project, or 3 > different projects. > > Thanks Technically:

Re: Question about subdomains.

2015-02-11 Thread Bruno Barcarol Guimarães
It depends if there is a need to separate the code from the sites on three projects. If the code is not so complex and you can fit them all on a single project, you can just configure the web servers to serve the same project on the three domains. On Tuesday, February 10, 2015 at 3:22:29 PM UTC, C

Re: Question about subdomains.

2015-02-10 Thread Tom Christie
> Are these 3 different apps in 1 project, or 3 different projects. Either are possible. It depends on the application. -- 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 em

Re: Question for Django Core Team?

2015-01-18 Thread Russell Keith-Magee
On Sun, Jan 18, 2015 at 8:28 PM, Petar Pilipovic wrote: > Hello there this is maybea of topic but I wont to ask Django Core Team, > did they now someone who is practising Django in Belgrade-Serbia, or > Zagreb-Croatia, I now there is a strong Slovenia team there, but I was > wondering about this

Re: Question on Template placement in file system

2015-01-09 Thread JJ Zolper
Generally speaking my impression is most people next to their settings.py file have a "templates" folder. This folder of templates is for templates used across the site. If you are talking app specific then a "templates" folder inside that app is reasonable enough. So for generic templates her

Re: Question on Template placement in file system

2015-01-08 Thread Collin Anderson
Hi, The tutorial suggests A) (for a non-reusable app). https://docs.djangoproject.com/en/1.7/intro/tutorial02/#ref-customizing-your-projects-templates Collin On Tuesday, January 6, 2015 at 10:25:10 AM UTC-5, Tobias Dacoir wrote: > > I have been working through the official Django 1.7 tutorial a

Re: Question on url routing

2014-10-14 Thread robert brook
I have figured out how to determine if the url_conf was obtained from an internal link (which would be the only acceptable workflow) or through a url that the user typed into the address bar trying to subvert the workflow. See the attached screen shot of the view. If the view goes through the e

  1   2   3   4   5   6   >