I am relatively new to coding and am trying to do some stuff in django. im trying to have my apps reference eachother in django but i get the error "ImportError: cannot import name Question".What i dont understand is that when i create a new project and put 2 new apps inside it, i can reference the apps no problem
here is my project file structure:
and here is my code in my models files
signups/models.py
code from questions.models
and then my traceback from terminal
if anyone could take a quick look at this, i'd really appreciate it. I have checked a ton of other stack posts to see if any posted answers would solve my problem, but i haven't had any luck yet.
so it looks like i figured out my own problem. it looks like it had to do with the file structure. originally, i had my structure like this:
virtual env > project > projects file > apps
it looks like it should have been this:
virtual env > project > projects files, app1, app2
Cheers.
Related
I am now working on a react ecommerce website and I have encountered an issue that I forgot to give keys to the lists I rendered. So, I was wondering if there is a way to see one file which contains all the code for that web app, like in Sass , we write code in different files but we are able to see the massive file that contains all the code that we wrote across multiple files.Even if we can't change that file, it would be nice to see how many lines of code are there. So ,is there a way to do that?
As you may have understood from the title of my question, I am trying to Instantiate a .obj file that is locally stored on the device with an already given path.
I have already tried to load it as an assetBundle using the WWW method, but it didn't work. I asked a question before on this forum (see here: How To Load A Local File as an AssetBundle with WWW), but I thought that maybe I was going completely in the wrong direction to do this, maybe there is another way to do it. Some people responded that I needed to build the asset before Instantiating it but I didn't understand.
I was hoping for any suggestions on how to do this
Than you in advance :)
For more information, please see other question: How To Load A Local File as an AssetBundle with WWW
Related serialization data is generated when the asset is imported into Unity. And Unity needs these serialization information when managing these assets, so you can import the obj file into the Unity editor, create an assetbundle, and then load it through the associated api.
You can refer to this document:
https://docs.unity3d.com/Manual/AssetBundlesIntro.html
I am trying to create a .xlsx file with data I retrieve from mysql to a node.js server that serves an angularjs project, but after hours of trying to find something via npm or google I almost gave up!
The two main problems I have are:
My data is in hebrew (i.e. rtl styling + different characters).
The Excel file that I export needs to be styled in a specific way, and it is a pain trying to style an excel file grammatically.
And then I had an idea!
What if I could create a google sheet doc in my google drive as a template including the styling, and then when the user clicks to create a new doc, I would just duplicate this template, and change the values to the new data.
But just trying to understand the google api is a headache on its on, apparently, there are 3! different api's: Drive, Sheets and auth.
So my question is as follows.
Is my idea valid? does anyone think it could work?
Where would I start, is there some guide or npm that would help?
Please don't comment to look in the docs, I am having a hard time to understand where to start from there.
I would suggest creating the template file locally instead of opting to google spreads.
There is a decent module I used sometime back, which does styling pretty well, Its called exceljs.
Though there is always the xlsx module, Which is very powerful but difficult to use
Also if you end up using google spreadsheets, I would suggest giving node-google-spreadsheet module a look
maybe it's a question already ask but i did not find a answer.
Hello all.
I'm new ruby on rails.
I'm using Ruby 1.9.3 and rails 3.0.5, i want to create a page to upload file (video) on the shared folder of the server and when the file is upload i want to save the name of the file on my database (SQLITE3).
After i want to use the of HTML5 to list all the video i have on an other page.
The structure look like : Home -> click on button upload file -> upload page file -> return home to see the video list.
If possible i want to make it hand made, no gems.
For now i have try something like mix : http://french.railstutorial.org/chapters/user-microposts#top and http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm. But did not get anything so far the work.
Thank you for the help.
p.s. : sorry if my english is not really good.
There is a reason people use gems. They provide flexibility and simplicity into application. Gems is blessing and not using gems when you can is a total waste of time. As for this application, please consider Carrierwave gem. One was specifically designed for file uploads. Here is a railscast video on how to use it. I'm sure you'll find it pretty simple and awesome to use.
I think you can use paperclip gem to upload image.
I have read and seen the implementations of Trigger.io + Backbone.js - my question though is regarding using the backbone-boilerplate framework specifically.
I am using Backbone-Boilerplate for my project along with the Backbone-LayoutManager by the same author. When I do a build with Trigger, my views aren't loaded in at all. After doing (a lot) of Googling, I think it has something to do with the root path of the application which is used to build the full path to the files which are fetched via AJAX. (See https://github.com/tbranyen/backbone-boilerplate/wiki/Relative-path-setup-notes)
I followed the instructions in the above link to see if I could get my app running from http://localhost/myapp/ as opposed to http://mypp.local and sure enough it worked. However I cannot set these routes manually for running on the device as I am not sure what they are going to be for each build across all devices.
Any ideas on how to get Backbone-Boilerplate template loading and Trigger.io playing nicely together?
If the path is different per device, it might make sense to explore the options of a variable app.root. This could be achieved through something like location.pathname. I'm not familiar at all with trigger.io, but would something like this work:
app.root = location.pathname;
This would set the root to something like: /e034fde/random/path/ dynamically.